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.
This commit is contained in:
parent
1d435890af
commit
4c9ade5ecb
2 changed files with 4 additions and 24 deletions
|
@ -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');
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue