wepp
node based LESS and JavaScript preprocessor
Deprecated. wepp is a Node.js module that processes LESS and JavaScript files in order to combine and minify them for production use. It depends on and makes use of fQuery. It uses less.js to process LESS files and cssmin.js (from the JavaScript port of the CSS minification tool distributed with YUICompressor) to compress CSS files.
It's also possible to include JavaScript files into other JavaScript files. The syntax is:
// @include 'path/to/other/file.js'
the specified file will be looked up relative to the including file and its content will be copied into place. For JavaScript compression wepp uses UglifyJS.
Installation
Install wepp globally with npm:
> npm install -g wepp
Usage
Command line
> wepp --help
Usage: wepp [Options] --inFile <FILE> --outFile <FILE>
wepp [Options] --inDir <DIR> --outDir <DIR>
Options:
-h, --help output usage information
-V, --version output the version number
--inFile [file] source file
--outFile [file] target file
--inDir [dir] source directory
--outDir [dir] target directory
--charset [string] [NOT USED] source and target file encoding
--linebreak [int] max line length in target files
--no-compression turns off file compression
--strip-header strips even header comments in case of compression
--size prints file size and zipped file size of processed files
--overwrite overwrites already existing targets files
JavaScript
var wepp = require('wepp');
wepp.processFile(options, inFile, outFile)
Have a look at the API for a complete list of methods and options.
API
processFile
wepp.processFile(options: Options, inFile: String, outFile: String)
processDir
wepp.processDir(options: Options, inDir: String, outDir: String)
Options
Options {
// [UNUSED] source and target file encoding
charset: 'utf-8'
// max line length in target files
// -1: no line breaks
linebreak: -1
// use compression for target files
compression: true
// strips even header comments in case of compression
stripHeader: false
// prints file size and zipped file size of processed files
size: false
// overwrites already existing targets files
overwrite: false
}