Browse Source

Break up the gulp website task

Alex Dima 6 năm trước cách đây
mục cha
commit
3664cb4445
3 tập tin đã thay đổi với 260 bổ sung256 xóa
  1. 32 29
      gulpfile.js
  2. 226 226
      package-lock.json
  3. 2 1
      website/.gitignore

+ 32 - 29
gulpfile.js

@@ -519,7 +519,7 @@ function addPluginThirdPartyNotices() {
 // --- website
 
 gulp.task('clean-website', function(cb) { rimraf('../monaco-editor-website', { maxBusyTries: 1 }, cb); });
-gulp.task('website', ['clean-website'], function() {
+gulp.task('build-website', ['clean-website'], function() {
 
 	const initialCWD = process.cwd();
 
@@ -653,40 +653,43 @@ gulp.task('website', ['clean-website'], function() {
 			});
 			fs.unlink('../monaco-editor-website/package.json');
 
-			cp.execSync('git init', {
-				cwd: path.join(__dirname, '../monaco-editor-website')
-			});
-
-			let remoteUrl = cp.execSync('git remote get-url origin')
-			let committerUserName = cp.execSync('git log --format=\'%an\' -1');
-			let committerEmail = cp.execSync('git log --format=\'%ae\' -1');
-
-			cp.execSync(`git config user.name ${committerUserName}`, {
-				cwd: path.join(__dirname, '../monaco-editor-website')
-			});
-			cp.execSync(`git config user.email ${committerEmail}`, {
-				cwd: path.join(__dirname, '../monaco-editor-website')
-			});
-
-			cp.execSync(`git remote add origin ${remoteUrl}`, {
-				cwd: path.join(__dirname, '../monaco-editor-website')
-			});
-			cp.execSync('git checkout -b gh-pages', {
-				cwd: path.join(__dirname, '../monaco-editor-website')
-			});
-			cp.execSync('git add .', {
-				cwd: path.join(__dirname, '../monaco-editor-website')
-			});
-			cp.execSync('git commit -m "Publish website"', {
-				cwd: path.join(__dirname, '../monaco-editor-website')
-			});
-			console.log('RUN monaco-editor-website>git push origin gh-pages --force')
 			this.emit('end');
 		}))
 	);
 
 });
 
+gulp.task('website', ['build-website'], function() {
+	cp.execSync('git init', {
+		cwd: path.join(__dirname, '../monaco-editor-website')
+	});
+
+	let remoteUrl = cp.execSync('git remote get-url origin')
+	let committerUserName = cp.execSync('git log --format=\'%an\' -1');
+	let committerEmail = cp.execSync('git log --format=\'%ae\' -1');
+
+	cp.execSync(`git config user.name ${committerUserName}`, {
+		cwd: path.join(__dirname, '../monaco-editor-website')
+	});
+	cp.execSync(`git config user.email ${committerEmail}`, {
+		cwd: path.join(__dirname, '../monaco-editor-website')
+	});
+
+	cp.execSync(`git remote add origin ${remoteUrl}`, {
+		cwd: path.join(__dirname, '../monaco-editor-website')
+	});
+	cp.execSync('git checkout -b gh-pages', {
+		cwd: path.join(__dirname, '../monaco-editor-website')
+	});
+	cp.execSync('git add .', {
+		cwd: path.join(__dirname, '../monaco-editor-website')
+	});
+	cp.execSync('git commit -m "Publish website"', {
+		cwd: path.join(__dirname, '../monaco-editor-website')
+	});
+	console.log('RUN monaco-editor-website>git push origin gh-pages --force')
+});
+
 gulp.task('generate-test-samples', function() {
 	var sampleNames = fs.readdirSync(path.join(__dirname, 'test/samples'));
 	var samples = sampleNames.map(function(sampleName) {

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 226 - 226
package-lock.json


+ 2 - 1
website/.gitignore

@@ -1 +1,2 @@
-node_modules/monaco-editor/dev
+node_modules/monaco-editor/dev
+node_modules/monaco-editor/esm

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác