Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Stupidly simple command line tool for squashing JS and CSS files. Used mostly for building UserJS

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 bin
Octocat-spinner-32 example
Octocat-spinner-32 lib
Octocat-spinner-32 spec
Octocat-spinner-32 README.md
Octocat-spinner-32 Rakefile
README.md

JavaScript preprocessor

Minimal preprocessing with /*>*/

Usage

jspp input > output

Example

main.js
/*> script.js */

var style = "/*> css/style.css */";
css/style.css
html, body {margin:0; padding:0}
/*> http://js-preprocessor.com/example/css/child.css */
.my-style {background: #fffacc}

css/child.css
.i-am-child {}

script.js
var my_script;
$ jspp example/main.js
var my_script;

var style = "html, body {margin:0; padding:0}\
.i-am-child {}\
.my-style {background: #fffacc}"

JavaScript preprocessor in a wild: GitHub Live Preview, Faviconize Google, Nice Alert.

Installation

Ruby gem

$ gem install jspp

Why reinvent the wheel?

Sprockets can't include non-JS files. JS preprocessor can.

Juicer don't have any analogies to "/*> some_file */". I.e., it can't include files as multiline string.

Something went wrong with that request. Please try again.