Previously the command line tool was called volo.js, but now it is just volo. This is a backwards incompatible change, please download the latest using the instructions from the link above.
This release also has gained the ability to auto-convert node modules into AMD format. An example:
volo create example
cd example
volo add mishoo/UglifyJS uglify
Then edit www/js/app.js to be:
requirejs(['uglify'], function (uglify) {
console.log(uglify("function foo() { var hello = 'world'; return hello; }"));
});
If you load example/www/index.html in a browser, you will see a console statement with minified content.
This AMD conversion only works well if the target package does not have any nested node_modules dependencies. For those kinds of conversions, you can try the (still experimental) npmrel command that is also in this latest release.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.