Commit Graph

270 Commits

Author SHA1 Message Date
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
17f9209f2f Add missing extern 2021-05-27 21:30:26 -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
alschmiedt
fa8cf15d8e Reverts #4573 (#4775) 2021-04-13 09:44:53 -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
Rachel Fenichel
fc0c2c5dbe Update jsdom 2021-01-07 18:32:29 -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
Rachel Fenichel
3a138936c3 Update closure 2020-11-17 10:34:34 -08:00
Monica Kozbial
40ef586260 Refactoring Ui events in core (#4418)
* Ui events base (#4370)

* Add constants for new ui event types

* Add property to indicate an event as UI event

* Click events (#4372)

* Creating new ui base class.

* Refactor theme event (#4391)

* Add themeName property to theme event

* Refactor marker move events. (#4389)

* Refactor trashcan open event (#4392)

* Refactor selected event (#4387)

* Refactor toolbox item change event (#4394)

* Refactor bubble open events (#4390)

* Refactor block drag event (#4388)

* Viewport events (#4395)

* Fix event filtering for ui events (#4401)

* Move events to new directory and rename Ui events base (#4400)

* Move events to new directory and rename Ui events base

* Add missing fromJson implementation for click event (#4410)

* Adding serialization tests for events

* Zoom controls event (#4407)

* Refactor zoom event

* Rename IS_UI_EVENT to isUiEvent
2020-11-04 14:43:54 -08:00
Sam El-Husseini
6181dd37c7 Add build strict option that builds with the strict type checker (#4098)
* Add build strict option that builds with the strict type checker
2020-09-08 17:08:39 -07:00
alschmiedt
d01169fa79 Toolbox Rewrite (#4223)
Rewrite the toolbox in order to get rid of old closure code and make it easier to extend.

Co-authored-by: Maribeth Bottorff <maribethb@google.com>
2020-09-02 08:13:07 -07:00
Monica Kozbial
408319823e Remove references to removed test_blocks.js (#4173)
* Remove test blocks reference from compile tests.

* Remove test blocks reference from compile script
2020-08-18 16:33:57 -07:00
Sam El-Husseini
ab2031c353 Upgrade closure compiler to latest 2020-08-10 11:57:56 -07:00
Sam El-Husseini
25821c888d Move package to scripts/package (#4045) 2020-07-14 16:31:53 -07:00
Sam El-Husseini
55e6f8000e Move i18n scripts under scripts/ (#4044)
* Move i18n scripts under scripts/
2020-07-14 12:07:56 -07:00
Sam El-Husseini
c0a0745f85 Move theme scripts to scripts dir (#4041) 2020-07-14 11:44:25 -07:00
Sam El-Husseini
f3136e61a1 Advanced compilation gulp script to replace the shell script. (#3996) 2020-07-01 10:55:17 -07:00
alschmiedt
32de43098c Update gh pages script (#3925)
* Update script for pushing to github pages

* Remove build github pages
2020-05-29 14:36:04 -07:00
alschmiedt
afba82222e Fix recompile script (#3926) 2020-05-29 11:17:16 -07:00
Sam El-Husseini
1052f7548b Enable unusedPrivateMembers check (#3924)
* Add unusedPrivateMembers check
2020-05-28 17:44:16 -07:00