diff --git a/package.json b/package.json index 64c1d38aaa..be87139b26 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "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": "NODE_ENV=production webpack --optimize-occurence-order lib/vector/index.js vector/bundle.js", - "build:staticfiles": "scripts/staticfiles.js", + "build:staticfiles": "cpx -v node_modules/olm/olm.js vector/", "build": "npm run build:staticfiles && npm run build:emojione && npm run build:css && npm run build:compile && npm run build:bundle", "build:dev": "npm run build:staticfiles && npm run build:emojione && npm run build:css && npm run build:compile && npm run build:bundle:dev", "package": "scripts/package.sh", @@ -26,9 +26,10 @@ "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: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": "parallelshell \"npm run build:staticfiles\" \"npm run start:emojione\" \"npm run start:js\" \"npm run start:skins:css\" \"http-server -c 1 vector\"", - "start:prod": "parallelshell \"npm run build:staticfiles\" \"npm run start:emojione\" \"npm run start:js:prod\" \"npm run start:skins:css\" \"http-server -c 1 vector\"", + "start": "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", "prepublish": "npm run build:css && npm run build:compile", "test": "karma start --single-run=true --autoWatch=false --browsers PhantomJS --colors=false", diff --git a/scripts/staticfiles.js b/scripts/staticfiles.js deleted file mode 100755 index 3dbf451cd3..0000000000 --- a/scripts/staticfiles.js +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env node - -// copy static files from node_modules to the vector directory -// - -var fs = require('fs-extra'); - -function exists(f) { - try { - fs.statSync(f); - return true; - } catch(e) { - return false; - } -} - -const olm = 'node_modules/olm/olm.js'; -if (exists(olm)) { - console.log("copy", olm, "-> vector"); - fs.copySync(olm, 'vector/olm.js'); -}