techpines / asset-rack

Static Web Framework for Nodejs
asset-rack.org
324 stars 93 forks source link

AngularTemplatesAsset should support Jade templates #82

Open dankohn opened 11 years ago

dankohn commented 11 years ago

We're using Jade for our Angular templates. How would you feel about a pull request that caused AngularTemplatesAsset to look for Jade assets as well as HTML, and that automatically compiles any Jade files it found? Does it even need an option to turn off the Jade compilation functionality?

Separately, our HTML page will then be referencing 3 fingerprinted files: the site Javascript bundle, the site CSS bundle, and the site AngularTemplates bundle. What's the possibility of combining 1 and 3 into a single bundle?

techpines commented 11 years ago

Totally cool with the pull request.

Here is a thought for how the api might look for combining 1 & 3, which I think is a good idea:

new BrowserifyAsset({
    prepend: new AngularTemplatesAsset({}),
    filename: __dirname + '/browser/app.js',
    url: '/app.js'
});

Also, I'd love to make the new keyword optional for asset-rack. I've seen people do it in other libraries and I'd like to do it here, and I was wondering if you know how to set something like that up.

bryanchriswhite commented 11 years ago

partially fixed by #107