From 62a0d07f5675ca0e860350777c5092aad8151201 Mon Sep 17 00:00:00 2001 From: Stefan Grund Date: Wed, 10 Jan 2018 18:32:33 +0100 Subject: [PATCH 1/4] Update deployment.md with Grunt example (#1375) --- src/v2/guide/deployment.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/v2/guide/deployment.md b/src/v2/guide/deployment.md index edb599a98..f2b874b3a 100644 --- a/src/v2/guide/deployment.md +++ b/src/v2/guide/deployment.md @@ -62,6 +62,29 @@ NODE_ENV=production browserify -g envify -e main.js | uglifyjs -c -m > build.js ) .bundle() ``` + +- Or, using [envify](https://github.com/hughsk/envify) with Grunt and [grunt-browserify](https://github.com/jmreidy/grunt-browserify): + + ``` js + // Use the envify custom module to specify environment variables + var envify = require('envify/custom') + + browserify: { + dist: { + options: { + // Function to deviate from grunt-browserify's default order + configure: b => b + .transform('vueify') + .transform( + // Required in order to process node_modules files + { global: true }, + envify({ NODE_ENV: 'production' }) + ) + .bundle() + } + } + } + ``` #### Rollup From 64a3590ef18fb13a2acdf7942dfe0a9fa630d434 Mon Sep 17 00:00:00 2001 From: re-fort Date: Tue, 16 Jan 2018 22:48:23 +0900 Subject: [PATCH 2/4] Update deployment.md with Gulp example --- src/v2/guide/deployment.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/v2/guide/deployment.md b/src/v2/guide/deployment.md index f2b874b3a..977f2a91d 100644 --- a/src/v2/guide/deployment.md +++ b/src/v2/guide/deployment.md @@ -47,16 +47,16 @@ module.exports = { NODE_ENV=production browserify -g envify -e main.js | uglifyjs -c -m > build.js ``` -- Or, using [envify](https://github.com/hughsk/envify) with Gulp: +- もしくは、[envify](https://github.com/hughsk/envify)を Gulp とともに使います: ``` js - // Use the envify custom module to specify environment variables + // 環境変数を指定するために envify のカスタムモジュールを使います var envify = require('envify/custom') browserify(browserifyOptions) .transform(vueify), .transform( - // Required in order to process node_modules files + // node_modules ファイルを処理するために必要です { global: true }, envify({ NODE_ENV: 'production' }) ) From 2b05a53764c0959d6fa403b3c2abc9e1df021109 Mon Sep 17 00:00:00 2001 From: re-fort Date: Tue, 16 Jan 2018 22:48:36 +0900 Subject: [PATCH 3/4] Update deployment.md with Grunt example --- src/v2/guide/deployment.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/v2/guide/deployment.md b/src/v2/guide/deployment.md index 977f2a91d..18b866a15 100644 --- a/src/v2/guide/deployment.md +++ b/src/v2/guide/deployment.md @@ -63,20 +63,20 @@ NODE_ENV=production browserify -g envify -e main.js | uglifyjs -c -m > build.js .bundle() ``` -- Or, using [envify](https://github.com/hughsk/envify) with Grunt and [grunt-browserify](https://github.com/jmreidy/grunt-browserify): +- もしくは、[envify](https://github.com/hughsk/envify) を Grunt と [grunt-browserify](https://github.com/jmreidy/grunt-browserify) とともに使います: ``` js - // Use the envify custom module to specify environment variables + // 環境変数を指定するために envify のカスタムモジュールを使います var envify = require('envify/custom') browserify: { dist: { options: { - // Function to deviate from grunt-browserify's default order + // grunt-browserify のデフォルトの順番から逸脱するための関数 configure: b => b .transform('vueify') .transform( - // Required in order to process node_modules files + // node_modules ファイルを処理するために必要です { global: true }, envify({ NODE_ENV: 'production' }) ) From 6bcc9da56f02a8290601081e9c1ad51c42c43e74 Mon Sep 17 00:00:00 2001 From: re-fort Date: Tue, 16 Jan 2018 22:52:17 +0900 Subject: [PATCH 4/4] Update date --- src/v2/guide/deployment.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/v2/guide/deployment.md b/src/v2/guide/deployment.md index 18b866a15..4a8217022 100644 --- a/src/v2/guide/deployment.md +++ b/src/v2/guide/deployment.md @@ -1,6 +1,6 @@ --- title: プロダクション環境への配信 -updated: 2017-09-08 +updated: 2018-01-16 type: guide order: 401 ---