Skip to content

AndersDJohnson/es6-node-elevator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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';

Use

Command line:

npx es6-node-elevator

Or programmatically:

npm add -D es6-node-elevator
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'

About

Elevate node modules for easy ES6 import.

Resources

License

Stars

Watchers

Forks

Packages

No packages published