Skip to content

Commit d76b774

Browse files
authored
Merge pull request #581 from tweenjs/improve-scripts
Improve scripts
2 parents 0ed1d45 + 7886750 commit d76b774

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
],
2626
"dependencies": {},
2727
"scripts": {
28+
"dev": "(npm run tsc-watch -- --preserveWatchOutput & p1=$!; npm run rollup-build -- --watch & p2=$!; wait $p1 $p2)",
2829
"build": "rimraf dist .tmp && node scripts/write-version.js && npm run tsc && npm run rollup-build",
2930
"rollup-build": "rollup -c ./rollup.config.js",
3031
"tsc": "tsc",
@@ -37,9 +38,10 @@
3738
"prettier": "prettier './**/*.{js,ts,md,json,html,css}'",
3839
"prepare": "npm run build",
3940
"version": "npm test && git add .",
40-
"release:patch": "npm version patch --message 'v%s' && npm publish && git push --follow-tags",
41-
"release:minor": "npm version minor --message 'v%s' && npm publish && git push --follow-tags",
42-
"release:major": "npm version major --message 'v%s' && npm publish && git push --follow-tags"
41+
"release:patch": "npm version patch --message 'v%s' && npm publish && npm run _release:push-branch",
42+
"release:minor": "npm version minor --message 'v%s' && npm publish && npm run _release:push-branch",
43+
"release:major": "npm version major --message 'v%s' && npm publish && npm run _release:push-branch",
44+
"_release:push-branch": "git push --follow-tags --set-upstream origin `git rev-parse --abbrev-ref HEAD`"
4345
},
4446
"author": "tween.js contributors (https://github.com/tweenjs/tween.js/graphs/contributors)",
4547
"devDependencies": {

rollup.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,34 @@ export default [
55
input: '.tmp/Index.js',
66
// https://github.com/rollup/rollup/wiki/Troubleshooting#this-is-undefined
77
context: 'this',
8+
watch: {clearScreen: false},
89
output: [
910
{
1011
file: 'dist/tween.umd.js',
1112
name: 'TWEEN',
1213
format: 'umd',
14+
exports: 'named',
1315
},
1416
{
1517
file: 'dist/tween.amd.js',
1618
format: 'amd',
19+
exports: 'named',
1720
},
1821
{
1922
file: 'dist/tween.cjs.js',
2023
format: 'cjs',
24+
exports: 'named',
2125
},
2226
{
2327
file: 'dist/tween.esm.js',
2428
format: 'es',
29+
exports: 'named',
2530
},
2631
],
2732
},
2833
{
2934
input: './.tmp/Index.d.ts',
35+
watch: {clearScreen: false},
3036
output: [{file: 'dist/tween.d.ts', format: 'es'}],
3137
plugins: [dts()],
3238
},

0 commit comments

Comments
 (0)