瀏覽代碼

gupfile website: temporarily create package.json

Martin Aeschlimann 9 年之前
父節點
當前提交
e7a464ac1a
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      gulpfile.js

+ 5 - 0
gulpfile.js

@@ -359,9 +359,14 @@ gulp.task('website', ['clean-website', 'playground-samples'], function() {
 		.pipe(es.through(function(data) {
 			this.emit('data', data);
 		}, function() {
+
+			// temporarily create package.json so that npm install doesn't bark
+			fs.writeFileSync('../monaco-editor-website/package.json', '{}');
 			cp.execSync('npm install monaco-editor', {
 				cwd: path.join(__dirname, '../monaco-editor-website')
 			});
+			fs.unlink('../monaco-editor-website/package.json');
+
 			cp.execSync('git init', {
 				cwd: path.join(__dirname, '../monaco-editor-website')
 			});