RequireJS 1.0.7 is available.
The fixes are almost all optimizer fixes. There was a fix for a bad source overwriting bug when "appDir" and "mainConfigFile" were used together when mainConfigFile had a paths config.
Release Notes
Wednesday, February 22, 2012
Monday, February 20, 2012
Template for responsive mobile, offline web apps
It can be difficult to create a web app that is responsive to different screen resolutions and works well in mobile environments or environments with spotty network availability.
In order to make it easier, Jason Strimpel and I created a project template, create-responsive-template, that takes care of a few things for you:
Here is a video that shows how you can use the template:
The next steps I would like to see for this project template:
In order to make it easier, Jason Strimpel and I created a project template, create-responsive-template, that takes care of a few things for you:
- Uses Twitter Bootstrap for a baseline style and responsive UI
- A couple of small JS helpers for AppCache and network events
- A build step that optimizes JS and CSS and generates the AppCache manifest for you
Here is a video that shows how you can use the template:
The next steps I would like to see for this project template:
- An IndexedDB data layer: A JS helper library that looks like the IndexedDB API, but will use an API shim over Web SQL if IndexedDB is not available. The shim does not have to implement 100% of the IndexedDB API, but something that allows a good start to local data storage. I am looking at Lawnchair at the moment, but open to other ideas.
- An easy way to generate app store manifests for Mozilla Web Apps and Google Chrome Store.
Monday, February 13, 2012
RequireJS 1.0.6 released
RequireJS 1.0.6 is available.
The main purpose of the release is to fix a regression in 1.0.5 where the optimizer's "dir" config option was not applied correctly when passed on the command line.
The other notable change: the optimizer now supports onBuildRead and onBuildWrite functions that are called when JS modules are read or written for an optimized build layer. This allows doing some regexp work to modify their contents.
List of changes to:
The main purpose of the release is to fix a regression in 1.0.5 where the optimizer's "dir" config option was not applied correctly when passed on the command line.
The other notable change: the optimizer now supports onBuildRead and onBuildWrite functions that are called when JS modules are read or written for an optimized build layer. This allows doing some regexp work to modify their contents.
List of changes to:
Wednesday, February 08, 2012
volo 0.0.5 released: name changed
volo 0.0.5 is now available, and with it comes a name change.
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:
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.
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.