Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: being able to pass it a list of url's #9

Open
branneman opened this issue Jun 8, 2014 · 3 comments
Open

Feature Request: being able to pass it a list of url's #9

branneman opened this issue Jun 8, 2014 · 3 comments

Comments

@branneman
Copy link

Since a lot of people are using grunt to validate source code —and not built files, such as minified javascript— it would be nice if grunt-htmlhint would also support linting url's, instead of only files.

Say you're using a local node.js server with a template engine like Swig, and you'd want to check your html before the build, so you can fail the build if necessary. Like refusing to optimize require.js with r.js if there are JSHint errors. frntndr is an example of such a project. Who has the full html for a single page inside one file nowadays?

For this to work, I'd be nice if grunt-htmlhint could validate url's as well. Since running htmlhint over swig files will naturally fail, there needs to be a way of validating combined html from several template files. Like the grunt-htmllint-http plugin does. But ideally you wouldn't want another grunt plugin for that if you ask me.

I could see an example config like this:

htmlhint: {
  options: {
    'tag-pair': true
  },
  dist: {
    src: [
      'http://localhost/',
      'http://localhost/articles.html'
    ]
  }
}

But this is of course only a proposal, maybe a different way of specifying url's makes more sense?

Edit: I could help with the development of this feature, if you agree this would be a nice addition.

@yaniswang
Copy link
Contributor

In my company, we use proxy to validate html code.
So can support every type of template.
And can support online webpage.

We use pageRun: https://github.com/yaniswang/pageRun

@poppinlp
Copy link

poppinlp commented Apr 1, 2015

@yaniswang
Wish if there will be a option for ignore some templates content and let htmlhint pass.
Because it might be too heavy to run webdriver only for some template syntax and variables.

@yaniswang
Copy link
Contributor

<%if%>
<div>
<%else%>
<div>
<%end%>
</div>

Show me how ignore templates content.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants