decanify
v0.1.0
Published
Prepare canjs bower package for debowerify transform.
Downloads
18
Readme
decanify
Prepare canjs bower package for browserify's debowerify transform
This package was intended to address the very specific problem. To allow canjs installed via bower package to run smoothly with browserify. Period. No general purpose AMD to CommonJS converting and such.
Warning: Consider using WebPack instead.
##Why not deamdify? Mainly three reasons:
- It seems maintainer has quit the project.
- There are critical open issues.
- It wont work with CanJS due to child dependencies.
This package was inspired by deAMDify but heavily rewritten to meet the specific requirements. Anyway kudos goes to Jared Hanson.
##Requirements
- CanJS should be installed via
bower install canjs
- debowerify is required.
- Allowed file extensions: js or coffee.
- decanify should run before debowerify.
- coffeify should run before decanify.
##Example
//inside index.js
var can = require('canjs/amd/can');
//inside bower_components/canjs/amd/can.js
define(["can/util/library", "can/control/route", "can/model", "can/view/mustache", "can/component"], function(can) {
return can;
});
//-t decanify
var can = require('canjs/can/util/library.js');
require('canjs/can/control/route.js');
...
require('canjs/can/component.js');
module.exports = can;
//-t debowerify
var can = require('./..\\..\\bower_components\\canjs\\amd\\can');