Last active
August 1, 2017 12:18
-
-
Save ptmt/a130f03814eadaf25318c39750b70b3f to your computer and use it in GitHub Desktop.
Symlinks workaround with wml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { execSync, spawn } = require('child_process'); | |
if (process.argv.indexOf('start') > -1) { | |
console.log('Setting up wml'); | |
const wmlBin = path.join(__dirname, 'node_modules/.bin/wml'); | |
try { | |
console.log(execSync(`${wmlBin} rm all`).toString()); | |
console.log( | |
execSync( | |
`${wmlBin} add ${__dirname}/../module ${__dirname}/node_modules/module --skip-prompt=true` | |
).toString() | |
); | |
console.log(execSync(`watchman watch ${__dirname}/../module`).toString()); | |
const wml = spawn(wmlBin, ['start']); | |
wml.stdout.on('data', data => { | |
console.log(`${data}`); | |
}); | |
wml.stderr.on('data', data => { | |
console.error(`${data}`); | |
}); | |
} catch (e) { | |
console.error(e); | |
} | |
} | |
module.exports = {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You need a patched version of wml https://github.com/mlabrum/wml#patch-1