lycheeverse / lychee

⚡ Fast, async, stream-based link checker written in Rust. Finds broken URLs and mail addresses inside Markdown, HTML, reStructuredText, websites and more!

Home Page:https://lychee.cli.rs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Does it support scanning Vue files

deli-chen opened this issue · comments

Yeah, it should.

<template>
  <div>
    <h1>Welcome to My Vue App!</h1>
    <p>Here are a couple of useful links:</p>
    <ul>
      <li><a v-bind:href="link1.url" target="_blank">{{ link1.text }}</a></li>
      <li><a v-bind:href="link2.url" target="_blank">{{ link2.text }}</a></li>
    </ul>
  </div>
</template>

<script>
export default {
  name: 'App',
  data() {
    return {
      link1: {
        text: 'Visit Vue.js!',
        url: 'https://vuejs.org/'
      },
      link2: {
        text: 'Learn More about Vue',
        url: 'https://vuejs.org/v2/guide/'
      }
    };
  }
}
</script>

<style>
/* Add some basic styling */
h1 {
  color: navy;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  margin-bottom: 10px;
}
a {
  color: darkblue;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
</style>

If I save this as test.vue and then scan it with lychee, it works:

/tmp ❯❯❯ lychee --dump test.vue
https://vuejs.org/
https://vuejs.org/v2/guide/
/tmp ❮❮❮ lychee test.vue       
  2/2 ━━━━━━━━━━━━━━━━━━━━ Finished extracting links   
  🔍 2 Total (in 0s) ✅ 2 OK 🚫 0 Errors

Closing this to keep the issue tracker clean. However, if you run into issues, feel free to reopen. 😉

As a general note, since this is more of a discussion rather than an issue, I'd like to mention our discussion forum as well.