- 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.
* 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.
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.
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.
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.
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.
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.
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.