babel-config-installer.js v2.1.3
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.jsUsing 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.jsUsing Existing babel-config-installer.js, yarn
Change directory to the local working directory for this project. Then:
yarn linkNow change directory, cd, to your project that needs to use the local babel-config-installer.js install and run:
yarn link babel-config-installer.jsUsing 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.jscd test-data
node ../babel-config-installer.jsUsage: Use by Copying Example
- Copy your babel.config.js into project root directory
- Copy babel-config-installer.js into project root
- Execute babel-config-installer.js
node babel-config-installer.jsThis 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.