diff --git a/.gitignore b/.gitignore index c7579fb..cbe9096 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,10 @@ -dummykey.crt -dummykey.key -dummykey.pem -index.js -index.js.map +/.rollup.cache/ +/_site +/dummykey.crt +/dummykey.key +/dummykey.pem +/index.js +/index.js.map /lib /node_modules -/_site +/tsconfig.tsbuildinfo diff --git a/package.json b/package.json index f68194b..6476bf6 100644 --- a/package.json +++ b/package.json @@ -3,11 +3,9 @@ "version": "0.0.0", "description": "vr experiments 3", "scripts": { - "compile": "tsc", - "compile:watch": "tsc -w", "rollup": "rollup -c", "rollup:watch": "rollup -c -w", - "prepare": "yarn run compile && yarn run rollup" + "prepare": "yarn run rollup" }, "author": "Tony Garnock-Jones ", "dependencies": { @@ -15,7 +13,9 @@ }, "devDependencies": { "@rollup/plugin-node-resolve": "15.0", + "@rollup/plugin-typescript": "10.0", "rollup": "3.8", + "tslib": "2.4", "typescript": "4.9" } } diff --git a/rollup.config.mjs b/rollup.config.mjs index 4cedf2b..b2460f9 100644 --- a/rollup.config.mjs +++ b/rollup.config.mjs @@ -1,11 +1,16 @@ +// -*- javascript -*- import resolve from '@rollup/plugin-node-resolve'; +import typescript from '@rollup/plugin-typescript'; import path from 'path'; const babylon = '@babylonjs/core/Legacy/legacy'; export default { - input: 'lib/index.js', - plugins: [resolve({ browser: true })], + input: 'src/index.ts', + plugins: [ + resolve({ browser: true }), + typescript({ incremental: true }), + ], external: [ babylon, ], diff --git a/yarn.lock b/yarn.lock index f870d80..53279c7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -19,6 +19,14 @@ is-module "^1.0.0" resolve "^1.22.1" +"@rollup/plugin-typescript@10.0": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@rollup/plugin-typescript/-/plugin-typescript-10.0.1.tgz#270b515b116ea28320e6bb62451c4767d49072d6" + integrity sha512-wBykxRLlX7EzL8BmUqMqk5zpx2onnmRMSw/l9M1sVfkJvdwfxogZQVNUM9gVMJbjRLDR5H6U0OMOrlDGmIV45A== + dependencies: + "@rollup/pluginutils" "^5.0.1" + resolve "^1.22.1" + "@rollup/pluginutils@^5.0.1": version "5.0.2" resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-5.0.2.tgz#012b8f53c71e4f6f9cb317e311df1404f56e7a33" @@ -120,6 +128,11 @@ supports-preserve-symlinks-flag@^1.0.0: resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== +tslib@2.4: + version "2.4.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.1.tgz#0d0bfbaac2880b91e22df0768e55be9753a5b17e" + integrity sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA== + typescript@4.9: version "4.9.4" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.4.tgz#a2a3d2756c079abda241d75f149df9d561091e78"