quick-compile v0.0.4
quick-compile
This is a very easy to use file concatenator and writer.
Example
This script reads all the files in ./vendors/css and then combines them with the files in ./files/css
and then writes them to resources/styles.css
var quickCompile = require("quick-compile")
var options = {
files: {
"resources/styles.css": ["./vendors/css", "./files/css"]
},
separator: "\n"
}
compiler = new quickCompile(options)
compiler.generate()Options
quick-compile has many useful options that help you configure the way files are concatenated.
files -
StringorArrayof the path or files you are targetting (required)separator -
Stringused to separate the files (before compiling)compiler -
Functionthat returns modified src, useful for minifyingregex -
RegExpthat is used to determine which files you are targettinglog -
Functionthat handles output from quick-compile, can be set to falsecacheFile -
Stringof the path to a file a hash cache can be saved to.
More examples are available in the examples folder.