diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f27aaf6..adc4560 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,9 +40,6 @@ jobs: env: GH_TOKEN: ${{ secrets.GH_PAT }} - - name: Build - run: npm run www - - name: Publish to NPMJS uses: JS-DevTools/npm-publish@v3 with: diff --git a/.gitignore b/.gitignore index 83da964..6592097 100644 --- a/.gitignore +++ b/.gitignore @@ -56,7 +56,6 @@ node_modules/ .env dist/ -/www/ /generated-types/ /jsdocs/ /act/ diff --git a/buildSrc/build.ts b/buildSrc/build.ts deleted file mode 100644 index 5a2511d..0000000 --- a/buildSrc/build.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { copyFiles } from './util/copyFiles' - -const watch = process.argv.includes('-w') - -copyFiles({ - src: 'resources', - dest: 'www', - options: { - watch, - copyOptions: { - overwrite: true, - }, - }, -}) - -for (const pckg of ['example']) { - copyFiles({ - src: `packages/${pckg}/dist`, - dest: `www/${pckg}`, - options: { - watch, - copyOptions: { - overwrite: true, - }, - }, - }) -} diff --git a/buildSrc/util/copyFiles.ts b/buildSrc/util/copyFiles.ts deleted file mode 100644 index 6960bb6..0000000 --- a/buildSrc/util/copyFiles.ts +++ /dev/null @@ -1,27 +0,0 @@ -import fs, { CopyOptions } from 'fs-extra' - -export function copyFiles({ - src, - dest, - options, -}: { - src: string - dest: string - options: { readonly watch: boolean; readonly copyOptions?: CopyOptions } -}): void { - const copy = async () => { - await fs.copy(src, dest, options.copyOptions).catch((error) => { - console.error(`copy ${src} failed:`, error) - throw error - }) - console.log(`${src} copied to: ${dest}`) - } - copy().catch(() => { - if (!options.watch) { - process.exit(-1) - } - }) - if (options.watch) { - fs.watch(src, { recursive: true }, () => copy().catch(() => {})) - } -} diff --git a/package.json b/package.json index 83bebba..3a93090 100644 --- a/package.json +++ b/package.json @@ -32,10 +32,9 @@ "build": "lerna run build", "watch": "lerna run watch --parallel", "prewww": "lerna run build", - "www": "tsx ./buildSrc/build.ts", "test": "lerna run test", "validate": "lerna run build && lerna run lint && lerna run test", - "serve": "npm run www && http-server www" + "serve": "http-server www" }, "repository": { "type": "git", diff --git a/packages/example/src/index.ts b/packages/example/src/index.ts index faa343e..4437010 100644 --- a/packages/example/src/index.ts +++ b/packages/example/src/index.ts @@ -28,8 +28,6 @@ const scene = new Scene() scene.background = new Color(0x111111) scene.fog = new Fog(0x111111, 1, 10) -const clock = new Clock() - const grid = new GridHelper(20, 20, 0x000000, 0xffffff) grid.material.opacity = 0.2 grid.material.transparent = true @@ -96,6 +94,7 @@ loader }) .catch(console.error) +const clock = new Clock() function render() { const dT = Math.min(clock.getDelta(), 0.1) controls.update() diff --git a/resources/example.html b/resources/example.html deleted file mode 100644 index 32818cb..0000000 --- a/resources/example.html +++ /dev/null @@ -1,8 +0,0 @@ - - -
- -