ned-transpile
v1.0.6
Published
Node project transpiler for ned.
Downloads
24
Maintainers
Readme
ned-transpile
An opinionated and simple node project transpiler built on top of babel for ned.
Use with Node => 6.0
- provides async/await
- completes es6 support
- sourcemap support
- provides project root relative requires
- forces strict mode
install
npm install ned-transpile
example
cd my-project
# transpile ./src to ./build (default)
ned-transpile
cd my-project
ned-transpile src foo/build
const transpile = require('ned-transpile')
transpile({
src: srcPath,
dest: destPath,
entries: ['index.js', 'bin/foo.js']
}).then(() => {
console.log('Done!')
})
cli help
Usage: ned-transpile [options] [src] [dest]
Options:
-h, --help output usage information
-e, --entry <path> you may specify this argument multiple times
-v, --verbose additional console logging
Defaults:
[src] ./src
[dest] ./build
API
transpile(options)
options: object
src: string
Path to directory containing a node project to be transpileddest: string
Path to directory where transpiled project will be outputentries: [], ['index.js]
Application entry points. Defaults toindex.js
.verbose: boolean, false
additional console logging
- returns:
promise