buildkit
v0.0.1
Published
A Front End Build Kit
Downloads
8
Maintainers
Readme
buildkit
A front-end build kit.
API
It's easy to use.
HTML
minifyHTMLFile(src, dest, [options], [callback])
src
Type: string
The source file or directory.
dest
Type: string
The destination file or directory.
options
Type: object
See html-minifier options.
callback
Type: function
/*! Example */
// Minify File
minifyHTMLFile('index.html', 'index.min.html')
// Minify Directory
minifyHTMLFile('src/', 'build/');
CSS
minifyCSSFile(src, dest, [options], [callback])
src**
Type: string
The source file or directory.
dest
Type: string
The destination file or directory.
options
Type: object
See clean-css options.
callback
Type: function
/*! Example */
// Minify file
minifyCSSFile('style.js', 'style.min.js')
// Merge and minify multi files
minifyCSSFile('css/', 'style.min.js')
// Minify directory
minifyCSSFile('src/css/', 'build/css/');
JS
minifyJSFile(src, dest, [options], [callback])
src**
Type: string
The source file or directory.
dest
Type: string
The destination file or directory.
options
Type: object
See UglifyJS2 options.
callback
Type: function
/*! Example */
// Minify file
minifyJSFile('script.js', 'script.min.js')
// Merge and minify multi files
minifyJSFile('scr/js/', 'script.min.js')
// Minify directory
minifyJSFile('src/js/', 'build/js/')