Commit Graph

175 Commits

Author SHA1 Message Date
kozbial
2a62c06a92 Update script to use python3 command 2021-08-10 16:43:08 -07:00
Neil Fraser
52d280e615 Recompile of JSON to JS messages.
Delete unused Klingon message.
Remove '.' from message that confusingly appears after a filename.
2021-08-05 10:39:22 -07:00
Monica Kozbial
96420f0daf Add command to deploy beta version of demos (#4958) 2021-07-21 11:53:52 -07:00
Christopher Allen
2bdf2627af Configure eslint and Closure Compiler to accept ES6 2021-07-13 23:54:36 +01:00
Christopher Allen
d313ec804a Merge branch 'develop' into goog.module-prep
This resolves a conflict in `blockly_uncompressed.js`, and missing
updates to `test/deps.js`, caused by PR #5041.
2021-07-13 22:16:35 +01:00
Christopher Allen
c42c5e72b4 Remove obsolete TODO
No more `execSync('mkdir -p')` so no more need to check if it works on
Windows.
2021-07-13 16:11:54 +01:00
Christopher Allen
ebd6559822 Fix incorrectly-reverted change to mkdirSync call
An intermediate version of this code read:

    fs.mkdir(demoStaticTmpDir, {recursive: true}), done);

but apparently `fs.mkdir` doesn't honour the recursive option, so I
tried to revert the change but munged it instead.

This commit cleans up the mess I made.
2021-07-13 16:11:54 +01:00
Christopher Allen
85b50fcb73 Use fs.mkdirSync instead of execSync('mkdir -p ...')
Also consistently use {recursive: true} in case directory is nested
in an also-not-yet-existent directory.
2021-07-13 16:11:54 +01:00
Christopher Allen
f5a9f2cf2b Load dependency graph from tests/deps.js in uncompiled mode
* New gulp task buildDeps (npm run build:deps) to create tests/deps.js.
* Old gulp task buildUncompressed is deleted.
* blockly_uncompressed.js is now handwritten.
  * And simplified; in particular, BLOCKLY_BOOT is gone.
  * And linted!
* For consistency with the Closure documentation and base.js,
  consistently refer to what blockly_uncompressed.js is used for as
  "uncompiled mode" rather than "uncompressed mode" (but don't yet
  rename it to blockly_uncompiled.js)
2021-07-12 02:28:09 +01:00
Christopher Allen
6ccff4431d Fix line lengths
Including by using the node_modules/.bin/closure2ts wrapper provided by
typescript-closure-tools instead of running the source .js directly.
2021-07-10 13:02:47 +01:00
Sam El-Husseini
6136d93cdf Fix msg typings script and move to typings build directory 2021-07-10 13:02:47 +01:00
Christopher Allen
c45929db22 Rename internal recompile function to rebuildAll 2021-07-09 23:08:59 +01:00
Christopher Allen
ffd0252947 Merge branch 'develop' into build-elsewhere
Fix conflict in package.json.
2021-07-09 14:13:23 +01:00
Christopher Allen
9e72378b69 Finish renaming BUILD_DIR; make tests more error-prone
I had forgotten that I needed to change the value of BUILD_DIR
in several different places.

Added comments warning future editors about this as well as filing
issue #5007 to track fixing this properly.

