🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

source-rewrite

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

source-rewrite

A command-line tool that lets you rewrite your source with configurable options.

latest
npmnpm
Version
1.0.2
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Source Rewrite

Warning: this tool will delete your inline comments and spaces between lines of code.

Install

Execute npm install source-rewrite -g in your favourite shell.

Rewrite your source code

Use the following convention to rewrite your JavaScript files:

sr -f file.js -i '  ' -q single

meaning that file.js will be overwritten with the new generated code with two spaces for indentation and using single quotes. The available options are:

  • -f --file : Specify the input file
  • -i --indent : Specify the indentation of your choice
  • -q --quotes : Specify the type of quotes you precise
  • -o --output : Specify the output file of the generated code ( same as the input by default)

Keywords

esprima

FAQs

Package last updated on 20 Jan 2015

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