fix: make build work with npm

This commit is contained in:
Christian Köberl
2022-02-09 20:56:48 +01:00
committed by Bastian
parent fcdbb403e6
commit 39618b7e9e
2 changed files with 4 additions and 4 deletions

View File

@@ -42,12 +42,12 @@ const runCommand = (command: string) =>
});
const buildTemplate = () => {
const packageManager = fs.existsSync(paths.appYarnLock) ? "yarn" : "npx";
const packageManager = fs.existsSync(paths.appYarnLock) ? "yarn" : "npm";
fs.emptyDirSync(paths.templateBuild);
process.chdir(paths.template);
return runCommand(`${packageManager} build`);
return runCommand(`${packageManager} run build`);
};
buildTemplate().then(() => {