mirror of
https://github.com/remko/waforth
synced 2024-12-25 09:59:07 +01:00
build: Cleanup
This commit is contained in:
parent
a07f283511
commit
0fb992e2cb
14 changed files with 3070 additions and 2031 deletions
|
@ -1,6 +0,0 @@
|
|||
public/waforth/dist
|
||||
build/
|
||||
dist/
|
||||
src/web/benchmarks/sieve/sieve-c.js
|
||||
src/standalone/wasm-micro-runtime
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
env:
|
||||
browser: true
|
||||
es2021: true
|
||||
node: true
|
||||
extends:
|
||||
- 'eslint:recommended'
|
||||
- 'plugin:react/recommended'
|
||||
- 'plugin:react-hooks/recommended'
|
||||
- 'plugin:@typescript-eslint/recommended'
|
||||
parser: '@typescript-eslint/parser'
|
||||
parserOptions:
|
||||
ecmaFeatures:
|
||||
jsx: true
|
||||
ecmaVersion: 12
|
||||
sourceType: module
|
||||
plugins:
|
||||
- prettier
|
||||
- react
|
||||
- '@typescript-eslint'
|
||||
settings:
|
||||
react:
|
||||
version: detect
|
||||
rules:
|
||||
"prettier/prettier": "error"
|
||||
react/display-name: 0
|
||||
react/prop-types: 0
|
||||
"@typescript-eslint/explicit-module-boundary-types": 0
|
||||
"@typescript-eslint/no-explicit-any": 0
|
||||
"@typescript-eslint/no-non-null-assertion": 0
|
5
.github/actions/setup/action.yml
vendored
5
.github/actions/setup/action.yml
vendored
|
@ -5,7 +5,8 @@ runs:
|
|||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 17
|
||||
cache: 'yarn'
|
||||
registry-url: 'https://registry.npmjs.org/'
|
||||
cache: 'npm'
|
||||
# - if: runner.os == 'macOS'
|
||||
# run: brew install wabt
|
||||
# shell: bash
|
||||
|
@ -31,5 +32,5 @@ runs:
|
|||
mv /tmp/wabt-1.0.31 /c/tools/wabt
|
||||
cp /c/tools/wabt/bin/* /c/Windows/system32
|
||||
shell: bash
|
||||
- run: yarnpkg --pure-lockfile
|
||||
- run: npm ci
|
||||
shell: bash
|
||||
|
|
6
.github/workflows/build.yml
vendored
6
.github/workflows/build.yml
vendored
|
@ -13,9 +13,9 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: ./.github/actions/setup
|
||||
- run: yarnpkg build
|
||||
- run: yarnpkg lint
|
||||
- run: yarnpkg test --coverage
|
||||
- run: npm run build
|
||||
- run: npm run lint
|
||||
- run: npm test
|
||||
- run: make -C src/web/notebook
|
||||
- run: ./dist/wafnb2html src/web/notebook/examples/drawing-with-forth.wafnb
|
||||
|
||||
|
|
4
.github/workflows/publish-release.yml
vendored
4
.github/workflows/publish-release.yml
vendored
|
@ -14,6 +14,6 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: ./.github/actions/setup
|
||||
- run: yarnpkg publish --non-interactive
|
||||
- run: npm publish
|
||||
env:
|
||||
NPM_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
||||
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
||||
|
|
10
Makefile
10
Makefile
|
@ -6,19 +6,19 @@ WAT2WASM_FLAGS:=$(WAT2WASM_FLAGS) --debug-names
|
|||
endif
|
||||
|
||||
all:
|
||||
yarn -s build
|
||||
npm run build
|
||||
|
||||
dev:
|
||||
yarn -s dev
|
||||
npm run dev
|
||||
|
||||
check:
|
||||
yarn -s test
|
||||
npm test
|
||||
|
||||
check-watch:
|
||||
yarn -s test-watch
|
||||
npm run test-watch
|
||||
|
||||
lint:
|
||||
yarn -s lint
|
||||
npm run lint
|
||||
|
||||
wasm: src/waforth.assembled.wat scripts/word.wasm.hex
|
||||
|
||||
|
|
13
README.md
13
README.md
|
@ -264,23 +264,22 @@ Here are some of the goals (and non-goals) of WAForth:
|
|||
|
||||
The build uses the [WebAssembly Binary
|
||||
Toolkit](https://github.com/WebAssembly/wabt) for converting raw WebAssembly
|
||||
text format into the binary format, and [Yarn](https://yarnpkg.com) (and therefore
|
||||
[Node.JS](https://nodejs.org/en/)) for
|
||||
text format into the binary format, and [Node.JS](https://nodejs.org/en/) for
|
||||
managing the build process and the dependencies of the shell.
|
||||
|
||||
brew install wabt yarn
|
||||
yarn
|
||||
brew install wabt node
|
||||
npm install
|
||||
|
||||
|
||||
### Building & Running
|
||||
|
||||
To build everything:
|
||||
|
||||
yarn build
|
||||
npm run build
|
||||
|
||||
To run the development server:
|
||||
|
||||
yarn dev
|
||||
npm run dev
|
||||
|
||||
### Testing
|
||||
|
||||
|
@ -288,4 +287,4 @@ The tests are served from `/waforth/tests` by the development server.
|
|||
|
||||
You can also run the tests in Node.JS by running
|
||||
|
||||
yarn test
|
||||
npm test
|
||||
|
|
2999
package-lock.json
generated
Normal file
2999
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
46
package.json
46
package.json
|
@ -51,5 +51,51 @@
|
|||
"wasm",
|
||||
"compiler",
|
||||
"interpreter"
|
||||
],
|
||||
"eslintConfig": {
|
||||
"env": {
|
||||
"browser": true,
|
||||
"es2021": true,
|
||||
"node": true
|
||||
},
|
||||
"extends": [
|
||||
"eslint:recommended",
|
||||
"plugin:react/recommended",
|
||||
"plugin:react-hooks/recommended",
|
||||
"plugin:@typescript-eslint/recommended"
|
||||
],
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 12,
|
||||
"ecmaFeatures": {
|
||||
"jsx": true
|
||||
},
|
||||
"sourceType": "module"
|
||||
},
|
||||
"plugins": [
|
||||
"prettier",
|
||||
"react",
|
||||
"@typescript-eslint"
|
||||
],
|
||||
"settings": {
|
||||
"react": {
|
||||
"version": "detect"
|
||||
}
|
||||
},
|
||||
"rules": {
|
||||
"prettier/prettier": "error",
|
||||
"react/display-name": 0,
|
||||
"react/prop-types": 0,
|
||||
"@typescript-eslint/explicit-module-boundary-types": 0,
|
||||
"@typescript-eslint/no-explicit-any": 0,
|
||||
"@typescript-eslint/no-non-null-assertion": 0
|
||||
},
|
||||
"ignorePatterns": [
|
||||
"public/waforth/dist",
|
||||
"build/",
|
||||
"dist/",
|
||||
"src/web/benchmarks/sieve/sieve-c.js",
|
||||
"src/standalone/wasm-micro-runtime"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env yarn exec ts-node --
|
||||
#!/usr/bin/env npx ts-node --
|
||||
|
||||
import * as process from "process";
|
||||
import * as fs from "fs";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
.DEFAULT_GOAL := all
|
||||
|
||||
VERSION?=$(shell cat ../../package.json | grep '"version"' | sed -e 's/.*:.*"\(.*\)".*/\1/')
|
||||
VERSION?=$(shell cat ../../package.json | grep '"version"' | head -n 1 | sed -e 's/.*:.*"\(.*\)".*/\1/')
|
||||
|
||||
################################################
|
||||
# WebAssembly engine configuration
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
.DEFAULT_GOAL := all
|
||||
|
||||
VERSION?=$(shell cat ../../package.json | grep '"version"' | sed -e 's/.*:.*"\(.*\)".*/\1/')
|
||||
VERSION?=$(shell cat ../../package.json | grep '"version"' | head -n 1 | sed -e 's/.*:.*"\(.*\)".*/\1/')
|
||||
|
||||
ifeq ($(OS),Windows_NT)
|
||||
CXX = g++
|
||||
|
|
|
@ -3,7 +3,7 @@ all:
|
|||
|
||||
.PHONY: install-deps
|
||||
install-deps:
|
||||
yarn global add vsce
|
||||
npm install --global vsce
|
||||
|
||||
.PHONY: prepackage
|
||||
prepackage: all LICENSE.txt icon.png
|
||||
|
|
Loading…
Reference in a new issue