Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
babel-install
Advanced tools
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
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.
import BabelInstaller from 'babel-install';
BabelInstaller().installAndDeclare(someArrayOfBabelPackageNames, function (installError) {
return installError ? console.error(installError) : console.info('Install succeeded');
npm run install-precommit
--transforms
flag that's a special subset of --plugins
v2.0.0
'save-dev'
instead of 'saveDev'
'save-exact'
instead of 'saveExact'
babel-install
:
FAQs
Declare & install Babel plugins & transforms the easy way
The npm package babel-install receives a total of 251 weekly downloads. As such, babel-install popularity was classified as not popular.
We found that babel-install demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.