Commit Graph

19 Commits

Author SHA1 Message Date
Christopher Allen
52a0d525d7 chore(build): Remove build products from the Blockly repository (#6475)
* 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'
2022-11-03 13:15:10 +00:00
Neil Fraser
e90aba9273 fix: Rename Generator to CodeGenerator (#6585)
Stops collisions with ES6's Generator.
The old Blockly.Generator still exists as a name, but is now deprecated.
2022-10-28 01:59:00 +02:00
Monica Kozbial
a9223b0b22 Typo fixes. (#3769) 2020-03-25 15:47:27 -07:00
Sam El-Husseini
986e965be8 Private/protected visibility cleanup (#3263)
* Fix a number of private visibility issues
2019-10-16 11:48:09 -05:00
RoboErikG
8abba6ae10 Remove edit handler that is just eating events (#2634)
This handler should be unnecessary on most versions of Android, and it's currently just swallowing events that would be handled by default. Removing it to let the system take the default action.
2019-07-12 13:29:46 -07:00
Neil Fraser
52b6ce18a5 Fix unit tests 2019-07-08 13:29:43 -07:00
Andrew n marshall
182ba961de Doc comments and style corrections. 2018-11-14 13:34:33 -08:00
Andrew n marshall
4ce4544cc6 Temp save of work 2018-11-14 12:57:14 -08:00
Andrew n marshall
31a723bf32 Add handlers for console.alert and console.confirm. 2018-11-14 12:57:14 -08:00
Andrew n marshall
97caca6cc1 Removing comment around <meta>
Bad commit during debugging.
2018-11-14 11:08:17 -08:00
Andrew n marshall
09958368e2 Adding hooks for Android dialogs upon console.prompt() and similar.
Adapting code from Android's JsDialogHelper, a private class in the
Android source code.
2018-10-10 14:08:32 -07:00
Andrew n marshall
9062b0e23f Updating Android constraint layout 2018-10-05 15:53:02 -07:00
Andrew n marshall
3fc7cc5295 Update Android project to gradle 3.2.0 2018-10-04 17:12:08 -07:00
Andrew n marshall
645430df3d Update gradle to 3.1.4 2018-10-04 16:14:35 -07:00
Andrew n marshall
d8cbc9ac13 Adding demos/mobile/README.md (PR #2058)
Merge from AnmAtAnm/mobile-readme
2018-09-19 22:54:02 -07:00
Andrew n marshall
7e107fbcb1 Adding demos/mobile/README.md
Also updateing demo/mobile/android/README.md
2018-09-19 22:21:22 -07:00
Andrew n marshall
eabea36953 Adding mobile HTML demo.
* Adds ln_resources script to generate Blockly symbolic links.
 * Moves toolbox_standard.js into this directory. Relatedly,
   updates Android and iOS copy scripts and .gitignore files.
 * Corrects HTML viewport scale and disallows zoom.
2018-09-19 21:27:35 -07:00
Andrew n marshall
0eb7d09afb Don't use XML escape inside a markdown code segment. 2018-09-19 12:30:26 -07:00
Andrew n marshall
41236749ae Moving all mobile demos into demos/mobile.
HTML for both demos is now checked in as demos/mobile/html/index.html.
Updated android and ios scripts to copy webview.html from above.
2018-09-17 17:23:28 -07:00