Skip to content

Commit fa69c00

Browse files
vuejs-jp-botkazupon
authored andcommitted
Update deployment.md with Grunt example (vuejs#619)
* Update deployment.md with Grunt example (vuejs#1375) * Update deployment.md with Gulp example * Update deployment.md with Grunt example * Update date
1 parent e974d88 commit fa69c00

File tree

1 file changed

+27
-4
lines changed

1 file changed

+27
-4
lines changed

src/v2/guide/deployment.md

+27-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: プロダクション環境への配信
3-
updated: 2017-09-08
3+
updated: 2018-01-16
44
type: guide
55
order: 401
66
---
@@ -47,21 +47,44 @@ module.exports = {
4747
NODE_ENV=production browserify -g envify -e main.js | uglifyjs -c -m > build.js
4848
```
4949

50-
- Or, using [envify](https://github.com/hughsk/envify) with Gulp:
50+
- もしくは、[envify](https://github.com/hughsk/envify)Gulp とともに使います:
5151

5252
``` js
53-
// Use the envify custom module to specify environment variables
53+
// 環境変数を指定するために envify のカスタムモジュールを使います
5454
var envify = require('envify/custom')
5555

5656
browserify(browserifyOptions)
5757
.transform(vueify)
5858
.transform(
59-
// Required in order to process node_modules files
59+
// node_modules ファイルを処理するために必要です
6060
{ global: true },
6161
envify({ NODE_ENV: 'production' })
6262
)
6363
.bundle()
6464
```
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+
```
6588

6689
#### Rollup
6790

0 commit comments

Comments
 (0)