reorganize directory structure

This commit is contained in:
Remko Tronçon 2022-04-17 09:28:53 +02:00
parent 2a7240c043
commit c39724348e
19 changed files with 16 additions and 15 deletions

View file

@ -11,12 +11,15 @@ all:
dev:
yarn -s dev
check: src/waforth.wasm
check:
yarn -s test
check-watch: src/waforth.wasm
check-watch:
yarn -s test-watch
lint:
yarn -s lint
wasm: src/waforth.assembled.wat scripts/quadruple.wasm.hex
process: src/waforth.vanilla.wat
@ -46,5 +49,3 @@ scripts/quadruple.wasm.hex: scripts/quadruple.wasm
clean:
-rm -rf $(WASM_FILES) scripts/quadruple.wasm scripts/quadruple.wasm.hex src/waforth.wat.tmp dist
lint:
yarn -s lint

View file

@ -57,9 +57,9 @@ let buildConfig = {
bundle: true,
logLevel: "info",
entryPoints: [
path.join(__dirname, "src", "shell", "shell"),
path.join(__dirname, "src", "tests", "tests"),
path.join(__dirname, "src", "benchmarks", "benchmarks"),
path.join(__dirname, "src", "web", "shell", "shell"),
path.join(__dirname, "src", "web", "tests", "tests"),
path.join(__dirname, "src", "web", "benchmarks", "benchmarks"),
],
entryNames: dev ? "[name]" : "[name]-c$[hash]",
assetNames: "[name]-c$[hash]",

View file

@ -17,10 +17,10 @@
"react-dom": "^18.0.0"
},
"scripts": {
"build": "./build.js",
"dev": "./build.js --watch --development",
"test": "./test.js",
"test-watch": "./test.js --watch",
"build": "./build-web.js",
"dev": "./build-web.js --watch --development",
"test": "./test-web.js",
"test-watch": "./test-web.js --watch",
"lint": "eslint ."
}
}

View file

@ -1,4 +1,4 @@
import wasmModule from "./waforth.wat";
import wasmModule from "../waforth.wat";
const isSafari =
typeof navigator != "undefined" &&

View file

@ -1,7 +1,7 @@
import React from "react";
import { createRoot } from "react-dom/client";
import WAForth from "../../src/WAForth";
import sieve from "../../src/sieve";
import WAForth from "../WAForth";
import sieve from "../sieve";
import sieveVanillaModule from "./sieve-vanilla.wat";
import update from "immutability-helper";
import "./benchmarks.css";

View file

@ -25,7 +25,7 @@ function runTests() {
let buildConfig = {
bundle: true,
logLevel: "warning",
entryPoints: [path.join(__dirname, "src", "tests", "tests.node")],
entryPoints: [path.join(__dirname, "src", "web", "tests", "tests.node")],
target: "node17",
outdir: path.join(__dirname, "build"),
external: ["fs", "stream", "util", "events", "path"],