Răsfoiți Sursa

gupfile website: temporarily create package.json

Martin Aeschlimann 9 ani în urmă
părinte
comite
e7a464ac1a
1 a modificat fișierele cu 5 adăugiri și 0 ștergeri
  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) {
 		.pipe(es.through(function(data) {
 			this.emit('data', data);
 			this.emit('data', data);
 		}, function() {
 		}, 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', {
 			cp.execSync('npm install monaco-editor', {
 				cwd: path.join(__dirname, '../monaco-editor-website')
 				cwd: path.join(__dirname, '../monaco-editor-website')
 			});
 			});
+			fs.unlink('../monaco-editor-website/package.json');
+
 			cp.execSync('git init', {
 			cp.execSync('git init', {
 				cwd: path.join(__dirname, '../monaco-editor-website')
 				cwd: path.join(__dirname, '../monaco-editor-website')
 			});
 			});