Merge pull request #952 from mailpoet/assets_manifest

Uses cross-env to set environment variables [MAILPOET-919]
This commit is contained in:
stoletniy
2017-06-21 19:31:20 +03:00
committed by GitHub
2 changed files with 2 additions and 1 deletions

View File

@ -79,7 +79,7 @@ class RoboFile extends \Robo\Tasks {
function compileJs($opts = ['env' => null]) { function compileJs($opts = ['env' => null]) {
$env = ($opts['env']) ? $env = ($opts['env']) ?
sprintf('NODE_ENV="%s"', $opts['env']) : sprintf('./node_modules/cross-env/dist/bin/cross-env.js NODE_ENV="%s"', $opts['env']) :
null; null;
return $this->_exec($env . ' ./node_modules/webpack/bin/webpack.js --bail'); return $this->_exec($env . ' ./node_modules/webpack/bin/webpack.js --bail');
} }

View File

@ -39,6 +39,7 @@
"babel-core": "^5.8.22", "babel-core": "^5.8.22",
"babel-loader": "^5.3.2", "babel-loader": "^5.3.2",
"clean-webpack-plugin": "^0.1.16", "clean-webpack-plugin": "^0.1.16",
"cross-env": "^5.0.1",
"chai": "2.2.0", "chai": "2.2.0",
"chai-jq": "0.0.8", "chai-jq": "0.0.8",
"eslint": "^3.19.0", "eslint": "^3.19.0",