quick-compile
v0.0.4
Published
Concat and minify src files to paths
Downloads
6
Readme
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 -
String
orArray
of the path or files you are targetting (required)separator -
String
used to separate the files (before compiling)compiler -
Function
that returns modified src, useful for minifyingregex -
RegExp
that is used to determine which files you are targettinglog -
Function
that handles output from quick-compile, can be set to falsecacheFile -
String
of the path to a file a hash cache can be saved to.
More examples are available in the examples folder.