Author: Lin Dong
Date: April 06, 2015
-
npm install zonvert
to installzonvert
package -
zonvert -c ~/.jshintrc -d ./test/src -o ./test/build
This will convert AMD
to CMD
javascript file.
Convert input
define(["underscore", "backbone"],
function(_, Backbone) {
var exports = Backbone.Controller.extend({
// your code
});
return exports;
}
);
to output
var _ = require("underscore");
var Backbone = require("Backbone");
var exports = Backbone.Collection.extend({
// your code
});
module.exports = exports;
You can customize ~/.jshintrc
to fit your needs