File tree Expand file tree Collapse file tree 1 file changed +27
-4
lines changed Expand file tree Collapse file tree 1 file changed +27
-4
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
title : プロダクション環境への配信
3
- updated : 2017-09-08
3
+ updated : 2018-01-16
4
4
type : guide
5
5
order : 401
6
6
---
@@ -47,21 +47,44 @@ module.exports = {
47
47
NODE_ENV=production browserify -g envify -e main.js | uglifyjs -c -m > build.js
48
48
```
49
49
50
- - Or, using [ envify] ( https://github.com/hughsk/envify ) with Gulp:
50
+ - もしくは、 [ envify] ( https://github.com/hughsk/envify ) を Gulp とともに使います :
51
51
52
52
``` js
53
- // Use the envify custom module to specify environment variables
53
+ // 環境変数を指定するために envify のカスタムモジュールを使います
54
54
var envify = require (' envify/custom' )
55
55
56
56
browserify (browserifyOptions)
57
57
.transform (vueify)
58
58
.transform (
59
- // Required in order to process node_modules files
59
+ // node_modules ファイルを処理するために必要です
60
60
{ global: true },
61
61
envify ({ NODE_ENV : ' production' })
62
62
)
63
63
.bundle ()
64
64
```
65
+
66
+ - もしくは、[ envify] ( https://github.com/hughsk/envify ) を Grunt と [ grunt-browserify] ( https://github.com/jmreidy/grunt-browserify ) とともに使います:
67
+
68
+ ``` js
69
+ // 環境変数を指定するために envify のカスタムモジュールを使います
70
+ var envify = require (' envify/custom' )
71
+
72
+ browserify: {
73
+ dist: {
74
+ options: {
75
+ // grunt-browserify のデフォルトの順番から逸脱するための関数
76
+ configure : b => b
77
+ .transform (' vueify' )
78
+ .transform (
79
+ // node_modules ファイルを処理するために必要です
80
+ { global: true },
81
+ envify ({ NODE_ENV : ' production' })
82
+ )
83
+ .bundle ()
84
+ }
85
+ }
86
+ }
87
+ ```
65
88
66
89
#### Rollup
67
90
You can’t perform that action at this time.
0 commit comments