@@ -28,6 +28,42 @@ browserify -p tinyify app.js
28
28
- [ browser-pack-flat] [ ] - Output a "flat" bundle, with all modules in a single scope
29
29
- [ minify-stream] [ ] - Uglify the final bundle
30
30
31
+ ## Options
32
+
33
+ Options can be provided on the command line using subarg syntax, or in a separate options object using the browserify API.
34
+
35
+ ### ` env: {} `
36
+
37
+ Supply custom environment variables for [ envify] [ ] .
38
+
39
+ ``` js
40
+ b .plugin (' tinyify' , {
41
+ env: {
42
+ PUBLIC_PATH : ' https://mywebsite.surge.sh/'
43
+ }
44
+ })
45
+ ```
46
+
47
+ This option is only available in the API.
48
+ On the CLI, you can define environment variables beforehand instead:
49
+
50
+ ``` bash
51
+ PUBLIC_PATH=https://mywebsite.surge.sh browserify app.js -p tinyify
52
+ ```
53
+
54
+ ### ` --no-flat ` , ` flat: false `
55
+
56
+ Disable [ browser-pack-flat] [ ] .
57
+ This is useful if you want to generate a [ browser-pack] [ ] style bundle, like required by [ disc] [ ] for example.
58
+
59
+ ``` bash
60
+ browserify app.js -p [ tinyify --no-flat ]
61
+ ```
62
+
63
+ ``` js
64
+ b .plugin (' tinyify' , { flat: false })
65
+ ```
66
+
31
67
## License
32
68
33
69
[ Apache-2.0] ( ./LICENSE.md )
@@ -38,3 +74,5 @@ browserify -p tinyify app.js
38
74
[ common-shakeify ] : https://github.com/goto-bus-stop/common-shakeify
39
75
[ browser-pack-flat ] : https://github.com/goto-bus-stop/browser-pack-flat
40
76
[ minify-stream ] : https://github.com/goto-bus-stop/minify-stream
77
+ [ browser-pack ] : https://github.com/browserify/browser-pack
78
+ [ disc ] : https://github.com/hughsk/disc
0 commit comments