The script processes each section of the component, and then packs it back. You can use standard section handlers or write your own By default, script processing only <script> section (via javascript-obfuscator), other is copied.
--source --src
Input directory
--dist
Output directory
--create-conf -c
Copy default section processor to current dir
--alt-handler --alt
Path to custom section handler
--rewrite -r
If passed, then origin file fill be overwritten
--verbose -v
Pring trace info
--exclude
Exclude some files from processing
At first your handler must have module.exports, like:
module.exports = {
options: {
entry:'src',
dist:'repacked',
exclude:[],
verbose: false,
overwrite: false,
copyOther: false
},
template: function(obj),
script: function(obj),
style: function(obj),
customBlock: function(obj)
}
This options may be overwritten with the global options
template/style/script/customBlock
retrieves block object and must return string.