Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
[submodule "scratch-packages/scratch-gui"]
path = scratch-packages/scratch-gui
url = git@github.com:mitmedialab/prg-raise-playground-scratch-gui.git
branch = main
branch = blockly-changes
[submodule "scratch-packages/scratch-vm"]
path = scratch-packages/scratch-vm
url = git@github.com:mitmedialab/prg-raise-playground-scratch-vm.git
branch = main
branch = blockly-changes
[submodule "scratch-packages/scratch-blocks"]
path = scratch-packages/scratch-blocks
url = git@github.com:gonfunko/scratch-blocks.git
branch = modern-blockly
6 changes: 6 additions & 0 deletions extensions/paths.tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@
],
"$scratch-vm/*": [
"../scratch-packages/scratch-vm/src/*"
],
"$scratch-blocks": [
"../scratch-packages/scratch-blocks/src"
],
"$scratch-blocks/*": [
"../scratch-packages/scratch-blocks/src/*"
]
}
}
Expand Down
6 changes: 4 additions & 2 deletions extensions/scripts/utils/aliases.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
import fs from "fs";

import { vmSrc } from "$root/scripts/paths";
import { vmSrc, blocksSrc } from "$root/scripts/paths";
import { commonDirectory } from "./fileSystem";

export const commonAlias = "$common";
export const scratchVmAlias = "$scratch-vm";
export const scratchBlocksAlias = "$scratch-blocks"

const getCommonAliasEntry = () => getAlias(commonDirectory, commonAlias);
const getScratchVmAliasEntry = () => getAlias(vmSrc, scratchVmAlias);
const getScratchBlocksAliasEntry = () => getAlias(blocksSrc, scratchBlocksAlias);

const getAlias = (location: string, alias: string) => {
if (!fs.existsSync(location)) throw new Error(`Could not form alias '${alias}' because location didn't exist: ${location}`);
return { [alias]: location };
}

export const getAliasEntries = () => ({ ...getCommonAliasEntry(), ...getScratchVmAliasEntry() });
export const getAliasEntries = () => ({ ...getCommonAliasEntry(), ...getScratchVmAliasEntry(), ...getScratchBlocksAliasEntry() });
11 changes: 10 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,20 @@
"tsconfig-paths": "^4.1.1",
"tslib": "^2.4.1",
"typescript": "latest",
"yargs": "^17.7.2"
"yargs": "^17.7.2",
"@blockly/keyboard-experiment": "^0.0.3",
"blockly": "^12.0.0-beta.1"
},
"overrides": {
"ts-node": {
"typescript": "$typescript"
},
"blockly": "^12.0.0-beta.1",
"@blockly/keyboard-experiment": {
"blockly": "^12.0.0-beta.1"
}
},
"resolutions": {
"blockly": "^12.0.0-beta.1"
}
}
Loading