Skip to content

Commit 4c9ade5

Browse files
committed
Use cpx to copy olm.js, and add watcher
We are now using `cpx` to copy the emojione files, so we might as well use it for olm.js, rather than rolling our own - particularly since that makes it easy to add a watcher for `npm start`. We have to add a `-L` to the `cpx` invocation, otherwise, if olm is a symlink (as is useful for development), cpx ends up watching the symlink, which obviously never changes.
1 parent 1d43589 commit 4c9ade5

File tree

2 files changed

+4
-24
lines changed

2 files changed

+4
-24
lines changed

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,18 @@
1818
"build:compile": "babel --source-maps -d lib src",
1919
"build:bundle": "NODE_ENV=production webpack -p lib/vector/index.js vector/bundle.js",
2020
"build:bundle:dev": "NODE_ENV=production webpack --optimize-occurence-order lib/vector/index.js vector/bundle.js",
21-
"build:staticfiles": "scripts/staticfiles.js",
21+
"build:staticfiles": "cpx -v node_modules/olm/olm.js vector/",
2222
"build": "npm run build:staticfiles && npm run build:emojione && npm run build:css && npm run build:compile && npm run build:bundle",
2323
"build:dev": "npm run build:staticfiles && npm run build:emojione && npm run build:css && npm run build:compile && npm run build:bundle:dev",
2424
"package": "scripts/package.sh",
2525
"start:emojione": "cpx \"node_modules/emojione/assets/svg/*\" vector/emojione/svg/ -w",
2626
"start:js": "webpack -w src/vector/index.js vector/bundle.js",
2727
"start:js:prod": "NODE_ENV=production webpack -w src/vector/index.js vector/bundle.js",
2828
"start:skins:css": "catw \"src/skins/vector/css/**/*.css\" -o vector/components.css",
29+
"start:staticfiles": "cpx -Lwv node_modules/olm/olm.js vector/",
2930
"//cache": "Note the -c 1 below due to https://code.google.com/p/chromium/issues/detail?id=508270",
30-
"start": "parallelshell \"npm run build:staticfiles\" \"npm run start:emojione\" \"npm run start:js\" \"npm run start:skins:css\" \"http-server -c 1 vector\"",
31-
"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\"",
31+
"start": "parallelshell \"npm run start:staticfiles\" \"npm run start:emojione\" \"npm run start:js\" \"npm run start:skins:css\" \"http-server -c 1 vector\"",
32+
"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\"",
3233
"clean": "rimraf lib vector/olm.js vector/bundle.css vector/bundle.js vector/bundle.js.map vector/webpack.css* vector/emojione",
3334
"prepublish": "npm run build:css && npm run build:compile",
3435
"test": "karma start --single-run=true --autoWatch=false --browsers PhantomJS --colors=false",

scripts/staticfiles.js

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)