rotundasoftware / cartero

Modular front end development for multi-page web applications.
MIT License
204 stars 25 forks source link

Valid assetTypes #34

Closed mediafreakch closed 9 years ago

mediafreakch commented 9 years ago

Hello,

The docs state that using cartero API you can specify the keys in package.json that enumerate assets.

assetTypes (default: [ 'style', 'image' ]) -The keys in package.json files that enumerate assets that should be copied to the cartero output directory

To verify that it should work, I modified Example 3 of the tests contained in the cartero repo to this:

// cartero/test/example3/views/package.json
{
    "name" : "common-js",
    "main" : "common.js",
    "style" : "*.css",
    "random" : ["*.png"]
}
// cartero/test/test.js - line 119
var c = cartero( viewDirPath, outputDirPath, { assetTypes: ["random", "style"]} );

The test does not pass: not ok 12 robot.png in common package

Is there a limited set of supported keys or is it a bug?

dgbeck commented 9 years ago

Hi again @mediafreakch. Yes, this was in fact a bug. Fixed in v4.0.3, just published. Thanks!