create-payload-app 0.3.19 → 0.3.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,7 +8,7 @@
|
|
8
8
|
"dev": "cross-env PAYLOAD_CONFIG_PATH=src/payload.config.ts nodemon",
|
9
9
|
"build:payload": "cross-env PAYLOAD_CONFIG_PATH=src/payload.config.ts payload build",
|
10
10
|
"build:server": "tsc",
|
11
|
-
"build": "
|
11
|
+
"build": "{{runCommand}} copyfiles && {{runCommand}} build:payload && {{runCommand}} build:server",
|
12
12
|
"serve": "cross-env PAYLOAD_CONFIG_PATH=dist/payload.config.js NODE_ENV=production node dist/server.js",
|
13
13
|
"copyfiles": "copyfiles -u 1 \"src/**/*.{html,css,scss,ttf,woff,woff2,eot,svg,jpg,png}\" dist/",
|
14
14
|
"generate:types": "cross-env PAYLOAD_CONFIG_PATH=src/payload.config.ts payload generate:types",
|
@@ -70,6 +70,7 @@ function writeCommonFiles(projectDir, template, packageManager) {
|
|
70
70
|
packageJson = handlebars_1.default.compile(packageJsonTemplate)({
|
71
71
|
projectName: path_1.default.basename(projectDir),
|
72
72
|
templateName: template.name,
|
73
|
+
runCommand: packageManager === 'yarn' ? 'yarn' : 'npm run',
|
73
74
|
});
|
74
75
|
return [4 /*yield*/, fs_extra_1.default.writeFile(path_1.default.resolve(projectDir, 'package.json'), packageJson)
|
75
76
|
// nodemon.json
|