Comments (6)
Far smarter people out there have done a much better job that I could do
If you're just getting started here are a few resources that might help:
https://github.com/petehunt/webpack-howto
https://webpack.github.io/docs/list-of-tutorials.html
https://egghead.io/courses/using-webpack-for-production-javascript-applications
from htmlhint-loader.
As you're not using the html loader I'm assuming you're not loading the html file in your source so webpack doesn't know it exists. You need to install and configure the html loader then in ./entry.js
put require('test.html')
from htmlhint-loader.
Oh, I got your point. Thanks. But it's working only when I setup the loader using
loaders: [
{
test: /\.html$/,
loader: "html"
}
]
and requiring the exact file require('html!./test.html');
inside entry.js
. Is there any other way to watch for all the directories, and automatically lint all html files? Something like require('html!./src');
.
from htmlhint-loader.
You can do that with webpack: https://webpack.github.io/docs/context.html
function requireAll(requireContext) {
return requireContext.keys().map(requireContext);
}
requireAll(require.context("./src", true, /^\.\/.*\.html$/));
Although if you don't intend to bundle your templates with your JS you might be better off using gulp
from htmlhint-loader.
Ohk.. Thanks a lot. You seems to be a champ of Webpack. I just started learning it 2 days back. Why don't you write a book on it?
from htmlhint-loader.
😆 You are also expert IMHO! Yes I looked into that Survive.js link during my weekend. Thanks for sharing the details.
from htmlhint-loader.
Related Issues (14)
- Error when report is generated HOT 1
- got error in a vue project. HOT 3
- simpler custom rules import HOT 5
- wepback 4.0.0 compatiblity HOT 5
- Angular inline templates
- Better tests HOT 1
- Latest version stills installs htmlhint 0.9.13 which installs also minimatch 0.3.0 with vulnerabilities HOT 3
- Use `strip-json-comments` before parsing the config file.
- Incorrect config, or something else?
- Custom rules doesn't work HOT 1
- configFile option ignored HOT 1
- Reading configFile throws an error HOT 5
- Suggestion: improve handling of configFile paths HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from htmlhint-loader.