cube-cjsx
the coffee react processor for cube
Last updated 5 years ago by perterpon .
Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install cube-cjsx 
SYNC missed versions from official npm registry.

install

npm install cube-cjsx

this module need runtime lib

you should copy the runtime.js to your project

write a processor

function Processor(cube) {
  this.cube = cube;
}

Processor.info = {
  type: 'style',  //  can be: style|script|template
  ext: '.less'    //  file ext, let cube know which file request should router to this processor
}

/**
 * process code
 * @param  {String}   file     file path, relative to options.root
 * @param  {Object}   options   {root, compress, moduleWrap, qpath}
 * @param  {Function} callback(err, res)
 *                    res {source, code, wraped}
 */
Processor.prototype.process = function (file, options, callback) {
  // your code here
}

module.exports = Processor;

Current Tags

  • 1.0.2                                ...           latest (5 years ago)

2 Versions

  • 1.0.2                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (4)
Dev Dependencies (3)
Dependents (1)

Copyright 2014 - 2017 © taobao.org |