mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-02 19:03:38 +02:00
Update publish-gh.js after running Prettier
This commit is contained in:
parent
8074b96c79
commit
d89abde579
3 changed files with 10 additions and 10 deletions
|
@ -71,7 +71,7 @@ if (CURRENT_BRANCH === DEPLOYMENT_BRANCH) {
|
||||||
shell.exit(1);
|
shell.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (shell.exec(`node ${path.join(__dirname, "build-files.js")}`).code) {
|
if (shell.exec(`node ${path.join(__dirname, 'build-files.js')}`).code) {
|
||||||
shell.echo('Error: generating html failed');
|
shell.echo('Error: generating html failed');
|
||||||
shell.exit(1);
|
shell.exit(1);
|
||||||
}
|
}
|
||||||
|
@ -111,15 +111,15 @@ shell.exec('git rm -rf .');
|
||||||
shell.cd('../..');
|
shell.cd('../..');
|
||||||
|
|
||||||
shell.cp(
|
shell.cp(
|
||||||
"-R",
|
'-R',
|
||||||
// in github.io case, project is deployed to root. need to not recursively
|
// in github.io case, project is deployed to root. need to not recursively
|
||||||
// copy the deployment-branch to be.
|
// copy the deployment-branch to be.
|
||||||
// The !(...) represents the same thing as "everything but this"
|
// The !(...) represents the same thing as "everything but this"
|
||||||
// Copies everything in /build except the directory after the !.
|
// Copies everything in /build except the directory after the !.
|
||||||
path.join("build", PROJECT_PATH, `!(${PROJECT_NAME}-${DEPLOYMENT_BRANCH})`),
|
path.join('build', PROJECT_PATH, `!(${PROJECT_NAME}-${DEPLOYMENT_BRANCH})`),
|
||||||
path.join("build", `${PROJECT_NAME}-${DEPLOYMENT_BRANCH}`)
|
path.join('build', `${PROJECT_NAME}-${DEPLOYMENT_BRANCH}`)
|
||||||
);
|
);
|
||||||
shell.cd(path.join("build", `${PROJECT_NAME}-${DEPLOYMENT_BRANCH}`));
|
shell.cd(path.join('build', `${PROJECT_NAME}-${DEPLOYMENT_BRANCH}`));
|
||||||
|
|
||||||
const currentCommit = shell.exec('git rev-parse HEAD').stdout.trim();
|
const currentCommit = shell.exec('git rev-parse HEAD').stdout.trim();
|
||||||
|
|
||||||
|
|
6
package-lock.json
generated
6
package-lock.json
generated
|
@ -1600,9 +1600,9 @@
|
||||||
"integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="
|
"integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="
|
||||||
},
|
},
|
||||||
"prettier": {
|
"prettier": {
|
||||||
"version": "1.7.4",
|
"version": "1.8.2",
|
||||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-1.7.4.tgz",
|
"resolved": "https://registry.npmjs.org/prettier/-/prettier-1.8.2.tgz",
|
||||||
"integrity": "sha1-XoYkrpNjyA+V7GRFhOzfVddPk/o="
|
"integrity": "sha512-fHWjCwoRZgjP1rvLP7OGqOznq7xH1sHMQUFLX8qLRO79hI57+6xbc5vB904LxEkCfgFgyr3vv06JkafgCSzoZg=="
|
||||||
},
|
},
|
||||||
"private": {
|
"private": {
|
||||||
"version": "0.1.8",
|
"version": "0.1.8",
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
"format:source": "prettier --config .prettierrc --write \"lib/**/*.js\"",
|
"format:source": "prettier --config .prettierrc --write \"lib/**/*.js\"",
|
||||||
"format:examples": "prettier --config .prettierrc --write \"examples/**/*.js\"",
|
"format:examples": "prettier --config .prettierrc --write \"examples/**/*.js\"",
|
||||||
"nit:source": "prettier --config .prettierrc --list-different \"lib/**/*.js\"",
|
"nit:source": "prettier --config .prettierrc --list-different \"lib/**/*.js\"",
|
||||||
"nit:examples": "prettier --config .prettierrc --list-different \"examples/**/*.js\"",
|
"nit:examples": "prettier --config .prettierrc --list-different \"examples/**/*.js\"",
|
||||||
"prettier": "yarn format:source && yarn format:examples",
|
"prettier": "yarn format:source && yarn format:examples",
|
||||||
"prettier:diff": "yarn nit:source && yarn nit:examples"
|
"prettier:diff": "yarn nit:source && yarn nit:examples"
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue