js-onsave

Run yui compressor command when you save a javascript file

FoxinouFR

919

2

0.0.2

MIT

GitHub

js-onsave

Atom package to run the yui compressor when you save a .js file.

Dependencies

The package uses yui compressor which is a binary in Java. To install Java, please visit official website.

Installation

Use atom package manager to install js-onsave.

apm install js-onsave

Configuration file

You need to create a configuration file named .js-onsave.json at the root of the project.

The content of the .js-onsave.json file must be an array of objects with the following properties:

Example

Here is an example of a configuration file.

{
	"inputDir": "resources/js/",
	"outputDir": "public/js/",
	"outputFilename": "$1.min.js",
	"javaBin": "java",
	"showStartup":false,
	"showOutput":true,
	"showError":true
}

Compile SCSS

You can use the scss-onsave package that works the same way for SCSS files.

Credits

This atom package contains the compiled executable of yui-compressor in version 2.4.8.

Source : https://github.com/yui/yuicompressor