mirror of
https://github.com/google/blockly.git
synced 2026-01-07 00:50:27 +01:00
chore(build): Remove prepare script; run deps script from start script (#6653)
To make `npm install` and `npm ci` faster, and to avoid redundant work when doing either of these followed by `npm run build` (or any other script which does a build), delete the `prepare` script and instead add an invocation of `npm run deps` to the beginning of the `start` script.
This commit is contained in:
committed by
GitHub
parent
983a8be441
commit
e3c04978f3
@@ -41,7 +41,6 @@ module.exports = {
|
||||
gitUpdateGithubPages: gitTasks.updateGithubPages,
|
||||
|
||||
// Manually-invokable targets, with prequisites where required.
|
||||
prepare: buildTasks.prepare,
|
||||
format: buildTasks.format,
|
||||
messages: buildTasks.messages, // Generate msg/json/en.json et al.
|
||||
sortRequires: cleanupTasks.sortRequires,
|
||||
|
||||
@@ -44,13 +44,12 @@
|
||||
"minify": "gulp minify",
|
||||
"package": "gulp package",
|
||||
"postinstall": "patch-package",
|
||||
"prepare": "gulp prepare",
|
||||
"prepareDemos": "gulp prepareDemos",
|
||||
"publish": "npm ci && gulp publish",
|
||||
"publish:beta": "npm ci && gulp publishBeta",
|
||||
"recompile": "gulp recompile",
|
||||
"release": "gulp gitCreateRC",
|
||||
"start": "concurrently -n tsc,server \"tsc --watch --preserveWatchOutput --outDir 'build/src' --declarationDir 'build/declarations'\" \"http-server ./ -s -o /tests/playground.html -c-1\"",
|
||||
"start": "npm run deps && concurrently -n tsc,server \"tsc --watch --preserveWatchOutput --outDir 'build/src' --declarationDir 'build/declarations'\" \"http-server ./ -s -o /tests/playground.html -c-1\"",
|
||||
"tsc": "gulp tsc",
|
||||
"test": "gulp test",
|
||||
"test:generators": "gulp testGenerators",
|
||||
|
||||
@@ -288,25 +288,6 @@ const JSCOMP_OFF = [
|
||||
'visibility',
|
||||
];
|
||||
|
||||
/**
|
||||
* The npm prepare script, run by npm install after installing modules
|
||||
* and as part of the packaging process.
|
||||
*
|
||||
* This does just enough of the build that npm start should work.
|
||||
*
|
||||
* Exception: when running in the CI environment, we don't build
|
||||
* anything. We don't need to, because npm test will build everything
|
||||
* needed, and we don't want to, because a tsc error would prevent
|
||||
* other workflows (like lint and format) from completing.
|
||||
*/
|
||||
function prepare(done) {
|
||||
if (process.env.CI) {
|
||||
done();
|
||||
return;
|
||||
}
|
||||
return exports.deps(done);
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds Blockly as a JS program, by running tsc on all the files in
|
||||
* the core directory.
|
||||
@@ -760,7 +741,6 @@ exports.minify = gulp.series(exports.deps, buildCompiled);
|
||||
exports.build = gulp.parallel(exports.minify, exports.langfiles);
|
||||
|
||||
// Manually-invokable targets, with prequisites where required.
|
||||
exports.prepare = prepare;
|
||||
exports.format = format;
|
||||
exports.messages = generateMessages; // Generate msg/json/en.json et al.
|
||||
exports.buildAdvancedCompilationTest =
|
||||
|
||||
Reference in New Issue
Block a user