-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added npm setup and remove old Makefile
- automatically checkout submodule - add missing browserify.js entry point Signed-off-by: Stefan Marr <[email protected]>
- Loading branch information
Showing
6 changed files
with
56 additions
and
54 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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
build | ||
src_gen | ||
node_modules |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"compilerOptions": { | ||
"module": "commonjs", | ||
"target": "es2016", | ||
"jsx": "preserve" | ||
}, | ||
"exclude": [ | ||
"node_modules", | ||
"**/node_modules/*", | ||
"build" | ||
] | ||
} |
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"name": "jssom", | ||
"displayName": "JsSOM", | ||
"version": "0.1.0", | ||
"description": "A JavaScript implementation of the SOM (Simple Object Machine", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/SOM-st/JsSOM.git" | ||
}, | ||
"author": { | ||
"name": "Stefan Marr", | ||
"email": "[email protected]" | ||
}, | ||
"license": "MIT", | ||
"devDependencies": { | ||
"browserify": "^16.3.0", | ||
"tinyify": "^2.5.1" | ||
}, | ||
"scripts": { | ||
"browserify": "mkdir -p build && npm run core-lib && npm run browserify:som-core && npm run browserify:main && npm run browserify:test", | ||
"_re-add": "--plugin tinyify", | ||
"browserify:test": "browserify tests/browserify.js -o build/test.js", | ||
"browserify:main": "browserify src/node.js -o build/node.js", | ||
"browserify:som-core": "./libs/jsify-core-lib.py core-lib > build/som.js", | ||
"clean": "rm -Rf build/*.js", | ||
"clobber": "rm -Rf build/", | ||
"core-lib": "git submodule update --init --recursive", | ||
} | ||
} |
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,2 +1,4 @@ | ||
#!/bin/sh | ||
git submodule update --init --recursive > /dev/null 2>&1 | ||
|
||
exec node src/node.js "$@" |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
const u = require('../src/som/vm/Universe'); | ||
const compileClassString = require('../src/som/compiler/SourcecodeCompiler').compileClassString; | ||
const universe = u.universe; | ||
|
||
if (document) { | ||
document.u = u; | ||
document.compileClassString = compileClassString; | ||
} | ||
|
||
universe.interpret(["-cp", "core-lib/Smalltalk", "core-lib/TestSuite/TestHarness.som "]); | ||
|
||
|