decanify

0.1.0 • Public • Published

decanifyBuild Status

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');

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.0
    7
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.0
    7

Package Sidebar

Install

npm i decanify

Weekly Downloads

7

Version

0.1.0

License

Apache 2.0

Last publish

Collaborators

  • tarabyte