From c354423d38213078beb0f0d02c3391529489638f Mon Sep 17 00:00:00 2001 From: Randi Williams Date: Thu, 9 Sep 2021 11:30:41 -0400 Subject: [PATCH] Updating develop with the new json5 dependencies --- .github/workflows/build-and-deploy.yml | 1 + README.md | 18 +----------------- packages/scratch-blocks/package.json | 4 ++-- 3 files changed, 4 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index daf140ebd..6baaea5cb 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -19,6 +19,7 @@ jobs: node-version: ${{ matrix.node-version }} - name: npm install, build, and test run: | + npm install json5 npx lerna link --force-local npx lerna exec -- npm install npx lerna link --force-local diff --git a/README.md b/README.md index 1251a96ab..b81a77dec 100644 --- a/README.md +++ b/README.md @@ -19,9 +19,7 @@ It is structured as a monorepo, where the Scratch components you'll typically wa ## ⚡ Quick Setup️ -Requirements -1. Your java version should be 8 or higher. Check `java -version`. -2. Install node.js https://nodejs.org/en/ (tested with Linux version 6.13.4 and Mac) +Requirements, your java version should be 8 or higher. Check `java -version`. ```shell script git clone git@github.com:mitmedialab/prg-extension-boilerplate.git @@ -62,20 +60,6 @@ sh: webpack: command not found **Solution**: This may mean you have a half-installed node_modules version of webpack. Try starting fresh! -## Adding a new Scratch Extension - -The most common modification to Scratch that you will be doing is adding a new category of blocks, also called an extension, to the toolbox. To complete this work, you will primarily be working in [packages/scratch-vm](packages/scratch-vm). -1. Enter `packages/scratch-vm` and navigate to `packages/scratch-vm/src/extensions`. This folder contains all of the extensions that currently exist in your toolbox. -2. Make a new folder for the extension that you want to create. For example, make a folder called `scratch3_test`. Then enter that folder. -3. In `scratch3_test`, create a new file, `index.js`. -4. To populate the `index.js` file that you created, look at [this annonated Scratch extension example](https://github.com/LLK/scratch-vm/blob/develop/docs/extensions.md#annotated-example). This example can be copied directly as a starting point. Another starting point to consider would be copying the `index.js` of another extension in the `packages/scratch-vm/extensions` folder that has most of the functionality that you are looking for. -5. Once your index.js is settled, add the name of the extension to `scratch-vm/src/extension-support/extension-manager.js`. Look at the other extensions added there as a template for how you should add your new extension. -6. Now you will have to navigate to `packages/scratch-gui`. Add the extension name and url of your new extension to `scratch-gui/src/lib/libraries/extensions/index.jsx`. -7. [Optional] If you want the extension to automatically be loaded whenever you load the page, add it as a CORE_EXTENSION in `scratch-vm/src/virtual-machine.js`. - -More information about creating a new Scratch extension [can be found here](https://github.com/LLK/scratch-vm/blob/develop/docs/extensions.md). - - ## 💡 How this was made: ### Sub-packages diff --git a/packages/scratch-blocks/package.json b/packages/scratch-blocks/package.json index 4c7fd2b45..e7fda8f14 100644 --- a/packages/scratch-blocks/package.json +++ b/packages/scratch-blocks/package.json @@ -13,7 +13,7 @@ "browser": "./shim/vertical.js", "scripts": { "deploy": "rimraf gh-pages/closure-library/scripts/ci/CloseAdobeDialog.exe && gh-pages -t -d gh-pages -m \"Build for $(git log --pretty=format:%H -n1)\"", - "prepublish": "python build.py && webpack", + "prepublish": "python2 build.py && webpack", "test:unit": "node tests/jsunit/test_runner.js", "test:lint": "eslint .", "test:messages": "npm run translate && node i18n/test_scratch_msgs.js", @@ -39,7 +39,7 @@ "google-closure-compiler": "20180402.0.0", "google-closure-library": "20180204.0.0", "graceful-fs": "4.1.11", - "json": "9.0.4", + "json": "10.0.0", "rimraf": "2.6.2", "scratch-l10n": "^3.7.20191219145348", "selenium-webdriver": "^4.0.0-alpha.1",