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

yarn: initial commit

上级 4e172cd1
disturl "https://atom.io/download/electron"
target "1.7.9"
runtime "electron"
......@@ -57,6 +57,7 @@ const indentationFilter = [
'!**/*.template',
'!**/*.yaml',
'!**/*.yml',
'!**/yarn.lock',
'!**/lib/**',
'!extensions/**/*.d.ts',
'!src/typings/**/*.d.ts',
......
......@@ -5,21 +5,23 @@
const cp = require('child_process');
const path = require('path');
const npm = process.platform === 'win32' ? 'npm.cmd' : 'npm';
const yarn = process.platform === 'win32' ? 'yarn.cmd' : 'yarn';
function npmInstall(location, opts) {
process.exit(0);
function yarnInstall(location, opts) {
opts = opts || {};
opts.cwd = location;
opts.stdio = 'inherit';
const result = cp.spawnSync(npm, ['install'], opts);
const result = cp.spawnSync(yarn, ['install'], opts);
if (result.error || result.status !== 0) {
process.exit(1);
}
}
npmInstall('extensions'); // node modules shared by all extensions
yarnInstall('extensions'); // node modules shared by all extensions
const extensions = [
'vscode-api-tests',
......@@ -43,9 +45,9 @@ const extensions = [
'jake'
];
extensions.forEach(extension => npmInstall(`extensions/${extension}`));
extensions.forEach(extension => yarnInstall(`extensions/${extension}`));
function npmInstallBuildDependencies() {
function yarnInstallBuildDependencies() {
// make sure we install gulp watch for the system installed
// node, since that is the driver of gulp
const env = Object.assign({}, process.env);
......@@ -54,9 +56,9 @@ function npmInstallBuildDependencies() {
delete env['npm_config_target'];
delete env['npm_config_runtime'];
npmInstall(path.join(path.dirname(__dirname), 'lib', 'watch'), { env });
yarnInstall(path.join(path.dirname(__dirname), 'lib', 'watch'), { env });
}
npmInstall(`build`); // node modules required for build
npmInstall('test/smoke'); // node modules required for smoketest
npmInstallBuildDependencies(); // node modules for watching, specific to host node version, not electron
\ No newline at end of file
yarnInstall(`build`); // node modules required for build
yarnInstall('test/smoke'); // node modules required for smoketest
yarnInstallBuildDependencies(); // node modules for watching, specific to host node version, not electron
\ No newline at end of file
......@@ -3,13 +3,8 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
if (process.env['npm_config_disturl'] !== 'https://atom.io/download/electron') {
console.error("You can't use plain npm to install Code's dependencies.");
console.error(
/^win/.test(process.platform)
? "Please run '.\\scripts\\npm.bat install' instead."
: "Please run './scripts/npm.sh install' instead."
);
if (!/yarn\.js$/.test(process.env['npm_execpath'])) {
console.error('*** Please use yarn to install dependencies.\n');
process.exit(1);
}
\ No newline at end of file
}
......@@ -306,9 +306,9 @@
"resolved": "https://registry.npmjs.org/node-pty/-/node-pty-0.7.3.tgz",
"dependencies": {
"nan": {
"version": "2.5.0",
"from": "nan@2.5.0",
"resolved": "https://registry.npmjs.org/nan/-/nan-2.5.0.tgz"
"version": "2.6.2",
"from": "nan@2.6.2",
"resolved": "https://registry.npmjs.org/nan/-/nan-2.6.2.tgz"
}
}
},
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册