From cc2c941907351b670d81cec46d3db77ff356d48e Mon Sep 17 00:00:00 2001 From: John Tran Date: Mon, 4 Jan 2021 13:55:42 -0800 Subject: [PATCH] build: add watch script (#339) --- Makefile | 1 + package.json | 5 ++++- yarn.lock | 20 ++++++++++++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1efef90a..c7a1fe62 100644 --- a/Makefile +++ b/Makefile @@ -90,6 +90,7 @@ $(SEGMENT_SNIPPET_OUT): $(SRC) $(SNIPPET) build: $(TESTS) $(OUT) $(SNIPPET_OUT) $(SEGMENT_SNIPPET_OUT) @$(ROLLUP) --config rollup.test.js @$(ROLLUP) --config rollup.snippet-tests.js + @-echo "Done building" docs: @$(JSDOC) -d ./documentation/ src/*.js diff --git a/package.json b/package.json index ad01c3e8..65606757 100644 --- a/package.json +++ b/package.json @@ -64,11 +64,14 @@ "rollup-plugin-uglify": "^6.0.2", "semantic-release": "^17.1.1", "sinon": "^7.0.0", - "uglify-js": "^2.0.0" + "uglify-js": "^2.0.0", + "watch": "^1.0.2" }, "scripts": { "test": "make test", "dev": "node test/browser/server.js", + "build": "make build", + "build:watch": "watch 'yarn build' src/ test/", "docs:install": "cd website/ && yarn install", "docs:generate-jsdoc": "cd website && yarn generate-jsdoc", "docs:start": "cd website/ && yarn start", diff --git a/yarn.lock b/yarn.lock index 1953a844..2cc43ed4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2949,6 +2949,13 @@ eventemitter3@^4.0.0: resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== +exec-sh@^0.2.0: + version "0.2.2" + resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.2.2.tgz#2a5e7ffcbd7d0ba2755bdecb16e5a427dfbdec36" + integrity sha512-FIUCJz1RbuS0FKTdaAafAByGS0CPvU3R0MeHxgtl+djzCc//F8HakL8GzmVNZanasTbTAY/3DRFA0KpVqj/eAw== + dependencies: + merge "^1.2.0" + execa@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" @@ -5342,6 +5349,11 @@ merge2@^1.3.0: resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== +merge@^1.2.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.1.tgz#38bebf80c3220a8a487b6fcfb3941bb11720c145" + integrity sha512-VjFo4P5Whtj4vsLzsYBu5ayHhoHJ0UqNm7ibvShmbmoz7tGi0vXaoJbGdB+GmDMLUdg8DpQXEIeVDAe8MaABvQ== + methods@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" @@ -8702,6 +8714,14 @@ walk-back@^4.0.0: resolved "https://registry.yarnpkg.com/walk-back/-/walk-back-4.0.0.tgz#9e4ad2bd72038f3beed2d83180f9fd40b233bfab" integrity sha512-kudCA8PXVQfrqv2mFTG72vDBRi8BKWxGgFLwPpzHcpZnSwZk93WMwUDVcLHWNsnm+Y0AC4Vb6MUNRgaHfyV2DQ== +watch@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/watch/-/watch-1.0.2.tgz#340a717bde765726fa0aa07d721e0147a551df0c" + integrity sha1-NApxe952Vyb6CqB9ch4BR6VR3ww= + dependencies: + exec-sh "^0.2.0" + minimist "^1.2.0" + wcwidth@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8"