tolyo / html-pages-brunch

Brunch plugin for compiling and minifying HTML files
MIT License
11 stars 4 forks source link

Use compile static #8

Closed carsonip closed 8 years ago

carsonip commented 8 years ago

The compile() function is not called. Use compileStatic() instead. Related tests are modified.

tolyo commented 8 years ago

@carsonip Under what version of brunch is compile() not called?

carsonip commented 8 years ago

@tolyo I am using brunch 2.8.2 which is the latest version.

tolyo commented 8 years ago

@carsonip I ll take a look at it

tolyo commented 8 years ago

@carsonip warn: html-pages-brunch does not declare target extension for static files, skipping. This is a breaking change

carsonip commented 8 years ago

@tolyo Did you add the two lines?

HtmlPages.prototype.extension = 'html';
HtmlPages.prototype.staticTargetExtension = 'html';
tolyo commented 8 years ago

@carsonip I see that now. It now works but it works only for the assets folder, which I don't believe any other plugins optimize for. assets exist just to be copied. I could add it as an option but as far as the plugin is concerned, it is meant for .html outside of assets folder.

carsonip commented 8 years ago

@tolyo You are right. It turns out that my html are static and they are in the assets folder that's probably why the compile() didn't work for me. Assets should be html minified though.

tolyo commented 8 years ago

@carsonip I'll make the necessary changes for your use-case. Hold tight

carsonip commented 8 years ago

@tolyo Sorry that I overlooked the case. This is great, thanks!

tolyo commented 8 years ago

@carsonip Done. Update to 2.3.0