mercury-jsx-folder

1.1.0 • Public • Published

mercury-jsx-folder

Convert a folder of .jsx files into standard .js files - uses mercury-jsx

Travis

install

$ npm install mercury-jsx-folder

usage

var processFolder = require('mercury-jsx-folder')
 
var processor = processFolder({
    source:__dirname + '/fixtures/src',
    dest:__dirname + '/fixtures/build'
})
 
processor.on('file', function(source, target){
    console.log('processing: ' + path)
})
 
processor.run(function(err){
    console.log('all .jsx have been processed into .js')
})

The above example will load all .jsx files from __dirname + '/fixtures/src' and pipe them via a mercury-jsx.

The results of each file will be written to __dirname + '/fixtures/build' with the .jsx suffix replaced with .js

cli

To use as a command line application:

$ mercury-jsx-folder -i fixtures/src -o fixtures/build

license

MIT

Package Sidebar

Install

npm i mercury-jsx-folder

Weekly Downloads

0

Version

1.1.0

License

MIT

Last publish

Collaborators

  • binocarlos