New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

babel-install

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-install

Declare & install Babel plugins & transforms the easy way

  • 2.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
295
decreased by-18.28%
Maintainers
1
Weekly downloads
 
Created
Source

babel-install

Declare & install Babel plugins & transforms the easy way

Screengrabs

Getting started

From the command line

npm i babel-install -DE

If you haven't already, add this to your ~/.zshrc or ~/.bashrc and reload your shell. It allows your to run local Node bins as if they were globally installed.

export PATH=./node_modules/.bin:$PATH
CLI usage
babel-install babel-preset-es2015 babel-plugin-transform-async-to-generator babel-plugin-transform-es2015-arrow-functions
# or
babel-install --presets es2015 --plugins transform-async-to-generator transform-es2015-arrow-functions

...which results in

.babelrc

{
  "presets": ["es2015"],
  "plugins": ["transform-es2015-arrow-functions", "transform-async-to-generator"]
}

package.json

{
  "devDependencies": {
    "babel-preset-es2015": "{some latest version here}",
    "babel-plugin-transform-async-to-generator": "{some latest version here}",
    "babel-plugin-transform-es2015-arrow-functions": "{some latest version here}",
  }
}

There are also several aliases installed to cover common typos

  • babel-isntall
  • babelisntall
  • babelinstall

I didn't provide an even shorter command ala bi to prevent conflicts with other libraries. However, if you'd like a shorter command, I recommend creating an alias.

Programmatic Usage
import BabelInstaller from 'babel-install';
BabelInstaller().installAndDeclare(someArrayOfBabelPackageNames, function (installError) {
  return installError ? console.error(installError) : console.info('Install succeeded');

Development

Install pre-commit hook
npm run install-precommit
Roadmap
  • Evaluating adding a --transforms flag that's a special subset of --plugins

Keywords

FAQs

Package last updated on 26 Jan 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc