From e1919c5ea32433092bdb80f68085180f8ec69272 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Wed, 26 Oct 2016 13:32:26 +0100 Subject: [PATCH 1/2] Don't include two copies of the CSS in the tarball Aggregate our CSS into build/components.css instead of vector/components.css, so that it isn't included in the tarball. --- .gitignore | 2 +- package.json | 7 ++++--- src/vector/index.js | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 200fa33dd1..46368a6446 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +/build /cert.pem /karma-reports /key.pem @@ -5,7 +6,6 @@ /node_modules /packages/ /vector/bundle.* -/vector/components.css /vector/emojione/ /vector/config.json /vector/olm.js diff --git a/package.json b/package.json index dee6ecced4..9c5b29494b 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "reskindex": "reskindex -h src/header", "build:emojione": "cpx \"node_modules/emojione/assets/svg/*\" vector/emojione/svg/", "build:modernizr": "modernizr -c .modernizr.json -d src/vector/modernizr.js", - "build:css": "catw \"src/skins/vector/css/**/*.css\" -o vector/components.css --no-watch", + "build:css": "mkdirp build && catw \"src/skins/vector/css/**/*.css\" -o build/components.css --no-watch", "build:compile": "babel --source-maps -d lib src", "build:bundle": "NODE_ENV=production webpack -p lib/vector/index.js vector/bundle.js", "build:bundle:dev": "webpack --optimize-occurence-order lib/vector/index.js vector/bundle.js", @@ -25,12 +25,12 @@ "start:emojione": "cpx \"node_modules/emojione/assets/svg/*\" vector/emojione/svg/ -w", "start:js": "webpack -w src/vector/index.js vector/bundle.js", "start:js:prod": "NODE_ENV=production webpack -w src/vector/index.js vector/bundle.js", - "start:skins:css": "catw \"src/skins/vector/css/**/*.css\" -o vector/components.css", + "start:skins:css": "mkdirp build && catw \"src/skins/vector/css/**/*.css\" -o build/components.css", "start:staticfiles": "cpx -Lwv node_modules/olm/olm.js vector/", "//cache": "Note the -c 1 below due to https://code.google.com/p/chromium/issues/detail?id=508270", "start": "node scripts/babelcheck.js && parallelshell \"npm run start:staticfiles\" \"npm run start:emojione\" \"npm run start:js\" \"npm run start:skins:css\" \"http-server -c 1 vector\"", "start:prod": "parallelshell \"npm run start:staticfiles\" \"npm run start:emojione\" \"npm run start:js:prod\" \"npm run start:skins:css\" \"http-server -c 1 vector\"", - "clean": "rimraf lib vector/olm.js vector/bundle.css vector/bundle.js vector/bundle.js.map vector/webpack.css* vector/emojione", + "clean": "rimraf build lib vector/olm.js vector/bundle.css vector/bundle.js vector/bundle.js.map vector/webpack.css* vector/emojione", "prepublish": "npm run build:css && npm run build:compile", "test": "karma start --single-run=true --autoWatch=false --browsers PhantomJS --colors=false", "test:multi": "karma start" @@ -92,6 +92,7 @@ "karma-phantomjs-launcher": "^1.0.0", "karma-sourcemap-loader": "^0.3.7", "karma-webpack": "^1.7.0", + "mkdirp": "^0.5.1", "mocha": "^2.4.5", "parallelshell": "^1.2.0", "phantomjs-prebuilt": "^2.1.7", diff --git a/src/vector/index.js b/src/vector/index.js index b33693f6b4..abb58121db 100644 --- a/src/vector/index.js +++ b/src/vector/index.js @@ -29,8 +29,8 @@ limitations under the License. require('babel-polyfill'); // CSS requires: just putting them here for now as CSS is going to be -// refactored soon anyway -require('../../vector/components.css'); +// refactored "soon" anyway +require('../build/components.css'); require('gemini-scrollbar/gemini-scrollbar.css'); require('gfm.css/gfm.css'); require('highlight.js/styles/github.css'); From 8fe05fdff3f5e61ea83c6cf3bbb7c3646bd5a975 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Wed, 26 Oct 2016 15:02:34 +0100 Subject: [PATCH 2/2] Correct path to components.css Fix failure to find components.css which was introduced in e1919c5 (https://github.com/vector-im/vector-web/pull/2513) --- src/vector/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vector/index.js b/src/vector/index.js index abb58121db..58d579fdf4 100644 --- a/src/vector/index.js +++ b/src/vector/index.js @@ -30,7 +30,7 @@ require('babel-polyfill'); // CSS requires: just putting them here for now as CSS is going to be // refactored "soon" anyway -require('../build/components.css'); +require('../../build/components.css'); require('gemini-scrollbar/gemini-scrollbar.css'); require('gfm.css/gfm.css'); require('highlight.js/styles/github.css');