🚀 Socket Launch Week 🚀 Day 1: Introducing .NET Support in Socket.Learn More
Socket
Sign inDemoInstall
Socket

@babel/cli

Package Overview
Dependencies
Maintainers
4
Versions
134
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/cli

Babel command line.

7.27.0
latest
Source
npm
Version published
Weekly downloads
3M
-3.13%
Maintainers
4
Weekly downloads
 
Created

What is @babel/cli?

The @babel/cli package is a command-line interface for Babel, a widely used JavaScript compiler. It allows developers to compile their JavaScript files using Babel directly from the command line. This package is particularly useful for compiling modern JavaScript down to a version that is compatible with older browsers or environments. It supports various functionalities such as file transformation, watching files for changes, and outputting the compiled code.

What are @babel/cli's main functionalities?

File Transformation

This feature allows you to transform a single JavaScript file. The command takes an input file (src/index.js) and compiles it into an output file (compiled.js).

babel src/index.js --out-file compiled.js

Directory Transformation

Transforms all JavaScript files in a directory. This command compiles all files in the 'src' directory and outputs the compiled files into the 'lib' directory.

babel src --out-dir lib

Watch Mode

Automatically recompiles files when they change. This command watches all files in the 'src' directory for changes and recompiles them to the 'lib' directory whenever any file is modified.

babel src --watch --out-dir lib

Other packages similar to @babel/cli

Keywords

6to5

FAQs

Package last updated on 24 Mar 2025

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