granule
v0.0.11
Published
Granule is a fs and build helpers.
Downloads
6
Readme
Granule is a fs and build helpers.
Usage
$ node scripts/build.js
// use babel from code
const babel = require('babel-core');
const granule = require('granule');
granule(
granule.readFile(__dirname, '../.babelrc'),
JSON.parse,
babelConfig => granule(
granule.getDirFiles(__dirname, '../src'),
file => Object.assign(file, { content: babel.transform(file.content, babelConfig).code }),
granule.moveFile(__dirname, '../build')
)
);