mirror of
https://github.com/tweenjs/tween.js.git
synced 2025-12-08 20:16:12 +00:00
chore: improve dev script so output can be meaningfully watched
This makes it work well in VS Code (f.e. it will use $ts-watch mode to read errors from stdout and display them in the "PROBLEMS" pane). Plus this tells newcomers how to quickly get things started in dev mode (watch mode) for easy dev cycles.
This commit is contained in:
parent
0ed1d45e2d
commit
db581b5dfd
@ -25,6 +25,7 @@
|
||||
],
|
||||
"dependencies": {},
|
||||
"scripts": {
|
||||
"dev": "(npm run tsc-watch -- --preserveWatchOutput & p1=$!; npm run rollup-build -- --watch & p2=$!; wait $p1 $p2)",
|
||||
"build": "rimraf dist .tmp && node scripts/write-version.js && npm run tsc && npm run rollup-build",
|
||||
"rollup-build": "rollup -c ./rollup.config.js",
|
||||
"tsc": "tsc",
|
||||
|
||||
@ -5,28 +5,34 @@ export default [
|
||||
input: '.tmp/Index.js',
|
||||
// https://github.com/rollup/rollup/wiki/Troubleshooting#this-is-undefined
|
||||
context: 'this',
|
||||
watch: {clearScreen: false},
|
||||
output: [
|
||||
{
|
||||
file: 'dist/tween.umd.js',
|
||||
name: 'TWEEN',
|
||||
format: 'umd',
|
||||
exports: 'named',
|
||||
},
|
||||
{
|
||||
file: 'dist/tween.amd.js',
|
||||
format: 'amd',
|
||||
exports: 'named',
|
||||
},
|
||||
{
|
||||
file: 'dist/tween.cjs.js',
|
||||
format: 'cjs',
|
||||
exports: 'named',
|
||||
},
|
||||
{
|
||||
file: 'dist/tween.esm.js',
|
||||
format: 'es',
|
||||
exports: 'named',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
input: './.tmp/Index.d.ts',
|
||||
watch: {clearScreen: false},
|
||||
output: [{file: 'dist/tween.d.ts', format: 'es'}],
|
||||
plugins: [dts()],
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user