fix: make build work with npm
This commit is contained in:
committed by
Bastian
parent
fcdbb403e6
commit
39618b7e9e
@@ -57,10 +57,10 @@ var runCommand = function (command) {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
var buildTemplate = function () {
|
var buildTemplate = function () {
|
||||||
var packageManager = fs.existsSync(paths.appYarnLock) ? "yarn" : "npx";
|
var packageManager = fs.existsSync(paths.appYarnLock) ? "yarn" : "npm";
|
||||||
fs.emptyDirSync(paths.templateBuild);
|
fs.emptyDirSync(paths.templateBuild);
|
||||||
process.chdir(paths.template);
|
process.chdir(paths.template);
|
||||||
return runCommand(packageManager + " build");
|
return runCommand(packageManager + " run build");
|
||||||
};
|
};
|
||||||
buildTemplate().then(function () {
|
buildTemplate().then(function () {
|
||||||
fs.copySync(paths.templateBuild, paths.appBuild);
|
fs.copySync(paths.templateBuild, paths.appBuild);
|
||||||
|
|||||||
@@ -42,12 +42,12 @@ const runCommand = (command: string) =>
|
|||||||
});
|
});
|
||||||
|
|
||||||
const buildTemplate = () => {
|
const buildTemplate = () => {
|
||||||
const packageManager = fs.existsSync(paths.appYarnLock) ? "yarn" : "npx";
|
const packageManager = fs.existsSync(paths.appYarnLock) ? "yarn" : "npm";
|
||||||
|
|
||||||
fs.emptyDirSync(paths.templateBuild);
|
fs.emptyDirSync(paths.templateBuild);
|
||||||
process.chdir(paths.template);
|
process.chdir(paths.template);
|
||||||
|
|
||||||
return runCommand(`${packageManager} build`);
|
return runCommand(`${packageManager} run build`);
|
||||||
};
|
};
|
||||||
|
|
||||||
buildTemplate().then(() => {
|
buildTemplate().then(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user