Skip to content

m59peacemaker/ned-transpile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 transpiled
    • dest: string Path to directory where transpiled project will be output
    • entries: [], ['index.js] Application entry points. Defaults to index.js.
    • verbose: boolean, false additional console logging
  • returns: promise

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published