Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

babel-d

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-d

compile directories by babel using in node

  • 0.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

babel-d

在 node 端使用 babel 运行编译某个文件夹下所有js文件到某个指定文件夹。

背景

在使用 babelCompile Directories 时,可以使用 --out-dir 或者 -d 参数。

例如,我们要编译 src 文件夹下所有的js文件,并输出到 lib 文件夹下,则可以执行:

babel src --out-dir lib

# 或者

babel src -d lib

这是通过 babel-cli 来运行的。如果需要在 node 端调用编译某个文件,可以安装 babel-core,并使用其提供的 babel.transformapi。但是这种方式如果处理某个文件夹下所有的文件的编译,则十分不方便,因此本项目就是为了解决这种场景。

参考

Keywords

FAQs

Package last updated on 11 May 2018

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