From bc52d6c7d2b9d1533f8390e7be6295040ddd7cfc Mon Sep 17 00:00:00 2001 From: Alexander Bazo Date: Thu, 22 Aug 2019 20:27:47 +0200 Subject: [PATCH] Update build script --- package-lock.json | 24 ++++++++++++++++++++++++ package.json | 9 ++++++--- 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index e3ce404..d2c20c9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -32,6 +32,30 @@ "@types/node": "^12.6.9", "acorn": "^6.2.1" } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "uglify-es": { + "version": "3.3.9", + "resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.3.9.tgz", + "integrity": "sha512-r+MU0rfv4L/0eeW3xZrd16t4NZfK8Ld4SWVglYBb7ez5uXFWHuVRs6xCTrf1yirs9a4j4Y27nn7SRfO6v67XsQ==", + "dev": true, + "requires": { + "commander": "~2.13.0", + "source-map": "~0.6.1" + }, + "dependencies": { + "commander": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.13.0.tgz", + "integrity": "sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA==", + "dev": true + } + } } } } diff --git a/package.json b/package.json index 3d7feb5..8f58af5 100644 --- a/package.json +++ b/package.json @@ -5,12 +5,15 @@ "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", - "build": "rollup lib/index.js --format iife --name \"gazeclient\" --file build/gazeclient.js", - "postbuild": "cp build/gazeclient.js demo/gazeclient.js" + "build": "npm run rollup && npm run uglify", + "rollup": "rollup lib/index.js --sourcemap --format iife --name \"gazeclient\" --file build/gazeclient.js --banner \"// GazeClient Version 1.0 - [https://lab.las3.de/gitlab/eye-tracking-classroom/gaze-client.js]\"", + "uglify": "uglifyjs build/gazeclient.js -o build/gazeclient.min.js", + "postuglify": "cp build/gazeclient.min.js demo/gazeclient.min.js" }, "author": "Alexander Bazo ", "license": "MIT", "devDependencies": { - "rollup": "^1.19.4" + "rollup": "^1.19.4", + "uglify-es": "^3.3.9" } } -- libgit2 0.26.0