Switch to yarn workspaces

This commit is contained in:
Tony Garnock-Jones 2021-04-26 15:13:30 +02:00
parent f338373ac5
commit 6bec672087
27 changed files with 7898 additions and 210 deletions

View File

@ -1,34 +1,23 @@
LERNA=./node_modules/.bin/lerna
bootstrap: node_modules/lerna
node_modules/lerna:
npm i .
yarn install
$(MAKE) clean
+$(MAKE) -j$$(nproc) all
PACKAGE_JSONS=$(wildcard packages/*/package.json)
PACKAGE_DIRS=$(PACKAGE_JSONS:/package.json=)
clean.local:
rm -f deps.mk
clean: clean.local
for d in $(PACKAGE_DIRS); do make -C $$d $@; done
$(LERNA) exec 'yarn clean || true'
veryclean: clean.local
for d in $(PACKAGE_DIRS); do make -C $$d $@; done
$(LERNA) exec 'yarn veryclean || true'
rm -rf node_modules
all: $(PACKAGE_DIRS:=/.phony_all)
include deps.mk
deps.mk:
for d in $(PACKAGE_DIRS); do \
echo $$d/.phony_all: $$(fgrep 'file:' "$$d/package.json" | sed -e 's:.*/\([^/"]*\)",\?:packages/\1/.phony_all:'); \
done > $@
%/.phony_all:
+$(MAKE) -C $* all
all:
$(LERNA) exec yarn prepare
watch:
inotifytest make -j$$(nproc) all

View File

@ -1,5 +1,5 @@
all:
npm i
yarn install
clean:
rm -rf lib dist .nyc_output coverage tsconfig.tsbuildinfo

225
README.md
View File

@ -1,111 +1,36 @@
# Syndicate/js
A new, efficient implementation of Syndicate for JavaScript in both
node.js and the browser. The implementation techniques herein are the
subject of a forthcoming paper.
A third-generation implementation of Dataspaces and Syndicate for
TypeScript and JavaScript, in both node.js and the browser. The
implementation techniques herein are the subject of a forthcoming
paper.
## Quickstart
## Building
### Option 1. Create a new program/library using Syndicate/js.
This project uses [`yarn`](https://yarnpkg.com/), not `npm`.
Use `npx @syndicate-lang/create DIRECTORY` or `npm init
@syndicate-lang DIRECTORY`:
The repository is a monorepo, using
[yarn workspaces](https://classic.yarnpkg.com/en/docs/workspaces/).
[Lerna](https://lerna.js.org/) is used as a thin
[veneer atop yarn workspaces](https://medium.com/@jsilvax/a-workflow-guide-for-lerna-with-yarn-workspaces-60f97481149d),
providing convenient automation for package version management and
publication.
npm init @syndicate-lang myprogram
cd myprogram
npm i .
npm run build
node lib/index.js
After a checkout, run:
### Option 2. Add Syndicate/js to an existing program/library.
Install a few packages from the
[@syndicate-lang](https://www.npmjs.com/org/syndicate-lang) scope on
npmjs.com:
npm i --save-dev @syndicate-lang/syntax @babel/preset-env
npm i --save @syndicate-lang/core
Then, add the `@syndicate-lang/syntax/plugin` to your `.babelrc`. Use
`npx syndicate-babel` in place of `npx babel` to compile your code.
## Creating a new Syndicate/js project
Create a skeletal `package.json`:
{
"main": "lib/index.js",
"scripts": {
"build": "npx syndicate-babel src --out-dir lib",
"clean": "rm -rf lib"
}
}
The entry point will be `lib/index.js`; the corresponding *source*
file will be `src/index.js`.
Two `npm run` scripts are defined: one which compiles Syndicate/js
source files in `src` to plain JavaScript in `lib`. The compiler uses
Babel; we will configure Babel next.
Create a `.babelrc` file:
{
"presets": [ "@babel/preset-env" ],
"plugins": [ "@syndicate-lang/syntax/plugin" ]
}
Now, install the necessary dependencies. Babel and the Syndicate/js
extensions are needed at build-time:
npm i --save-dev @syndicate-lang/syntax @babel/preset-env
The Syndicate/js runtime and as many drivers as you would like to use
are needed at run-time:
npm i --save @syndicate-lang/core
npm i --save @syndicate-lang/driver-timer
Finally, create the main program file. Create a directory `src`, and
then a file `src/index.js`:
```javascript
const { TimeLaterThan } = activate require("@syndicate-lang/driver-timer");
spawn named 'ticker' {
field this.counter = 0;
field this.deadline = +(new Date());
on start { console.log('ticker starting'); }
on stop { console.log('ticker stopping'); }
on asserted TimeLaterThan(this.deadline) {
this.counter++;
console.log('tick', new Date(), this.counter);
this.deadline += 1000;
}
stop on (this.counter == 5);
}
```shell
make bootstrap
```
Now, compile the project:
Alternatively, running:
npm run build
```shell
yarn install
./node_modules/.bin/lerna exec yarn prepare
```
Finally, run the program:
node lib/index.js
The output should be something like:
ticker starting
tick 2018-11-05T14:23:27.713Z 1
tick 2018-11-05T14:23:28.705Z 2
tick 2018-11-05T14:23:29.706Z 3
tick 2018-11-05T14:23:30.706Z 4
tick 2018-11-05T14:23:31.707Z 5
ticker stopping
will download and install all dependencies and then build all the
packages.
## Licence
@ -124,3 +49,109 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
<!-- ## Quickstart -->
<!-- ### Option 1. Create a new program/library using Syndicate/js. -->
<!-- Use `npx @syndicate-lang/create DIRECTORY` or `npm init -->
<!-- @syndicate-lang DIRECTORY`: -->
<!-- npm init @syndicate-lang myprogram -->
<!-- cd myprogram -->
<!-- npm i . -->
<!-- npm run build -->
<!-- node lib/index.js -->
<!-- ### Option 2. Add Syndicate/js to an existing program/library. -->
<!-- Install a few packages from the -->
<!-- [@syndicate-lang](https://www.npmjs.com/org/syndicate-lang) scope on -->
<!-- npmjs.com: -->
<!-- npm i --save-dev @syndicate-lang/syntax @babel/preset-env -->
<!-- npm i --save @syndicate-lang/core -->
<!-- Then, add the `@syndicate-lang/syntax/plugin` to your `.babelrc`. Use -->
<!-- `npx syndicate-babel` in place of `npx babel` to compile your code. -->
<!-- ## Creating a new Syndicate/js project -->
<!-- Create a skeletal `package.json`: -->
<!-- { -->
<!-- "main": "lib/index.js", -->
<!-- "scripts": { -->
<!-- "build": "npx syndicate-babel src --out-dir lib", -->
<!-- "clean": "rm -rf lib" -->
<!-- } -->
<!-- } -->
<!-- The entry point will be `lib/index.js`; the corresponding *source* -->
<!-- file will be `src/index.js`. -->
<!-- Two `npm run` scripts are defined: one which compiles Syndicate/js -->
<!-- source files in `src` to plain JavaScript in `lib`. The compiler uses -->
<!-- Babel; we will configure Babel next. -->
<!-- Create a `.babelrc` file: -->
<!-- { -->
<!-- "presets": [ "@babel/preset-env" ], -->
<!-- "plugins": [ "@syndicate-lang/syntax/plugin" ] -->
<!-- } -->
<!-- Now, install the necessary dependencies. Babel and the Syndicate/js -->
<!-- extensions are needed at build-time: -->
<!-- npm i --save-dev @syndicate-lang/syntax @babel/preset-env -->
<!-- The Syndicate/js runtime and as many drivers as you would like to use -->
<!-- are needed at run-time: -->
<!-- npm i --save @syndicate-lang/core -->
<!-- npm i --save @syndicate-lang/driver-timer -->
<!-- Finally, create the main program file. Create a directory `src`, and -->
<!-- then a file `src/index.js`: -->
<!-- ```javascript -->
<!-- const { TimeLaterThan } = activate require("@syndicate-lang/driver-timer"); -->
<!-- spawn named 'ticker' { -->
<!-- field this.counter = 0; -->
<!-- field this.deadline = +(new Date()); -->
<!-- on start { console.log('ticker starting'); } -->
<!-- on stop { console.log('ticker stopping'); } -->
<!-- on asserted TimeLaterThan(this.deadline) { -->
<!-- this.counter++; -->
<!-- console.log('tick', new Date(), this.counter); -->
<!-- this.deadline += 1000; -->
<!-- } -->
<!-- stop on (this.counter == 5); -->
<!-- } -->
<!-- ``` -->
<!-- Now, compile the project: -->
<!-- npm run build -->
<!-- Finally, run the program: -->
<!-- node lib/index.js -->
<!-- The output should be something like: -->
<!-- ticker starting -->
<!-- tick 2018-11-05T14:23:27.713Z 1 -->
<!-- tick 2018-11-05T14:23:28.705Z 2 -->
<!-- tick 2018-11-05T14:23:29.706Z 3 -->
<!-- tick 2018-11-05T14:23:30.706Z 4 -->
<!-- tick 2018-11-05T14:23:31.707Z 5 -->
<!-- ticker stopping -->

View File

@ -1,6 +1,9 @@
{
"packages": [
"packages/*"
"packages/*",
"packages/*/examples/*/"
],
"version": "independent"
"version": "independent",
"npmClient": "yarn",
"useWorkspaces": true
}

View File

@ -1,6 +1,7 @@
{
"name": "@syndicate-lang/root",
"private": true,
"workspaces": ["packages/*", "packages/*/examples/*/"],
"devDependencies": {
"@rollup/plugin-node-resolve": "^11.0.1",
"@types/jest": "^26.0.19",
@ -8,7 +9,6 @@
"esm": "^3.2.25",
"jest": "^26.6.3",
"lerna": "^3.22.1",
"nyc": "^14.1.1",
"rollup": "^2.36.1",
"rollup-plugin-sourcemaps": "^0.6.3",
"rollup-plugin-terser": "^7.0.2",
@ -16,8 +16,5 @@
"ts-node": "^9.1.1",
"ts-node-dev": "^1.1.1",
"typescript": "^4.1.3"
},
"dependencies": {
"@syndicate-lang/core": "file:packages/core"
}
}

View File

@ -9,11 +9,11 @@
},
"repository": "github:syndicate-lang/syndicate-js",
"scripts": {
"prepare": "npm run compile && npm run rollup",
"prepare": "yarn compile && yarn rollup",
"compile": "../../node_modules/.bin/tsc",
"compile-watch": "../../node_modules/.bin/tsc -w",
"compile:watch": "../../node_modules/.bin/tsc -w",
"rollup": "../../node_modules/.bin/rollup -c",
"rollup-watch": "../../node_modules/.bin/rollup -c -w"
"rollup:watch": "../../node_modules/.bin/rollup -c -w"
},
"main": "dist/syndicate-compiler.js",
"module": "lib/index.js",

View File

@ -9,11 +9,11 @@
},
"repository": "github:syndicate-lang/syndicate-js",
"scripts": {
"prepare": "npm run compile && npm run rollup",
"prepare": "yarn compile && yarn rollup",
"compile": "../../node_modules/.bin/tsc",
"compile-watch": "../../node_modules/.bin/tsc -w",
"compile:watch": "../../node_modules/.bin/tsc -w",
"rollup": "../../node_modules/.bin/rollup -c",
"rollup-watch": "../../node_modules/.bin/rollup -c -w",
"rollup:watch": "../../node_modules/.bin/rollup -c -w",
"test": "../../node_modules/.bin/jest",
"cover": "../../node_modules/.bin/nyc --reporter=html ../../node_modules/.bin/jest"
},

View File

@ -3,9 +3,9 @@
<meta charset=utf-8>
<meta name="viewport" content="width=device-width, initial-scale=0.67, maximum-scale=0.67, user-scalable=no">
<link href="css/style.css" rel="stylesheet" type="text/css">
<script src="node_modules/@syndicate-lang/core/dist/syndicate.js"></script>
<script src="node_modules/@syndicate-lang/html/dist/syndicate-html.js"></script>
<script src="node_modules/@syndicate-lang/timer/dist/syndicate-timer.js"></script>
<script src="../../../../node_modules/@syndicate-lang/core/dist/syndicate.js"></script>
<script src="../../../../node_modules/@syndicate-lang/html/dist/syndicate-html.js"></script>
<script src="../../../../node_modules/@syndicate-lang/timer/dist/syndicate-timer.js"></script>
<body>
<div class="container">
<div id="board-area" class="board">

View File

@ -4,21 +4,21 @@
"description": "HTML UI Flappy Bird Syndicate example",
"main": "index.js",
"scripts": {
"prepare": "npm run compile && npm run rollup",
"compile": "npx syndicate-tsc",
"rollup": "npx rollup -c",
"prepare": "yarn compile && yarn rollup",
"compile": "syndicate-tsc",
"rollup": "rollup -c",
"clean": "rm -rf lib/ index.js index.js.map"
},
"author": "Tony Garnock-Jones <tonyg@leastfixedpoint.com>",
"license": "GPL-3.0+",
"dependencies": {
"@syndicate-lang/core": "file:../../../core",
"@syndicate-lang/html": "file:../..",
"@syndicate-lang/timer": "file:../../../timer"
"@syndicate-lang/core": "^0.5.0",
"@syndicate-lang/html": "^0.0.0",
"@syndicate-lang/timer": "^0.0.0"
},
"devDependencies": {
"@syndicate-lang/ts-plugin": "file:../../../ts-plugin",
"@syndicate-lang/tsc": "file:../../../tsc",
"@syndicate-lang/ts-plugin": "^0.1.1",
"@syndicate-lang/tsc": "^0.1.0",
"rollup": "^2.37.0",
"rollup-plugin-sourcemaps": "^0.6.3",
"typescript": "^4.1.3"

View File

@ -3,8 +3,8 @@
<head>
<title>Syndicate: Table Example</title>
<meta charset="utf-8">
<script src="node_modules/@syndicate-lang/core/dist/syndicate.js"></script>
<script src="node_modules/@syndicate-lang/html/dist/syndicate-html.js"></script>
<script src="../../../../node_modules/@syndicate-lang/core/dist/syndicate.js"></script>
<script src="../../../../node_modules/@syndicate-lang/html/dist/syndicate-html.js"></script>
<script src="index.js"></script>
</head>
<body>

View File

@ -4,20 +4,20 @@
"description": "Simple HTML UI Syndicate example",
"main": "index.js",
"scripts": {
"prepare": "npm run compile && npm run rollup",
"compile": "npx syndicate-tsc",
"rollup": "npx rollup -c",
"prepare": "yarn compile && yarn rollup",
"compile": "syndicate-tsc",
"rollup": "rollup -c",
"clean": "rm -rf lib/ index.js index.js.map"
},
"author": "Tony Garnock-Jones <tonyg@leastfixedpoint.com>",
"license": "GPL-3.0+",
"dependencies": {
"@syndicate-lang/core": "file:../../../core",
"@syndicate-lang/html": "file:../.."
"@syndicate-lang/core": "^0.5.0",
"@syndicate-lang/html": "^0.0.0"
},
"devDependencies": {
"@syndicate-lang/ts-plugin": "file:../../../ts-plugin",
"@syndicate-lang/tsc": "file:../../../tsc",
"@syndicate-lang/ts-plugin": "^0.1.1",
"@syndicate-lang/tsc": "^0.1.0",
"rollup": "^2.37.0",
"rollup-plugin-sourcemaps": "^0.6.3",
"typescript": "^4.1.3"

View File

@ -13,20 +13,20 @@
"types": "lib/index.d.ts",
"author": "Tony Garnock-Jones <tonyg@leastfixedpoint.com>",
"scripts": {
"prepare": "npm run compile && npm run rollup",
"compile": "npx syndicate-tsc",
"compile-watch": "npx syndicate-tsc -w --verbose --intermediate-directory src.ts",
"rollup": "npx rollup -c",
"rollup-watch": "npx rollup -c -w",
"prepare": "yarn compile && yarn rollup",
"compile": "syndicate-tsc",
"compile:watch": "syndicate-tsc -w --verbose --intermediate-directory src.ts",
"rollup": "rollup -c",
"rollup:watch": "rollup -c -w",
"clean": "rm -rf lib/ dist/ index.js index.js.map"
},
"dependencies": {
"@syndicate-lang/core": "file:../core"
"@syndicate-lang/core": "^0.5.0"
},
"devDependencies": {
"@syndicate-lang/syndicatec": "file:../syndicatec",
"@syndicate-lang/ts-plugin": "file:../ts-plugin",
"@syndicate-lang/tsc": "file:../tsc",
"@syndicate-lang/syndicatec": "^0.1.0",
"@syndicate-lang/ts-plugin": "^0.1.1",
"@syndicate-lang/tsc": "^0.1.0",
"typescript": "^4.1.3"
}
}

View File

@ -2,7 +2,7 @@
<html>
<meta charset=utf-8>
<title>Demo</title>
<script src="node_modules/@syndicate-lang/core/dist/syndicate.js"></script>
<script src="../../../../node_modules/@syndicate-lang/core/dist/syndicate.js"></script>
<script src="index.js"></script>
<h1>Look in the JavaScript console for output.</h1>
<main id="main">

View File

@ -4,18 +4,18 @@
"description": "Simple syndicatec example in JavaScript",
"main": "index.js",
"scripts": {
"prepare": "npm run compile && npm run rollup",
"compile": "npx syndicatec -d lib -b src 'src/**/*.js'",
"rollup": "npx rollup -c",
"prepare": "yarn compile && yarn rollup",
"compile": "syndicatec -d lib -b src 'src/**/*.js'",
"rollup": "rollup -c",
"clean": "rm -rf lib/ index.js index.js.map"
},
"author": "Tony Garnock-Jones <tonyg@leastfixedpoint.com>",
"license": "GPL-3.0+",
"dependencies": {
"@syndicate-lang/core": "file:../../../core"
"@syndicate-lang/core": "^0.5.0"
},
"devDependencies": {
"@syndicate-lang/syndicatec": "file:../..",
"@syndicate-lang/syndicatec": "^0.1.0",
"rollup": "^2.37.0",
"rollup-plugin-sourcemaps": "^0.6.3"
}

View File

@ -2,7 +2,7 @@
<html>
<meta charset=utf-8>
<title>Demo</title>
<script src="node_modules/@syndicate-lang/core/dist/syndicate.js"></script>
<script src="../../../../node_modules/@syndicate-lang/core/dist/syndicate.js"></script>
<script src="index.js"></script>
<h1>Look in the JavaScript console for output.</h1>
<main id="main">

View File

@ -4,18 +4,18 @@
"description": "Simple syndicatec example in TypeScript",
"main": "index.js",
"scripts": {
"prepare": "npm run compile && npm run rollup",
"compile": "npx syndicatec -t -d src.ts -b src 'src/**/*.ts' && npx tsc",
"rollup": "npx rollup -c",
"prepare": "yarn compile && yarn rollup",
"compile": "syndicatec -t -d src.ts -b src 'src/**/*.ts' && tsc",
"rollup": "rollup -c",
"clean": "rm -rf lib/ src.ts/ index.js index.js.map"
},
"author": "Tony Garnock-Jones <tonyg@leastfixedpoint.com>",
"license": "GPL-3.0+",
"dependencies": {
"@syndicate-lang/core": "file:../../../core"
"@syndicate-lang/core": "^0.5.0"
},
"devDependencies": {
"@syndicate-lang/syndicatec": "file:../..",
"@syndicate-lang/syndicatec": "^0.1.0",
"rollup": "^2.37.0",
"rollup-plugin-sourcemaps": "^0.6.3",
"typescript": "^4.1.3"

View File

@ -9,14 +9,14 @@
},
"repository": "github:syndicate-lang/syndicate-js",
"scripts": {
"prepare": "npm run compile",
"prepare": "yarn compile",
"compile": "../../node_modules/.bin/tsc",
"compile-watch": "../../node_modules/.bin/tsc -w"
"compile:watch": "../../node_modules/.bin/tsc -w"
},
"author": "Tony Garnock-Jones <tonyg@leastfixedpoint.com>",
"dependencies": {
"@syndicate-lang/compiler": "file:../compiler",
"@syndicate-lang/core": "file:../core",
"@syndicate-lang/compiler": "^0.1.0",
"@syndicate-lang/core": "^0.5.0",
"glob": "^7.1.6",
"yargs": "^16.2.0"
},

View File

@ -13,19 +13,19 @@
"types": "lib/index.d.ts",
"author": "Tony Garnock-Jones <tonyg@leastfixedpoint.com>",
"scripts": {
"prepare": "npm run compile && npm run rollup",
"compile": "npx syndicate-tsc",
"compile-watch": "npx syndicate-tsc -w --verbose --intermediate-directory src.ts",
"rollup": "npx rollup -c",
"rollup-watch": "npx rollup -c -w",
"prepare": "yarn compile && yarn rollup",
"compile": "syndicate-tsc",
"compile:watch": "syndicate-tsc -w --verbose --intermediate-directory src.ts",
"rollup": "rollup -c",
"rollup:watch": "rollup -c -w",
"clean": "rm -rf lib/ dist/ index.js index.js.map"
},
"dependencies": {
"@syndicate-lang/core": "file:../core"
"@syndicate-lang/core": "^0.5.0"
},
"devDependencies": {
"@syndicate-lang/ts-plugin": "file:../ts-plugin",
"@syndicate-lang/tsc": "file:../tsc",
"@syndicate-lang/ts-plugin": "^0.1.1",
"@syndicate-lang/tsc": "^0.1.0",
"typescript": "^4.1.3"
}
}

View File

@ -20,7 +20,7 @@ use `@syndicate-lang/tsc`'s `syndicate-tsc` command instead.
...
}
then `yarn install` or `npm install`.
then `yarn install`.
## Enabling the plugin in the TypeScript compiler
@ -44,8 +44,8 @@ It should Just Work.
### Visual Studio Code
After `yarn install`/`npm install`, you will have a
`node_modules/typescript` directory.
After `yarn install`, you will have a `node_modules/typescript`
directory.
Open VS Code, and select the version of TypeScript contained therein
by following instructions

View File

@ -2,7 +2,7 @@
<html>
<meta charset=utf-8>
<title>Demo</title>
<script src="node_modules/@syndicate-lang/core/dist/syndicate.js"></script>
<script src="../../../../node_modules/@syndicate-lang/core/dist/syndicate.js"></script>
<script src="index.js"></script>
<h1>Look in the JavaScript console for output.</h1>
<main id="main">

View File

@ -4,20 +4,20 @@
"description": "Simple syndicatec example in TypeScript",
"main": "index.js",
"scripts": {
"prepare": "npm run compile && npm run rollup",
"compile": "npx syndicate-tsc",
"rollup": "npx rollup -c",
"prepare": "yarn compile && yarn rollup",
"compile": "syndicate-tsc",
"rollup": "rollup -c",
"clean": "rm -rf lib/ index.js index.js.map"
},
"author": "Tony Garnock-Jones <tonyg@leastfixedpoint.com>",
"license": "GPL-3.0+",
"dependencies": {
"@syndicate-lang/core": "file:../../../core"
"@syndicate-lang/core": "^0.5.0"
},
"devDependencies": {
"@syndicate-lang/syndicatec": "file:../../../syndicatec",
"@syndicate-lang/ts-plugin": "file:../..",
"@syndicate-lang/tsc": "file:../../../tsc",
"@syndicate-lang/syndicatec": "^0.1.0",
"@syndicate-lang/ts-plugin": "^0.1.1",
"@syndicate-lang/tsc": "^0.1.0",
"rollup": "^2.37.0",
"rollup-plugin-sourcemaps": "^0.6.3",
"typescript": "^4.1.3"

View File

@ -9,16 +9,16 @@
},
"repository": "github:syndicate-lang/syndicate-js",
"scripts": {
"prepare": "npm run compile",
"prepare": "yarn compile",
"compile": "../../node_modules/.bin/tsc",
"compile-watch": "../../node_modules/.bin/tsc -w"
"compile:watch": "../../node_modules/.bin/tsc -w"
},
"main": "lib/index.js",
"types": "lib/index.d.ts",
"author": "Tony Garnock-Jones <tonyg@leastfixedpoint.com>",
"dependencies": {
"@syndicate-lang/compiler": "file:../compiler",
"@syndicate-lang/core": "file:../core"
"@syndicate-lang/compiler": "^0.1.0",
"@syndicate-lang/core": "^0.5.0"
},
"devDependencies": {
"typescript": "^4.1.3"

View File

@ -2,7 +2,7 @@
<html>
<meta charset=utf-8>
<title>Demo</title>
<script src="node_modules/@syndicate-lang/core/dist/syndicate.js"></script>
<script src="../../../../node_modules/@syndicate-lang/core/dist/syndicate.js"></script>
<script src="index.js"></script>
<h1>Look in the JavaScript console for output.</h1>
<main id="main">

View File

@ -1,21 +1,21 @@
{
"name": "@syndicate-lang/syndicatec-typescript-example",
"name": "@syndicate-lang/syndicate-tsc-typescript-example",
"version": "0.0.0",
"description": "Simple syndicatec example in TypeScript",
"description": "Simple syndicate-tsc example in TypeScript",
"main": "index.js",
"scripts": {
"prepare": "npm run compile && npm run rollup",
"compile": "npx syndicate-tsc",
"rollup": "npx rollup -c",
"prepare": "yarn compile && yarn rollup",
"compile": "syndicate-tsc",
"rollup": "rollup -c",
"clean": "rm -rf lib/ index.js index.js.map"
},
"author": "Tony Garnock-Jones <tonyg@leastfixedpoint.com>",
"license": "GPL-3.0+",
"dependencies": {
"@syndicate-lang/core": "file:../../../core"
"@syndicate-lang/core": "^0.5.0"
},
"devDependencies": {
"@syndicate-lang/syndicatec": "file:../..",
"@syndicate-lang/tsc": "^0.1.0",
"rollup": "^2.37.0",
"rollup-plugin-sourcemaps": "^0.6.3",
"typescript": "^4.1.3"

View File

@ -9,14 +9,14 @@
},
"repository": "github:syndicate-lang/syndicate-js",
"scripts": {
"prepare": "npm run compile",
"prepare": "yarn compile",
"compile": "../../node_modules/.bin/tsc",
"compile-watch": "../../node_modules/.bin/tsc -w"
"compile:watch": "../../node_modules/.bin/tsc -w"
},
"author": "Tony Garnock-Jones <tonyg@leastfixedpoint.com>",
"dependencies": {
"@syndicate-lang/compiler": "file:../compiler",
"@syndicate-lang/core": "file:../core",
"@syndicate-lang/compiler": "^0.1.0",
"@syndicate-lang/core": "^0.5.0",
"glob": "^7.1.6",
"yargs": "^16.2.0"
},

View File

@ -16,12 +16,12 @@ open() {
for d in packages/*/tsconfig.json
do
open "cd $(dirname $d); npm run compile-watch"
open "cd $(dirname $d); yarn compile:watch"
done
for d in packages/*/rollup.config.js
do
open "cd $(dirname $d); npm run rollup-watch"
open "cd $(dirname $d); yarn rollup:watch"
done
tmux select-layout even-vertical

7668
yarn.lock Normal file

File diff suppressed because it is too large Load Diff