npm.io
0.1.3 • Published 7 years agoCLI

es6-node-elevator

Licence
MIT
Version
0.1.3
Deps
2
Size
3 kB
Vulns
6
Weekly
0
Stars
2

es6-node-elevator

Elevate node modules for easy ES6 import.

Creates entry points for main files for all modules e.g. under node_modules.

Example:

main file entry point
node_modules/lodash/index.js node_modules/lodash.js
node_modules/glob/glob.js node_modules/glob.js

Now, with ES6 imports, you can simply:

import _ from 'node_modules/lodash.js';

Install

Install via npm:

npm i --save -g es6-node-elevator

Use

Command line:

es6-node-elevator

Or programmatically:

var elevator = require('es6-node-elevator');

elevator();
Options
name description default
dir Directory to scrape for modules (directories containing package.json). 'node_modules'
out Directory in which to write entry point files (e.g. lodash.js). 'node_modules'

Keywords