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

@swc/cli

Package Overview
Dependencies
Maintainers
2
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@swc/cli

CLI for the swc project

  • 0.2.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
950K
decreased by-24.88%
Maintainers
2
Weekly downloads
 
Created

What is @swc/cli?

@swc/cli is a command-line interface for the SWC (Speedy Web Compiler) project, which is a super-fast TypeScript/JavaScript compiler written in Rust. It is designed to be a drop-in replacement for Babel, offering similar functionalities but with significantly improved performance.

What are @swc/cli's main functionalities?

Transpile JavaScript/TypeScript

This command transpiles a JavaScript or TypeScript file from 'input.js' to 'output.js'. SWC can handle modern JavaScript and TypeScript syntax and transform it into a format that is compatible with older environments.

swc input.js -o output.js

Watch Mode

This command runs SWC in watch mode, which means it will continuously watch the 'input.js' file for changes and recompile it to 'output.js' whenever a change is detected.

swc input.js -o output.js -w

Source Maps

This command generates source maps for the transpiled code, which can be very useful for debugging. The source maps help map the transpiled code back to the original source code.

swc input.js -o output.js --source-maps

Configuration File

This command allows you to specify a configuration file for SWC. The configuration file (.swcrc) can contain various options for customizing the behavior of the compiler.

swc -C path/to/.swcrc

Other packages similar to @swc/cli

Keywords

FAQs

Package last updated on 24 Jan 2024

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