-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c3137ab
commit 5065564
Showing
5 changed files
with
18 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,8 @@ | |
[submodule "scratch-packages/scratch-vm"] | ||
path = scratch-packages/scratch-vm | ||
url = [email protected]:mitmedialab/prg-raise-playground-scratch-vm.git | ||
branch = main | ||
branch = main | ||
[submodule "scratch-packages/scratch-blocks"] | ||
path = scratch-packages/scratch-blocks | ||
url = [email protected]:gonfunko/scratch-blocks.git | ||
branch = blockly-changes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() }); |
Submodule scratch-blocks
added at
6d1453
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters