提交 ff556156 编写于 作者: J Joao Moreno

fix nsfw for gulp watch

上级 3fa27841
.yarnrc
\ No newline at end of file
......@@ -5,6 +5,7 @@
const cp = require('child_process');
const path = require('path');
const fs = require('fs');
const yarn = process.platform === 'win32' ? 'yarn.cmd' : 'yarn';
function yarnInstall(location, opts) {
......@@ -46,15 +47,22 @@ const extensions = [
extensions.forEach(extension => yarnInstall(`extensions/${extension}`));
function yarnInstallBuildDependencies() {
// make sure we install gulp watch for the system installed
// make sure we install the deps of build/lib/watch for the system installed
// node, since that is the driver of gulp
const env = Object.assign({}, process.env);
const watchPath = path.join(path.dirname(__dirname), 'lib', 'watch');
const yarnrcPath = path.join(watchPath, '.yarnrc');
delete env['npm_config_disturl'];
delete env['npm_config_target'];
delete env['npm_config_runtime'];
const disturl = 'https://nodejs.org/download/release';
const target = process.versions.node;
const runtime = 'node';
yarnInstall(path.join(path.dirname(__dirname), 'lib', 'watch'), { env });
const yarnrc = `disturl "${disturl}"
target "${target}"
runtime "${runtime}"`;
fs.writeFileSync(yarnrcPath, yarnrc, 'utf8');
yarnInstall(watchPath, { env });
}
yarnInstall(`build`); // node modules required for build
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册