Use yarn instead of npm

This commit is contained in:
Tom Raithel
2017-11-22 13:42:39 +01:00
parent 8182c9a5d5
commit 178f6e92fc
5 changed files with 46 additions and 27 deletions

View File

@@ -11,23 +11,21 @@ import {
relativePath,
} from '../common/file';
const runBuild = (name) => (
exec(`npm run build:${name}`, (error, stdout, stderr) => {
const runBuild = name =>
exec(`yarn run build:${name}`, (error, stdout, stderr) => {
if (error) {
console.error(`exec error: ${error}`);
return;
}
console.log(stdout);
console.error(stderr);
})
);
});
const watchBuild = (name) => (eventType, fileName) => runBuild(name);
const watchBuild = name => (eventType, fileName) => runBuild(name);
const options = {
recursive: true,
}
};
runBuild('all');
@@ -38,7 +36,7 @@ watch(assetsPath(), options, watchBuild('assets'));
watch(radarPath(), options, watchBuild('pages'));
const params = {
root: relativePath('dist'),
logLevel: 0, // 0 = errors only, 1 = some, 2 = lots
root: relativePath('dist'),
logLevel: 0, // 0 = errors only, 1 = some, 2 = lots
};
liveServer.start(params);