mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 07:00:11 +01:00
Break up the gulp website task
This commit is contained in:
parent
0f4f663181
commit
3664cb4445
3 changed files with 637 additions and 633 deletions
61
gulpfile.js
61
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) {
|
||||
|
|
|
|||
1206
package-lock.json
generated
1206
package-lock.json
generated
File diff suppressed because it is too large
Load diff
1
website/.gitignore
vendored
1
website/.gitignore
vendored
|
|
@ -1 +1,2 @@
|
|||
node_modules/monaco-editor/dev
|
||||
node_modules/monaco-editor/esm
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue