From bfefa0902b5fe603a9bfc118cdabcf79ddbd6030 Mon Sep 17 00:00:00 2001 From: jpellizzari Date: Tue, 17 Jan 2017 13:40:51 -0800 Subject: [PATCH 1/8] Added exports and install script --- .gitignore | 1 + client/.babelrc | 2 +- client/.eslintrc | 1 + client/index.js | 2 ++ client/package.json | 9 +++++++-- 5 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 client/index.js diff --git a/.gitignore b/.gitignore index 766b018a5..d8b362efc 100644 --- a/.gitignore +++ b/.gitignore @@ -56,3 +56,4 @@ vendor/github.com/ugorji/go/codec/codecgen/bin/* client/build-external/* prog/staticui/* prog/externalui/* +client/dist diff --git a/client/.babelrc b/client/.babelrc index 431d458d2..d0132c2fd 100644 --- a/client/.babelrc +++ b/client/.babelrc @@ -1,4 +1,4 @@ { - "plugins": ["lodash"], + "plugins": ["lodash", "transform-export-extensions"], "presets": ["es2015", "react"] } diff --git a/client/.eslintrc b/client/.eslintrc index 456aca91d..c6ed99ee7 100644 --- a/client/.eslintrc +++ b/client/.eslintrc @@ -1,5 +1,6 @@ { "extends": "airbnb", + "parser": "babel-eslint", "env": { "browser": true, "jest": true, diff --git a/client/index.js b/client/index.js new file mode 100644 index 000000000..cc691d976 --- /dev/null +++ b/client/index.js @@ -0,0 +1,2 @@ +exports.reducer = require('./dist/reducers/root').default; +exports.Scope = require('./dist/components/app').default; diff --git a/client/package.json b/client/package.json index 6f6d797b3..76dd79148 100644 --- a/client/package.json +++ b/client/package.json @@ -5,7 +5,10 @@ "repository": "weaveworks/scope", "license": "Apache-2.0", "private": true, + "main": "index.js", "dependencies": { + "babel-plugin-transform-export-extensions": "^6.8.0", + "babel-plugin-lodash": "^3.2.10", "babel-polyfill": "6.16.0", "classnames": "2.2.5", "d3-array": "1.0.2", @@ -39,15 +42,16 @@ "reselect": "2.5.4", "timely": "0.1.0", "whatwg-fetch": "2.0.1", + "react-addons-perf": "15.4.1", "xterm": "2.1.0" }, "devDependencies": { "autoprefixer": "6.5.3", + "babel-cli": "^6.18.0", "babel-core": "6.18.2", "babel-eslint": "7.1.1", "babel-jest": "17.0.2", "babel-loader": "6.2.8", - "babel-plugin-lodash": "3.2.10", "babel-preset-es2015": "6.18.0", "babel-preset-react": "6.16.0", "clean-webpack-plugin": "0.1.14", @@ -67,7 +71,6 @@ "json-loader": "0.5.4", "node-sass": "3.13.1", "postcss-loader": "1.2.0", - "react-addons-perf": "15.4.1", "redux-devtools": "3.3.1", "redux-devtools-dock-monitor": "1.1.1", "redux-devtools-log-monitor": "1.1.1", @@ -88,6 +91,8 @@ "scripts": { "build": "webpack --config webpack.production.config.js", "build-external": "EXTERNAL=true webpack --config webpack.production.config.js", + "build-pkg": "babel app/scripts --ignore __tests__ --out-dir dist", + "install": "npm run build-pkg", "start": "node server.js", "start-production": "NODE_ENV=production node server.js", "test": "jest", From d5d853ebba5042f610dd81e749a5edd9b4de2541 Mon Sep 17 00:00:00 2001 From: jpellizzari Date: Thu, 19 Jan 2017 14:13:03 -0800 Subject: [PATCH 2/8] Added package installation scripts --- client/package.json | 2 +- client/post-install.sh | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100755 client/post-install.sh diff --git a/client/package.json b/client/package.json index 76dd79148..3df5cb9c6 100644 --- a/client/package.json +++ b/client/package.json @@ -92,7 +92,7 @@ "build": "webpack --config webpack.production.config.js", "build-external": "EXTERNAL=true webpack --config webpack.production.config.js", "build-pkg": "babel app/scripts --ignore __tests__ --out-dir dist", - "install": "npm run build-pkg", + "install": "./post-install.sh", "start": "node server.js", "start-production": "NODE_ENV=production node server.js", "test": "jest", diff --git a/client/post-install.sh b/client/post-install.sh new file mode 100755 index 000000000..d50143ddc --- /dev/null +++ b/client/post-install.sh @@ -0,0 +1,7 @@ +pwd=$(pwd) +if [[ $pwd == *"node_modules"* ]]; then + echo "Installed as Node module. Building package..." + npm run build-pkg + else + echo "Installed as stand-alone UI. Skipped building package" +fi From 0575e85ca1ec119f07f13cdce15a8f7c5f20892f Mon Sep 17 00:00:00 2001 From: jpellizzari Date: Thu, 19 Jan 2017 16:33:45 -0800 Subject: [PATCH 3/8] Changed API URLs when running as dependency --- client/.babelrc | 2 +- client/app/scripts/utils/web-api-utils.js | 24 ++++++++++++++--------- client/package.json | 1 - scope | 0 4 files changed, 16 insertions(+), 11 deletions(-) mode change 100755 => 100644 scope diff --git a/client/.babelrc b/client/.babelrc index d0132c2fd..431d458d2 100644 --- a/client/.babelrc +++ b/client/.babelrc @@ -1,4 +1,4 @@ { - "plugins": ["lodash", "transform-export-extensions"], + "plugins": ["lodash"], "presets": ["es2015", "react"] } diff --git a/client/app/scripts/utils/web-api-utils.js b/client/app/scripts/utils/web-api-utils.js index 15c063139..e7ffbcd24 100644 --- a/client/app/scripts/utils/web-api-utils.js +++ b/client/app/scripts/utils/web-api-utils.js @@ -58,8 +58,14 @@ export function basePathSlash(urlPath) { return `${basePath(urlPath)}/`; } +const API_PATH = basePathSlash(window.location.pathname) === '/' + ? 'api' + : `/api${window.location.pathname}/api`; + const wsProto = location.protocol === 'https:' ? 'wss' : 'ws'; -const wsUrl = `${wsProto}://${location.host}${basePath(location.pathname)}`; +const wsUrl = basePathSlash(window.location.pathname) === '/' + ? `${wsProto}://${location.host}${basePath(window.location.pathname)}` + : `${wsProto}://${location.host}/api${basePath(window.location.pathname)}`; function createWebsocket(topologyUrl, optionsQuery, dispatch) { if (socket) { @@ -136,7 +142,7 @@ export function getAllNodes(getState, dispatch) { export function getTopologies(options, dispatch) { clearTimeout(topologyTimer); const optionsQuery = buildOptionsQuery(options); - const url = `api/topology?${optionsQuery}`; + const url = `${API_PATH}/topology?${optionsQuery}`; reqwest({ url, success: (res) => { @@ -171,13 +177,13 @@ export function getNodeDetails(topologyUrlsById, currentTopologyId, options, nod const obj = nodeMap.last(); if (obj && topologyUrlsById.has(obj.topologyId)) { const topologyUrl = topologyUrlsById.get(obj.topologyId); - let urlComponents = [topologyUrl, '/', encodeURIComponent(obj.id)]; + let urlComponents = [API_PATH, '/', trimStart(topologyUrl, '/api'), '/', encodeURIComponent(obj.id)]; if (currentTopologyId === obj.topologyId) { // Only forward filters for nodes in the current topology const optionsQuery = buildOptionsQuery(options); urlComponents = urlComponents.concat(['?', optionsQuery]); } - const url = urlComponents.join('').substr(1); + const url = urlComponents.join(''); reqwest({ url, @@ -204,7 +210,7 @@ export function getNodeDetails(topologyUrlsById, currentTopologyId, options, nod export function getApiDetails(dispatch) { clearTimeout(apiDetailsTimer); - const url = 'api'; + const url = API_PATH; reqwest({ url, success: (res) => { @@ -225,7 +231,7 @@ export function getApiDetails(dispatch) { export function doControlRequest(nodeId, control, dispatch) { clearTimeout(controlErrorTimer); - const url = `api/control/${encodeURIComponent(control.probeId)}/` + const url = `${API_PATH}/control/${encodeURIComponent(control.probeId)}/` + `${encodeURIComponent(control.nodeId)}/${control.id}`; reqwest({ method: 'POST', @@ -261,7 +267,7 @@ export function doControlRequest(nodeId, control, dispatch) { export function doResizeTty(pipeId, control, cols, rows) { - const url = `api/control/${encodeURIComponent(control.probeId)}/` + const url = `${API_PATH}/control/${encodeURIComponent(control.probeId)}/` + `${encodeURIComponent(control.nodeId)}/${control.id}`; return reqwest({ @@ -276,7 +282,7 @@ export function doResizeTty(pipeId, control, cols, rows) { export function deletePipe(pipeId, dispatch) { - const url = `api/pipe/${encodeURIComponent(pipeId)}`; + const url = `${API_PATH}/pipe/${encodeURIComponent(pipeId)}`; reqwest({ method: 'DELETE', url, @@ -292,7 +298,7 @@ export function deletePipe(pipeId, dispatch) { export function getPipeStatus(pipeId, dispatch) { - const url = `api/pipe/${encodeURIComponent(pipeId)}/check`; + const url = `${API_PATH}/pipe/${encodeURIComponent(pipeId)}/check`; reqwest({ method: 'GET', url, diff --git a/client/package.json b/client/package.json index 3df5cb9c6..64253ff4d 100644 --- a/client/package.json +++ b/client/package.json @@ -7,7 +7,6 @@ "private": true, "main": "index.js", "dependencies": { - "babel-plugin-transform-export-extensions": "^6.8.0", "babel-plugin-lodash": "^3.2.10", "babel-polyfill": "6.16.0", "classnames": "2.2.5", diff --git a/scope b/scope old mode 100755 new mode 100644 From c1303e181e43bd57d48da137cd031bb9514fb000 Mon Sep 17 00:00:00 2001 From: jpellizzari Date: Thu, 19 Jan 2017 16:56:18 -0800 Subject: [PATCH 4/8] Added ActionTypes and styles exports --- client/index.js | 1 + client/package.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/client/index.js b/client/index.js index cc691d976..5335356d1 100644 --- a/client/index.js +++ b/client/index.js @@ -1,2 +1,3 @@ exports.reducer = require('./dist/reducers/root').default; exports.Scope = require('./dist/components/app').default; +exports.ActionTypes = require('./dist/constants/action-types').default; diff --git a/client/package.json b/client/package.json index 64253ff4d..1ba8b4580 100644 --- a/client/package.json +++ b/client/package.json @@ -90,7 +90,7 @@ "scripts": { "build": "webpack --config webpack.production.config.js", "build-external": "EXTERNAL=true webpack --config webpack.production.config.js", - "build-pkg": "babel app/scripts --ignore __tests__ --out-dir dist", + "build-pkg": "babel app/scripts --ignore __tests__ --out-dir dist && cp -R app/styles dist/styles", "install": "./post-install.sh", "start": "node server.js", "start-production": "NODE_ENV=production node server.js", From 59ed9b8f3fc550230817ef28a846a09a50103856 Mon Sep 17 00:00:00 2001 From: jpellizzari Date: Fri, 20 Jan 2017 12:04:19 -0800 Subject: [PATCH 5/8] Added S3 release script --- client/.gitignore | 1 + client/Dockerfile | 2 +- client/package.json | 5 +++-- client/{post-install.sh => post-install} | 1 + scope | 2 +- 5 files changed, 7 insertions(+), 4 deletions(-) rename client/{post-install.sh => post-install} (94%) mode change 100644 => 100755 scope diff --git a/client/.gitignore b/client/.gitignore index 1026d1331..7bea36508 100644 --- a/client/.gitignore +++ b/client/.gitignore @@ -2,3 +2,4 @@ node_modules build/ coverage/ test/*png +*.tgz diff --git a/client/Dockerfile b/client/Dockerfile index c06827e56..085649e41 100644 --- a/client/Dockerfile +++ b/client/Dockerfile @@ -1,6 +1,6 @@ FROM node:6.9.0 WORKDIR /home/weave -COPY package.json /home/weave/ +COPY package.json post-install /home/weave/ ENV NPM_CONFIG_LOGLEVEL=warn NPM_CONFIG_PROGRESS=false RUN npm install COPY webpack.local.config.js webpack.production.config.js server.js .babelrc .eslintrc .eslintignore /home/weave/ diff --git a/client/package.json b/client/package.json index 1ba8b4580..86bb7ce5d 100644 --- a/client/package.json +++ b/client/package.json @@ -91,7 +91,7 @@ "build": "webpack --config webpack.production.config.js", "build-external": "EXTERNAL=true webpack --config webpack.production.config.js", "build-pkg": "babel app/scripts --ignore __tests__ --out-dir dist && cp -R app/styles dist/styles", - "install": "./post-install.sh", + "install": "./post-install", "start": "node server.js", "start-production": "NODE_ENV=production node server.js", "test": "jest", @@ -99,7 +99,8 @@ "lint": "eslint app", "clean": "rm build/app.js", "noprobe": "../scope stop && ../scope launch --no-probe --app.window 8760h", - "loadreport": "npm run noprobe && sleep 1 && curl -X POST -H \"Content-Type: application/json\" http://$BACKEND_HOST/api/report -d" + "loadreport": "npm run noprobe && sleep 1 && curl -X POST -H \"Content-Type: application/json\" http://$BACKEND_HOST/api/report -d", + "s3-publish" : "npm pack && aws s3 cp weave-scope-*.tgz s3://weaveworks-npm-modules/weave-scope/ --acl public-read" }, "jest": { "transform": { diff --git a/client/post-install.sh b/client/post-install similarity index 94% rename from client/post-install.sh rename to client/post-install index d50143ddc..2297fa253 100755 --- a/client/post-install.sh +++ b/client/post-install @@ -1,3 +1,4 @@ +#!/bin/bash pwd=$(pwd) if [[ $pwd == *"node_modules"* ]]; then echo "Installed as Node module. Building package..." diff --git a/scope b/scope old mode 100644 new mode 100755 index 5597b50da..14f3fe360 --- a/scope +++ b/scope @@ -74,7 +74,7 @@ check_docker_access() { } # - The image embeds the weave script & Docker 1.3.1 client -# - Docker versions prior to 1.5.0 do not support --pid=host +# - Docker versions prior to 1.5.0 do not support --pid=host # - Weave needs 1.6.0 now (image pulling changes) MIN_DOCKER_VERSION=1.6.0 From 0bf7fa49dd392a78020a6a9f43ef20d156d5a95d Mon Sep 17 00:00:00 2001 From: jpellizzari Date: Mon, 23 Jan 2017 14:11:03 -0800 Subject: [PATCH 6/8] Exported wsUrl constant from web-api-utils for the terminal component --- client/app/scripts/components/terminal.js | 4 +--- client/app/scripts/utils/web-api-utils.js | 2 +- client/package.json | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/client/app/scripts/components/terminal.js b/client/app/scripts/components/terminal.js index ed9133c36..55b2219aa 100644 --- a/client/app/scripts/components/terminal.js +++ b/client/app/scripts/components/terminal.js @@ -9,10 +9,8 @@ import Term from 'xterm'; import { clickCloseTerminal } from '../actions/app-actions'; import { getNeutralColor } from '../utils/color-utils'; import { setDocumentTitle } from '../utils/title-utils'; -import { getPipeStatus, basePath, doResizeTty } from '../utils/web-api-utils'; +import { getPipeStatus, doResizeTty, wsUrl } from '../utils/web-api-utils'; -const wsProto = location.protocol === 'https:' ? 'wss' : 'ws'; -const wsUrl = `${wsProto}://${location.host}${basePath(location.pathname)}`; const log = debug('scope:terminal'); const DEFAULT_COLS = 80; diff --git a/client/app/scripts/utils/web-api-utils.js b/client/app/scripts/utils/web-api-utils.js index e7ffbcd24..1a858d2c3 100644 --- a/client/app/scripts/utils/web-api-utils.js +++ b/client/app/scripts/utils/web-api-utils.js @@ -63,7 +63,7 @@ const API_PATH = basePathSlash(window.location.pathname) === '/' : `/api${window.location.pathname}/api`; const wsProto = location.protocol === 'https:' ? 'wss' : 'ws'; -const wsUrl = basePathSlash(window.location.pathname) === '/' +export const wsUrl = basePathSlash(window.location.pathname) === '/' ? `${wsProto}://${location.host}${basePath(window.location.pathname)}` : `${wsProto}://${location.host}/api${basePath(window.location.pathname)}`; diff --git a/client/package.json b/client/package.json index 86bb7ce5d..c811a738b 100644 --- a/client/package.json +++ b/client/package.json @@ -90,7 +90,7 @@ "scripts": { "build": "webpack --config webpack.production.config.js", "build-external": "EXTERNAL=true webpack --config webpack.production.config.js", - "build-pkg": "babel app/scripts --ignore __tests__ --out-dir dist && cp -R app/styles dist/styles", + "build-pkg": "babel app/scripts --ignore __tests__ --out-dir dist && cp -R app/styles dist", "install": "./post-install", "start": "node server.js", "start-production": "NODE_ENV=production node server.js", From a6412f12b2c650ac312da4d5f161d53b6a23c8a8 Mon Sep 17 00:00:00 2001 From: jpellizzari Date: Tue, 24 Jan 2017 09:31:17 -0800 Subject: [PATCH 7/8] Scoped CSS classes inside .scope-app class --- client/app/scripts/components/app.js | 2 +- client/app/scripts/utils/title-utils.js | 2 +- client/app/styles/main.scss | 91 +++++++++++-------------- scope | 2 +- 4 files changed, 43 insertions(+), 54 deletions(-) diff --git a/client/app/scripts/components/app.js b/client/app/scripts/components/app.js index 3361c7285..05ac9bf59 100644 --- a/client/app/scripts/components/app.js +++ b/client/app/scripts/components/app.js @@ -104,7 +104,7 @@ class App extends React.Component { const isIframe = window !== window.top; return ( -
+
{showingDebugToolbar() && } {showingHelp && } diff --git a/client/app/scripts/utils/title-utils.js b/client/app/scripts/utils/title-utils.js index fed4b86a1..47f035471 100644 --- a/client/app/scripts/utils/title-utils.js +++ b/client/app/scripts/utils/title-utils.js @@ -1,5 +1,5 @@ -const PREFIX = 'Weave Scope'; +const PREFIX = document.title || 'Weave Scope'; const SEPARATOR = ' - '; export function setDocumentTitle(title) { diff --git a/client/app/styles/main.scss b/client/app/styles/main.scss index 3b23b92e6..62be5fa87 100644 --- a/client/app/styles/main.scss +++ b/client/app/styles/main.scss @@ -115,63 +115,52 @@ $label-background-color: fade-out($background-average-color, .3); } } -* { - box-sizing: border-box; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -} -*:before, -*:after { - box-sizing: border-box; -} - -html { - -webkit-font-smoothing: antialiased; -} - -html, -body { - height: 100%; - width: 100%; -} - -/* Space out content a bit */ -body { - background: $body-background-color; - color: $text-color; - line-height: 150%; - font-family: $base-font; - font-size: 13px; - margin: 0; -} - -p { - line-height: 20px; - padding-top: 6px; - margin-bottom: 14px; - letter-spacing: 0; - font-weight: 400; - color: $text-color; -} - -h2 { - font-size: 34px; - line-height: 40px; - padding-top: 8px; - margin-bottom: 12px; - font-weight: 400; -} - .hide { opacity: 0; } -.app { - position: fixed; - top: 0; - left: 0; +.scope-app { + -webkit-font-smoothing: antialiased; + background: $body-background-color; bottom: 0; - right: 0; + color: $text-color; + font-family: $base-font; + font-size: 13px; + height: 100%; + left: 0; + line-height: 150%; + margin: 0; overflow: auto; + position: fixed; + right: 0; + top: 0; + width: 100%; + + * { + box-sizing: border-box; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + } + *:before, + *:after { + box-sizing: border-box; + } + + p { + line-height: 20px; + padding-top: 6px; + margin-bottom: 14px; + letter-spacing: 0; + font-weight: 400; + color: $text-color; + } + + h2 { + font-size: 34px; + line-height: 40px; + padding-top: 8px; + margin-bottom: 12px; + font-weight: 400; + } } .header { diff --git a/scope b/scope index 14f3fe360..5597b50da 100755 --- a/scope +++ b/scope @@ -74,7 +74,7 @@ check_docker_access() { } # - The image embeds the weave script & Docker 1.3.1 client -# - Docker versions prior to 1.5.0 do not support --pid=host +# - Docker versions prior to 1.5.0 do not support --pid=host # - Weave needs 1.6.0 now (image pulling changes) MIN_DOCKER_VERSION=1.6.0 From 9acca772a9663e300421e90e99a75d841d1cd0c6 Mon Sep 17 00:00:00 2001 From: jpellizzari Date: Tue, 24 Jan 2017 12:09:26 -0800 Subject: [PATCH 8/8] Added npm module scripts to CI --- .gitignore | 2 +- Makefile | 3 +++ circle.yml | 3 ++- client/.gitignore | 2 +- client/Dockerfile | 2 +- client/package.json | 6 +++--- client/post-install | 8 -------- 7 files changed, 11 insertions(+), 15 deletions(-) delete mode 100755 client/post-install diff --git a/.gitignore b/.gitignore index d8b362efc..3d06bab7e 100644 --- a/.gitignore +++ b/.gitignore @@ -56,4 +56,4 @@ vendor/github.com/ugorji/go/codec/codecgen/bin/* client/build-external/* prog/staticui/* prog/externalui/* -client/dist +client/pkg diff --git a/Makefile b/Makefile index c6928a28c..e30aaedcf 100644 --- a/Makefile +++ b/Makefile @@ -167,6 +167,9 @@ ui-upload: client/build-external/index.html AWS_SECRET_ACCESS_KEY=$$UI_BUCKET_KEY_SECRET \ aws s3 cp client/build-external/ s3://static.weave.works/scope-ui/ --recursive --exclude '*.html' +ui-build-pkg: + cd client && npm run build-pkg && npm run s3-publish + clean: $(GO) clean ./... # Don't actually rmi the build images - rm'ing the .uptodate files is enough to ensure diff --git a/circle.yml b/circle.yml index 47ed292d7..5555fa4b0 100644 --- a/circle.yml +++ b/circle.yml @@ -75,7 +75,8 @@ deployment: )) && docker push ${DOCKER_ORGANIZATION:-$DOCKER_USER}/scope && docker push ${DOCKER_ORGANIZATION:-$DOCKER_USER}/scope:$(./tools/image-tag) && - (test -z "${UI_BUCKET_KEY_ID}" || make ui-upload) + (test -z "${UI_BUCKET_KEY_ID}" || make ui-upload) && + make ui-build-pkg ) - | test -z "${QUAY_USER}" || ( diff --git a/client/.gitignore b/client/.gitignore index 7bea36508..ccd631864 100644 --- a/client/.gitignore +++ b/client/.gitignore @@ -2,4 +2,4 @@ node_modules build/ coverage/ test/*png -*.tgz +weave-scope.tgz diff --git a/client/Dockerfile b/client/Dockerfile index 085649e41..c06827e56 100644 --- a/client/Dockerfile +++ b/client/Dockerfile @@ -1,6 +1,6 @@ FROM node:6.9.0 WORKDIR /home/weave -COPY package.json post-install /home/weave/ +COPY package.json /home/weave/ ENV NPM_CONFIG_LOGLEVEL=warn NPM_CONFIG_PROGRESS=false RUN npm install COPY webpack.local.config.js webpack.production.config.js server.js .babelrc .eslintrc .eslintignore /home/weave/ diff --git a/client/package.json b/client/package.json index c811a738b..4e0129a40 100644 --- a/client/package.json +++ b/client/package.json @@ -90,8 +90,8 @@ "scripts": { "build": "webpack --config webpack.production.config.js", "build-external": "EXTERNAL=true webpack --config webpack.production.config.js", - "build-pkg": "babel app/scripts --ignore __tests__ --out-dir dist && cp -R app/styles dist", - "install": "./post-install", + "build-pkg": "babel app/scripts --ignore __tests__ --out-dir pkg && cp package.json pkg/ && cp -R app/styles pkg/", + "bundle": "npm pack pkg && mv weave-scope-$npm_package_version.tgz weave-scope.tgz", "start": "node server.js", "start-production": "NODE_ENV=production node server.js", "test": "jest", @@ -100,7 +100,7 @@ "clean": "rm build/app.js", "noprobe": "../scope stop && ../scope launch --no-probe --app.window 8760h", "loadreport": "npm run noprobe && sleep 1 && curl -X POST -H \"Content-Type: application/json\" http://$BACKEND_HOST/api/report -d", - "s3-publish" : "npm pack && aws s3 cp weave-scope-*.tgz s3://weaveworks-npm-modules/weave-scope/ --acl public-read" + "s3-publish": "aws s3 cp weave-scope.tgz s3://weaveworks-npm-modules/weave-scope/ --acl public-read" }, "jest": { "transform": { diff --git a/client/post-install b/client/post-install deleted file mode 100755 index 2297fa253..000000000 --- a/client/post-install +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -pwd=$(pwd) -if [[ $pwd == *"node_modules"* ]]; then - echo "Installed as Node module. Building package..." - npm run build-pkg - else - echo "Installed as stand-alone UI. Skipped building package" -fi