Despite being misconfigured and therefore failing, the typescript
and metadata test scripts were exiting with status 0, indicating
successful completion.  These have been fixed so they should fail
on any error, including misconfiguration.
2021-07-09 14:06:59 +01:00
Christopher Allen
1e4fa8005a Fix comment TODO formatting. 2021-07-08 17:29:26 +01:00
Christopher Allen
311b2c16d8 Rename BUILD_DIR to "build" (was "built")
Per discussion in PR #4968, the dirname "build" is widely used for
this purpose.
2021-07-08 16:55:15 +01:00
Christopher Allen
ec14cc3ed8 Package build output; fix node tests.
- Reconfigure package_tasks.js to use BUILD_DIR from config.js
  (i.e., build/) rather than repository root as source of files to
  package.

  - Add check to packageTasks.package to ensure that certain required
    files exist in BUILD_DIR, to verify that buildTasks.build and
    typings.typings have been run.

  - Fix packageUMDBundle to use generated, rather than checked-in
    version of en.js.

  - Fix packageDTS to use the generated (rather than checked-in)
    versions of blockly.d.ts and msg/*.d.ts.

- Modify run_all_tests.sh to run packageTasks.package before running
  node tests, since they depend on it.  Previously this was only
  working because 'npm install' runs the 'prepare' script, which would
  run the 'package' script - so the code being tested by the node tests
  was not the current source but whatever precomipled code had
  previously been checked in.

- Remove the 'prepare' script from package.json, since it is no longer
  needed (and is now broken, since it requires that build and typings
  have been done first.)  Note that no scripts at all are included in
  the version of package.json that is created in dist/ and subsequently
  included in the published npms, so this deletion does not affect what
  happens when the Blockly npm in installed - it only affects what
  happens when 'npm install' is run after the blockly repo is cloned.

- Factor out the actual recompilation steps from releaseTasks.recompile.

- Rename releaseTasks.recomple to recompileDevelop, since it deals
  specifically with the develop branch.  (The npm script name is
  unchanged.)

- Ensure that a full recompile and repackage is done before publishing
  (beta and non-beta) npms.
2021-07-08 16:34:50 +01:00
Rachel Fenichel
23602bb177 Initial commit for appengine deploy action 2021-07-07 17:57:48 -07:00
Christopher Allen
e6929decde Also check in sourcemaps
The .js.map files generated by buildCompressed, buildBlocks etc. were
not being copied back by checkinBuilt.
2021-07-07 15:36:39 +01:00
Christopher Allen
37ecce8d80 Have npm run typings use built directory; fix typescript tests
* Modify scripts/gulpfiles/typings.js to write typings to BUILD_DIR.
* Modify tests/scripts/compile_typings.sh to check compilability of
  resulting output from BUILD_DIR.
* Rename checkin script to checkin:built, add a checkin:typings script
  to do the same for .d.ts files, and a new checkin script to do both.
* Have recompile run checkin:typings.
2021-06-30 15:34:54 +01:00
Christopher Allen
1aa35ef438 Merge branch 'develop' into build-elsewhere 2021-06-29 16:22:13 +01:00
Christopher Allen
c521fa9bfa Fix release process
The documented release process is to do npm run recompile, merge the
resulting branch to develop, and then do npm run relase, which does
not do another build.

This process should probably be changed, but for the moment ensure
that npm run recompile (as well as npm run package:beta) runs
buildTasks.checkinBuilt after each .build to preserve the old procedure.
2021-06-23 13:11:29 +01:00
Christopher Allen
e8eb30fa8b Script to clean release directory
You can now do npm run clean:buildDir, ... clean:releaseDir, or just
... clean, which does both.

The release directory is automatically cleaned before packaging
commences.
2021-06-23 13:07:20 +01:00
Christopher Allen
961319b3eb Script to clean build directory 2021-06-22 18:10:02 +01:00
Christopher Allen
e2c4a9b7f9 Script to copy built files from BUILD_DIR to repository
This is to allow built files to be checked in.
2021-06-22 18:08:23 +01:00
Christopher Allen
25f073d0e3 Build msg/js/*.js langfiles in BUILD_DIR 2021-06-22 12:04:30 +01:00
Christopher Allen
a03cd29b68 Separate script to rebuild msg/json/en.json, qqq.json etc.
There are some files in msg/json/ (currently en.json, qqq.json,
constants.json and synonyms.json) that are generated by
scripts/i18n/js_to_json.py as part of the language file build process
- but this only needs to be done when messages.js is updated and
and usually requires some manual cleanup, so remove this step from the
existing buildLangfiles gulp script and create a separate command
('npm run generate:langfiles') to do this when required.
2021-06-22 10:59:24 +01:00
Christopher Allen
4111073292 Write build output to built/ instead of repository root
I have verified that

   npm run build && npm run package

produces an identical dist/ directory compared to the one produced prior
to this and the previous commit.
2021-06-22 10:59:13 +01:00
Christopher Allen
082fd1fc6f Move build and package directory config into new config.js
Make the destination directories for certain build/package/release
steps more easily (and centrally) configurable.

This only deals with building *_compressed* files;
blockly_uncompressed.js and the various msg/js/*.js files are not
affected by this commit.
2021-06-22 10:55:38 +01:00
Christopher Allen
b348e18dfb Don't use path.join to create globs for gulp.src
Per the gulp documentation[1], globs passed to gulp.src should use '/'
as the path separator regardless of the path separator used on whatever
OS we are running on.

[1] https://gulpjs.com/docs/en/getting-started/explaining-globs#segments-and-separators
2021-06-21 19:13:59 +01:00
Monica Kozbial
a15bbf1700 Revert #4697 (#4917) 2021-06-16 09:36:39 -07:00
Neil Fraser
76b5517008 Use null-prototype objects for maps
A {} has a bunch of names already defined on it (like ‘toString’).  When using an object as a map with arbitrary keys, it should not inherit from Object.prototype.
2021-06-09 11:41:42 -07:00
Neil Fraser
d919b0af21 Update JSDoc from Array.<> to Array<>
Same with Object.
2021-05-27 21:30:26 -07:00
Sam El-Husseini
d83279008b Remove dark theme in favour of @blockly/theme-dark (#4697)
* Remove dark theme in favour of @blockly/theme-dark
2021-04-21 13:33:59 -07:00
Rachel Fenichel
8ee2a85cd5 Merge pull request #4764 from rachel-fenichel/enable_es6
Change compilation language_in to STABLE
2021-04-13 14:08:53 -07:00
Rachel Fenichel
9c77e9b944 Don't explicitly set the default 2021-04-13 13:55:22 -07:00
Monica Kozbial
a05b26fa93 Add exclude paths as config for typings (#4721) 2021-04-13 09:42:31 -07:00
Rachel Fenichel
5416f1df75 Change compile scripts to use STABLE for language_in 2021-04-08 14:14:17 -07:00
alschmiedt
9a93ca486f Fix advanced compilation tests for Q1 2021 release (#4709) 2021-03-17 15:46:17 -07:00
Sam El-Husseini
63d26dc186 Add extra requires check (#4677)
* Add extra requires check
2021-03-05 09:50:51 -08:00
Sam El-Husseini
f97730e83c Sort requires (#4658)
* Cleanup gulp method to sort requires
2021-02-25 17:17:42 -08:00
alschmiedt
5da6bb05ba Updates beta release script to display current beta version (#4605) 2021-02-18 16:12:32 -08:00
Sam El-Husseini
628d45357f Update appengine_tasks to include playground dependencies (#4591)
* Update appengine_tasks to include playground dependencies
2021-01-27 11:36:16 -08:00
Sam El-Husseini
60e96c4d93 Temporarily disable strict require compiler errors (#4581)
* Disable strict require check in closure compiler
2021-01-11 14:07:29 -08:00
alschmiedt
1208987dbb Update release scripts (#4558) 2021-01-08 11:52:02 -08:00
Monica Kozbial
dc22b30849 Update demo deploy script and fix gcloudignore file (#4566) 2021-01-06 14:58:28 -08:00
Monica Kozbial
77884550a5 Add script for deploying demos (#4551) 2021-01-05 11:08:29 -08:00
Sam El-Husseini
7ebb53968c Update typings script and fix two typing issues: (#4542) 2020-12-16 19:29:20 -08:00
alschmiedt
5dafd4fba7 Fix update gh pages (#4488) 2020-12-02 16:07:20 -08:00
Sam El-Husseini
6790d7f81c Fix windows path separator in uncompressed build (#4487)
* Fix windows path separator in uncompressed build
2020-12-01 14:07:29 -08:00