mirror of
https://github.com/google/blockly.git
synced 2026-01-11 10:57:07 +01:00
* feat(build): Make build tasks invoke their prerequisites
- Divide gulp targets into three kinds: main sequence,
manually invokable, and script-only. The first two categories
automatically invoke their prerequisites.
- Give (most of) the affected gulp targets shorter and more memorable
names that could become their npm script names in future.
* feat(build): Make package tasks invoke their prerequisites
Have the package task invoke the cleanBuildDir (as well as
cleanPackageDir) and build tasks. Remove the checkBuildDir
task as it is now redundant since a fresh build is done every
time.
* feat(build): Make git tasks invoke their prerequisites
* feat(build): Make cleanup, license [sic] tasks invoke their prerequisites
Turns out they don't have any, so this commit just classifies
their gulp targets according to the established scheme.
* feat(build): Make appengine tasks invoke their prerequisites
In this case prepareDeployDir will eventually depend on package
but does not for now.
* feat(build): Have npm scripts run npm ci first where applicable
Have any npm script that have external effects (e.g. publishing an
npm package, pushing a new version to appengine, or updating GitHub
Pages) start by running npm ci to ensure that all dependencies are
up-to-date with respect to package-lock.json.
(This is done by npm and not a gulp script because gulp itself
might need updating. So might npm, but that is less likely to
make any difference to what gets published/pushed.)
* chore(build): have tests use package target
Have the tests just run the package target (with debug flags)
since that runs the the build target automatically.
* feat(tests): Write Closure Compiler output directly to dist/
Since they are already UMD-wrapped, have Closure Compiler write
output chunks directly to RELEASE_DIR, i.e. dist/.
* chore(tests): Use freshly-build files in compressed mode.
Use the freshly-built build/*_compresssed.js files when bootstrapping
in compressed mode, rather than using the checked-in files in the
repository root.
This helps ensure that compressed and uncompressed mode will be
testing (as closely as possible) the same code.
Obsoletes #6218 (though the issues discussed there have not actually
yet been addressed in this branch).
* chore(build): Write intermediate langfiles to build/msg
Write the results of create_messages.py to build/msg instead of
build/msg/js.
* fix(build): Use build/msg/en.js instead of msg/messages.js in tests
This has no direct effect but fixes a long-standing misdesign
where we are testing against the input to, rather than the output
of, the language file processing pipeline.
* feat(demos): Use freshly-built files
Use the freshly-built dist/*_compresssed.js and build/msg/* files
rather than using the checked-in files in the repository root.
This helps ensure that these demos are using the most recent
version of Blockly (even in the develop branch).
* fix(build): Update appengine deployment to include built files
Modify the prepareDemos task as follows:
- Use the git index instead of HEAD, so that most local changes
will be applied (without copying whatever .gitignored cruft
might be in the local directory).
- Run clean and build and then copy build/msg and
dist/*_compressed.js* to the deploy directory.
This fixes the problem created by the previous commit, wherein the
demos relied on built files that were not being deployed to
appengine.
* fix(build): Update GitHub Pages deployment to include built files
Modify the updateGithubPages task to run clean and build and
then git add build/msg dist/*_compressed.js*, so that they will
be included in the deployed pages.
This fixes the problem created by the previous^2 commit,
wherein the demos relied on built files that were not being
deployed to GitHub Pages.
* chore(build): Remove build products from repository
Remove *_compressed.js* and msg/js/* from the blockly repository.
Also remove the now-obsolete checkinBuilt gulp task.
* chore(build): Apply relevant changes to test_tasks.js
Apply changes made to run_all_tests.sh and check_metadata.sh to
the corresponding parts of their JS replacements in
test_tasks.js.
* chore(build): Make updates suggested in PR #6475
- Remove `clean:builddir` and `clean:releasedir` - `clean`
is sufficient.
- Remove duplicate `require` from `appengine_tasks.js`.
* feat(build): Use shorter npm script names
Since scripts that run build tasks now automatically run their
prerequisite tasks, the previous naming scheme of task `build`
running all the `build:subtask`s no longe really makes very
much sense.
Additionally, following a chat discussion, there seems to be a
rough consensus to use "messages" to refer to the .json input
files, and "langfiles" to the generated .js output files.
Consequently, simplify npm script names by renaming as follows:
- "generate:langfiles" -> "messages"
- "build:langfiles" -> "langfiles"
- "build:js" -> "tsc"
- "build:deps" -> "deps"
- "build:compiled" -> "minify"
- "build:compressed": delete this synonym for "build:compiled",
("minify" was chosen as agnostic to Closure Compiler vs. WebPack.)
* chores(build): Add deprecation notice for old scripts
To reduce potential confusion/frustration, restore the previous
npm scripts but have them display a deprecation notice instead
(note that npm prints the script contents before running it, so
echo is not needed).
* docs(build): Add comments distinguishing 'messages' from 'langfiles'
114 lines
4.1 KiB
JSON
114 lines
4.1 KiB
JSON
{
|
|
"name": "blockly",
|
|
"version": "9.0.1",
|
|
"description": "Blockly is a library for building visual programming editors.",
|
|
"keywords": [
|
|
"blockly"
|
|
],
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/google/blockly.git"
|
|
},
|
|
"bugs": {
|
|
"url": "https://github.com/google/blockly/issues"
|
|
},
|
|
"homepage": "https://developers.google.com/blockly/",
|
|
"author": {
|
|
"name": "Neil Fraser"
|
|
},
|
|
"scripts": {
|
|
"build": "gulp build",
|
|
"build-debug": "gulp build --verbose --debug",
|
|
"build-debug-log": "npm run build:debug > build-debug.log 2>&1 && tail -3 build-debug.log",
|
|
"build-strict": "gulp build --verbose --strict",
|
|
"build-strict-log": "npm run build:strict > build-debug.log 2>&1 && tail -3 build-debug.log",
|
|
"build:compiled": "exit 1 # Deprecated; use \"npm run minify\" instead.",
|
|
"build:compressed": "exit 1 # Deprecated; use \"npm run minify\" instead.",
|
|
"build:deps": "exit 1 # Deprecated; use \"npm run deps\" instead.",
|
|
"build:js": "exit 1 # Deprecated; use \"npm run tsc\" instead.",
|
|
"build:langfiles": "exit 1 # Deprecated; use \"npm run langfiles\" instead.",
|
|
"bump": "npm --no-git-tag-version version 4.$(date +'%Y%m%d').0",
|
|
"clean": "gulp clean",
|
|
"deployDemos": "npm ci && gulp deployDemos",
|
|
"deployDemos:beta": "npm ci && gulp deployDemosBeta",
|
|
"deps": "gulp deps",
|
|
"format": "gulp format",
|
|
"format:sortrequires": "gulp sortRequires",
|
|
"generate:langfiles": "exit 1 # Deprecated; use \"npm run messages\" instead.",
|
|
"messages": "gulp messages",
|
|
"license": "gulp checkLicenses",
|
|
"lint": "eslint .",
|
|
"lint:fix": "eslint . --fix",
|
|
"langfiles": "gulp langfiles",
|
|
"minify": "gulp minify",
|
|
"only:compile:advanced": "gulp onlyBuildAdvancedCompilationTest --debug",
|
|
"package": "gulp 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\"",
|
|
"tsc": "gulp tsc",
|
|
"test": "gulp --silent test",
|
|
"test:generators": "gulp --silent testGenerators",
|
|
"test:mocha:interactive": "http-server ./ -o /tests/mocha/index.html -c-1",
|
|
"test:compile:advanced": "gulp buildAdvancedCompilationTest --debug",
|
|
"updateGithubPages": "npm ci && gulp gitUpdateGithubPages"
|
|
},
|
|
"main": "./index.js",
|
|
"umd": "./blockly.min.js",
|
|
"unpkg": "./blockly.min.js",
|
|
"types": "./index.d.ts",
|
|
"browser": {
|
|
"./node.js": "./browser.js",
|
|
"./core.js": "./core-browser.js",
|
|
"./blockly-node.js": "./blockly.js"
|
|
},
|
|
"license": "Apache-2.0",
|
|
"devDependencies": {
|
|
"@blockly/block-test": "^3.0.0",
|
|
"@blockly/dev-tools": "^5.0.0",
|
|
"@blockly/theme-modern": "^3.0.0",
|
|
"@hyperjump/json-schema": "^0.18.5",
|
|
"@microsoft/api-extractor": "^7.29.5",
|
|
"@typescript-eslint/eslint-plugin": "^5.33.1",
|
|
"@wdio/selenium-standalone-service": "^7.10.1",
|
|
"chai": "^4.2.0",
|
|
"clang-format": "^1.6.0",
|
|
"closure-calculate-chunks": "^3.0.2",
|
|
"concurrently": "^7.4.0",
|
|
"eslint": "^8.4.1",
|
|
"eslint-config-google": "^0.14.0",
|
|
"eslint-plugin-jsdoc": "^39.3.6",
|
|
"google-closure-compiler": "^20221004.0.0",
|
|
"google-closure-deps": "^20221004.0.0",
|
|
"gulp": "^4.0.2",
|
|
"gulp-clang-format": "^1.0.27",
|
|
"gulp-concat": "^2.6.1",
|
|
"gulp-gzip": "^1.4.2",
|
|
"gulp-insert": "^0.5.0",
|
|
"gulp-rename": "^2.0.0",
|
|
"gulp-replace": "^1.0.0",
|
|
"gulp-series": "^1.0.2",
|
|
"gulp-shell": "^0.8.0",
|
|
"gulp-sourcemaps": "^3.0.0",
|
|
"gulp-umd": "^2.0.0",
|
|
"http-server": "^14.0.0",
|
|
"js-green-licenses": "^3.0.0",
|
|
"json5": "^2.2.0",
|
|
"mocha": "^10.0.0",
|
|
"readline-sync": "^1.4.10",
|
|
"rimraf": "^3.0.2",
|
|
"selenium-standalone": "^8.0.3",
|
|
"through2": "^4.0.2",
|
|
"typescript": "^4.3.2",
|
|
"webdriverio": "^7.0.3",
|
|
"yargs": "^17.2.1"
|
|
},
|
|
"dependencies": {
|
|
"jsdom": "15.2.1"
|
|
}
|
|
}
|