I have a node project which I build with concurrently with the following build pipe:
"scripts": {
"build": "concurrently -g npm:build:*",
"build:generate-db": "ts-node ./converter/main.ts",
"build:tailwind": "npx tailwindcss -i ./src/input.css -o ./static/css/build.css --minify",
"build:hugo": "hugo --minify",
},
build: Call's all commands with prefix build in synchron order.build:generate-db: Create .md files for hugo application from a database.build:tailwind: Generates tailwind file and puts it in correct folderbuild:hugo: Creates hugo website with .md files and tailwind file.When I run the script hugo is not finding the .md files. When I run the script a second time hugo finds the .md files and create the website correct.
What I tried:
build:generate-db hugo is not able to find the files as well.build:generate-db and than build:hugo it's working. "build": "concurrently -g npm:build:* & hugo --minify",
"build:generate-db": "npm run converter",
"build:tailwind": "npx tailwindcss -i ./src/input.css -o ./static/css/build.css --minify",
The Converter writes like this:
writeFileSync(`${resultPath}/${data[titleKey]}.md`, JSON.stringify(resultDto, null, 2))
How can I fix this problem?