From cef63d8cd803c2aae770b493170ecb194f2c3e37 Mon Sep 17 00:00:00 2001 From: Steve Hall Date: Sun, 23 Jul 2017 15:37:52 -0700 Subject: [PATCH] add minified build --- package-lock.json | 20 +++++++++++++++++++- package.json | 8 +++++--- scripts/copy-files.js | 6 +++--- 3 files changed, 27 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index d0f8d6b..057bdec 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "subunit", - "version": "v0.5.1", + "version": "v0.5.2", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -4253,6 +4253,24 @@ "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", "dev": true }, + "uglify-es": { + "version": "3.0.26", + "resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.0.26.tgz", + "integrity": "sha512-WW6GAQCeb2YwGsayWTvf5pVxzVrSfDa5B3pJfKp/sCy3TgBQZ+1A5MZpyxRoZRzGTmPbbIAXo/GlBxHTPShVrA==", + "dev": true, + "requires": { + "commander": "2.11.0", + "source-map": "0.5.6" + }, + "dependencies": { + "commander": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz", + "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==", + "dev": true + } + } + }, "ultron": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.0.2.tgz", diff --git a/package.json b/package.json index f7e89b4..95916c5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "subunit", - "version": "v0.5.1", + "version": "v0.5.2", "private": true, "description": "D3 style selections in WebGL, select into a THREE.js scene graph", "main": "index.js", @@ -10,8 +10,9 @@ "threejs" ], "scripts": { - "build": "rm -rf dist && mkdir dist && npm run build:lib && npm run build:copy-files", + "build": "rm -rf dist && mkdir dist && npm run build:lib && npm run build:min && npm run build:copy-files", "build:lib": "rollup --config rollup.config.prd.js", + "build:min": "uglifyjs dist/subunit.js -ecma 5 -c -m -o dist/subunit.min.js", "build:copy-files": "babel-node ./scripts/copy-files.js", "start": "rm -rf dist && mkdir dist && rollup -c rollup.config.dev.js --watch" }, @@ -46,7 +47,8 @@ "rollup-watch": "^3.2.2", "systemjs": "^0.20.13", "systemjs-plugin-babel": "0.0.21", - "three": "^0.85.2" + "three": "^0.85.2", + "uglify-es": "^3.0.26" }, "dependencies": { "d3-interpolate": "^1.1.5", diff --git a/scripts/copy-files.js b/scripts/copy-files.js index cadbff9..ad30b3c 100644 --- a/scripts/copy-files.js +++ b/scripts/copy-files.js @@ -45,9 +45,9 @@ function createPackageFile() { author, version, description, - main: './subunit.js', - module: './subunit.js', - 'jsnext:main': './subunit.js', + main: './subunit.min.js', + module: './subunit.min.js', + 'jsnext:main': './subunit.min.js', keywords, repository, license,