Comments (3)
You can try a templating language to handle HTML files like Pug. See example: http://github.com/tpkahlon/npm-app.git.
from npm-build-boilerplate.
It's possible to do it in the command line using HTML-minifier (https://github.com/kangax/html-minifier) and therefore also possible with a npm script.
Example below with likely options/settings when using HTML-minifier:
html-minifier --input-dir html/ --output-dir html/ --file-ext html --collapse-whitespace --remove-comments --minify-js --minfy-css
from npm-build-boilerplate.
@kuansuh, the comment above from @adamgian looks like a good solution.
from npm-build-boilerplate.
Related Issues (20)
- [Question] How to minify all HTML files in folder (and all folders within)? HOT 2
- Watch does not work for SCSS files in windows 10 HOT 5
- imagemin-cli — update to v.3 HOT 3
- integrate `stylelint` for linting css HOT 3
- npm task for zip files HOT 2
- Windows HOT 2
- onchange (osx) HOT 2
- build:amp HOT 1
- Caching to speed up build process HOT 1
- svgo: Output to dist/
- copy folders (fonts or other static resources) HOT 1
- SVG Sprites not working HOT 1
- SVG Sprites Stylesheet
- Question: Whats the purpose of `|| true` HOT 1
- Autoprefixer does not trigger -webkit- prefix. HOT 1
- HTML from nested Folder not working
- .DS_Store in images HOT 1
- Add doiuse&pug
- Auto image minify 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 npm-build-boilerplate.