File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed
Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,36 @@ browserify app.js -p [ tinyify --no-flat ]
6868b .plugin (' tinyify' , { flat: false })
6969```
7070
71+ ## More options?
72+
73+ If you need further customisation, I recommend installing the tools separately instead:
74+
75+ ``` bash
76+ npm install --save-dev unassertify envify uglifyify common-shakeify browser-pack-flat uglify-js
77+ browserify entry.js \
78+ -g unassertify \
79+ -g envify \
80+ -g uglifyify \
81+ -p common-shakeify \
82+ -p browser-pack-flat/plugin \
83+ | uglifyjs -cm \
84+ > output.js
85+ ```
86+
87+ Or with the Node API:
88+
89+ ``` js
90+ browserify (' entry.js' )
91+ .transform (' unassertify' , { global: true })
92+ .transform (' envify' , { global: true })
93+ .transform (' uglifyify' , { global: true })
94+ .plugin (' common-shakeify' )
95+ .plugin (' browser-pack-flat/plugin' )
96+ .bundle ()
97+ .pipe (require (' minify-stream' )())
98+ .pipe (fs .createWriteStream (' ./output.js' ))
99+ ```
100+
71101## License
72102
73103[ Apache-2.0] ( ./LICENSE.md )
You can’t perform that action at this time.
0 commit comments