diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 9ae0f04..f7a2650 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -38,11 +38,14 @@ jobs: - name: wasm-pack run: wasm-pack build --target web --out-dir app/pkg - - name: build app + - name: install dependencies run: | - cd app npm ci - npm run build + cd app && npm ci + + - name: build app + run: npm run build + - name: Setup Pages uses: actions/configure-pages@v3 - name: Upload artifact diff --git a/app/package-lock.json b/app/package-lock.json index 8492c38..f55ef63 100644 --- a/app/package-lock.json +++ b/app/package-lock.json @@ -11,7 +11,6 @@ "lit": "^2.6.1" }, "devDependencies": { - "@rollup/plugin-wasm": "^6.1.2", "typescript": "^5.0.2", "vite": "^4.3.0" } @@ -381,23 +380,6 @@ "@lit-labs/ssr-dom-shim": "^1.0.0" } }, - "node_modules/@rollup/plugin-wasm": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/@rollup/plugin-wasm/-/plugin-wasm-6.1.2.tgz", - "integrity": "sha512-YdrQ7zfnZ54Y+6raCev3tR1PrhQGxYKSTajGylhyP0oBacouuNo6KcNCk+pYKw9M98jxRWLFFca/udi76IDXzg==", - "dev": true, - "engines": { - "node": ">=14.0.0" - }, - "peerDependencies": { - "rollup": "^1.20.0||^2.0.0||^3.0.0" - }, - "peerDependenciesMeta": { - "rollup": { - "optional": true - } - } - }, "node_modules/@types/trusted-types": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.3.tgz", @@ -789,13 +771,6 @@ "@lit-labs/ssr-dom-shim": "^1.0.0" } }, - "@rollup/plugin-wasm": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/@rollup/plugin-wasm/-/plugin-wasm-6.1.2.tgz", - "integrity": "sha512-YdrQ7zfnZ54Y+6raCev3tR1PrhQGxYKSTajGylhyP0oBacouuNo6KcNCk+pYKw9M98jxRWLFFca/udi76IDXzg==", - "dev": true, - "requires": {} - }, "@types/trusted-types": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.3.tgz", diff --git a/app/package.json b/app/package.json index fdf825b..3656509 100644 --- a/app/package.json +++ b/app/package.json @@ -1,9 +1,9 @@ { "name": "test-lit", - "homepage": "https://www.stevenhuyn.com/hello-wasm/", "private": true, "version": "0.0.0", "type": "module", + "license": "MIT", "scripts": { "dev": "vite", "build": "tsc && vite build", diff --git a/app/tsconfig.json b/app/tsconfig.json index 1f300e2..e4832f6 100644 --- a/app/tsconfig.json +++ b/app/tsconfig.json @@ -4,7 +4,7 @@ "experimentalDecorators": true, "useDefineForClassFields": false, "module": "ESNext", - "lib": ["ES2020", "DOM", "DOM.Iterable"], + "lib": ["ESNext", "DOM", "DOM.Iterable"], "skipLibCheck": true, /* Bundler mode */ diff --git a/app/types/components/cubeway-simulation.d.ts b/app/types/components/cubeway-simulation.d.ts new file mode 100644 index 0000000..cc43533 --- /dev/null +++ b/app/types/components/cubeway-simulation.d.ts @@ -0,0 +1,26 @@ +import { LitElement } from "lit"; +/** + * An example element. + * + * @slot - This element has a slot + * @csspart button - The button + */ +export declare class CubewaySimulation extends LitElement { + /** + * Copy for the read the docs hint. + */ + docsHint: string; + /** + * The number of times the button has been clicked. + */ + count: number; + connectedCallback(): void; + render(): import("lit-html").TemplateResult<1>; + private _onClick; + static styles: import("lit").CSSResult; +} +declare global { + interface HTMLElementTagNameMap { + "cubeway-simulation": CubewaySimulation; + } +} diff --git a/app/types/components/index.d.ts b/app/types/components/index.d.ts new file mode 100644 index 0000000..93b68a2 --- /dev/null +++ b/app/types/components/index.d.ts @@ -0,0 +1 @@ +export { CubewaySimulation } from "./cubeway-simulation"; diff --git a/app/types/index.d.ts b/app/types/index.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/app/types/index.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/app/vite.config.ts b/app/vite.config.ts index 59f6437..12ce893 100644 --- a/app/vite.config.ts +++ b/app/vite.config.ts @@ -2,7 +2,7 @@ import { defineConfig } from "vite"; // https://vitejs.dev/config/ export default defineConfig({ - base: "/hello-wasm", + base: "/web-cubeway", plugins: [], // https://vitejs.dev/config/server-options.html#server-fs-allow server: { diff --git a/cubeway/Cargo.toml b/cubeway/Cargo.toml index f814d80..c8145b3 100644 --- a/cubeway/Cargo.toml +++ b/cubeway/Cargo.toml @@ -4,6 +4,7 @@ version = "0.1.0" edition = "2021" description = "A sample project with wasm-pack" repository = "https://github.com/stevenhuyn/hello-wasm" +license = "MIT" [lib] name = "cubeway" diff --git a/package-lock.json b/package-lock.json index 955db81..d41a266 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "hello-wasm", + "name": "3d-conway", "version": "1.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { - "name": "hello-wasm", + "name": "3d-conway", "version": "1.0.0", "license": "ISC", "devDependencies": { diff --git a/package.json b/package.json index 73cfc54..88c5e30 100644 --- a/package.json +++ b/package.json @@ -1,16 +1,13 @@ { - "name": "3d-conway", + "name": "web-cubeway", "version": "1.0.0", "scripts": { - "dev": "concurrently \"cd cubeway && cargo watch -- wasm-pack build --target web\" \"cd app && npm run dev\"" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/stevenhuyn/hello-wasm.git" + "dev": "concurrently \"cd cubeway && cargo watch -- wasm-pack build --target web\" \"cd app && npm run dev\"", + "build": "concurrently \"cd cubeway && wasm-pack build --target web\" \"cd app && npm run build\"" }, "keywords": [], "author": "", - "license": "ISC", + "license": "MIT", "devDependencies": { "concurrently": "^8.0.1" }