tolyo / html-pages-brunch Goto Github PK
View Code? Open in Web Editor NEWBrunch plugin for compiling and minifying HTML files
License: MIT License
Brunch plugin for compiling and minifying HTML files
License: MIT License
Hey,
I tried to place all files (~1000 html files) that previously were in assets folder to app folder.
This was done to make html and corresponding js files close to each other - so I don't have dig into assets folder every time I work on js file.
I tried to switch off the minifier with config, it did not help.
brunch watch: before this change it took ~ 4s to complete initial watch iteration
brunch watch: after this change it took more than 5 minutes, I stopped waiting and cancelled
I used this config:
plugins:
htmlPages:
removeComments: false
removeCommentsFromCDATA: false
removeCDATASectionsFromCDATA: false
collapseBooleanAttributes: false
useShortDoctype: false
removeEmptyAttributes: false
removeScriptTypeAttributes: false
removeStyleLinkTypeAttributes: false
collapseWhitespace: false
minifyJS: false
minifyCSS: false
destination : (path) -> path.replace /^app[\/\\](.*)\.html$/, "$1.html"
Hi team,
what I am trying to do is move all my index.html to public/ and all other html files to /public/partials folder. My build is fine locally, but when I deploying, getting " [error] 7#7: *14 directory index of "/var/www/" is forbidden". looks like it is trying to access the absolute path. Any hints?
htmlPages: {
htmlMin: {
caseSensitive: false,
collapseBooleanAttributes: true,
collapseInlineTagWhitespace: false,
collapseWhitespace: true,
conservativeCollapse: false,
html5: true,
includeAutoGeneratedTags: false,
keepClosingSlash: false,
minifyCSS: true,
minifyJS: true,
preserveLineBreaks: false,
preventAttributesEscaping: false,
processConditionalComments: true,
removeAttributeQuotes: true,
removeComments: true,
removeEmptyAttributes: true,
removeOptionalTags: true,
removeScriptTypeAttributes: true,
removeStyleLinkTypeAttributes: true,
sortAttributes: true,
sortClassName: true
},
destination: function(path) {
if ( path.includes('/index.html') ) {
return "index.html";
}
if ( path.includes("/") ) {
var res = path.split("/");
return "partials/" + res[res.length-1];
}
return path;
},
disabled: false
},
Had installed brunch by
$ brunch new proj -s es6
,
istalled your plugin
npm install --save-dev html-pages-brunch
Added my HTML files outside of the folder app/assets, so they are now stored in app.
running brunch build --production
does not add files in the folder public.
Is there any configuration I'm missing?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.