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

jsc

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsc

  • 0.2.3
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

== jsc

jsc, JavaScript Compiler by Davide Saurino http://github.com/sub/jsc

Ruby API to Google Closure Compiler Web service.

== Features

With jsc you can compile your JavaScript code throught {Google Closure Compiler REST service}[http://code.google.com/closure/compiler/].

The package comes with a jsc command which accepts several options, run:

jsc --help

for help.

More in details:

  • Ruby API actually is a single function call, JSCompiler.compile()
  • Handling of JSON responses, parse and print them (same output of the Google web interface!)
  • Handling of Server Errors responses
  • Compile a file or a piece of code
  • Emacs snippet to compile code your code for errors and warnings
  • flymake compatible

Check {Google API Reference}[http://code.google.com/intl/it-IT/closure/compiler/docs/api-ref.html] for more info about accepted parameters.

== Synopsis

Get compiled code, if no errors are found:

jsc js/compiled_code.js

Compile a file, check for errors:

jsc js/errors.js -e

Compile a file, check for warnings:

jsc js/warnings.js -w

Compile a file and get compression stats:

jsc js/compiled_code.js -s

Compile a piece of code, check for errors:

jsc -e -c "function("

Compile a file for both errors and warnings:

jsc js/compiled_code.js -a

== Install

If you have gemcutter in your gem sources, run:

[sudo] gem install jsc

== Emacs+flymake+jsc

For GNU Emacs users, jsc provides a {flymake}[http://www.emacswiki.org/emacs/FlyMake] compatible output. So you can use jsc+flymake to have a syntax check tool running in the background while editing your javascript files. Look at the {wiki page}[http://wiki.github.com/sub/jsc/flymake] for more info.

== Emacs snippet

Do you want to compile your code right from Emacs?

Copy

plugins/jsc.el

to your emacs load-path and restart Emacs.

Now, select the code to compile and run:

  • CcJe to check for errors
  • CcJw to check for warnings.

== Copyright

Copyright (c) 2010 Davide Saurino. See LICENSE for details.

FAQs

Package last updated on 03 Mar 2010

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