2.1.3 • Published 5 years ago

babel-config-installer.js v2.1.3

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

babel-config-installer.js

Stop typing yarn install @babel.... Leverage the most recent babel.config.js that you've already authored on a separate project. Absurdly convenient convenience method. node babel-config-installer.js

Usage, Happy Path

node babel-config-installer.js

Using babel-config-installer.js, yarn

Change to project directory.

yarn add babel-config-installer.js
node node_modules/babel-config-installer.js/babel-config-installer.js

Using Existing babel-config-installer.js, yarn

Change directory to the local working directory for this project. Then:

yarn link

Now change directory, cd, to your project that needs to use the local babel-config-installer.js install and run:

	yarn link babel-config-installer.js

Using with Non Traditional babel.config.js locations

The below examples are equivalent. babel-config-installer.js will install plugins and presets listed in test-data/babel.config.js even if you omit the config filename. Convenient!

	node babel-config-installer.js  test-data
	node babel-config-installer.js  .././test-data
	node babel-config-installer.js  test-data/babel.config.js
cd test-data
node ../babel-config-installer.js

Usage: Use by Copying Example

  1. Copy your babel.config.js into project root directory
  2. Copy babel-config-installer.js into project root
  3. Execute babel-config-installer.js
	node babel-config-installer.js

This script will install all position index 0 of all packages listed, in Array, under both presets and plugins from babel.config.js. See test-data/babel.config.js

Bugs, Improvements

Post an issue or send an email. Don't bother with carrier pigeons or messages in bottles.

Developing, Development, Working on project files

There is a TODO list. Email if you're looking to generally assist. If you're on a mission, send well tested patches through Github Pull Request system.

Future

If there is any interest or practical need to add additional command line configurations or to allow importing some or parts of the tech employed, it's a worthy pursuit.