mirror of
https://github.com/lukin/keywind.git
synced 2025-01-10 09:56:25 +00:00
fix: not all files are build correctly, when execute in parallel
This commit is contained in:
parent
b24fd4c393
commit
98d89a5296
1 changed files with 19 additions and 20 deletions
|
@ -13,8 +13,7 @@ const files = [
|
|||
...readdirSync(directoryPathComponents).map((e) => `components/atoms/${e}`),
|
||||
];
|
||||
|
||||
await Promise.all(
|
||||
files.map(async function (file) {
|
||||
for (let file of files) {
|
||||
if (file.includes('.ftl')) {
|
||||
// Build using mailwind
|
||||
await exec(
|
||||
|
@ -25,11 +24,11 @@ await Promise.all(
|
|||
);
|
||||
// fix: wrong build result for ftl-file exception
|
||||
const data = readFileSync(path.join(__dirname, `../theme/keywind/email/html/${file}`));
|
||||
const result = data.toString()
|
||||
.replaceAll("<!--@", '</@')
|
||||
.replaceAll("<!--#", '</#')
|
||||
.replaceAll("-->", '>')
|
||||
const result = data
|
||||
.toString()
|
||||
.replaceAll('<!--@', '</@')
|
||||
.replaceAll('<!--#', '</#')
|
||||
.replaceAll('-->', '>');
|
||||
writeFileSync(path.join(__dirname, `../theme/keywind/email/html/${file}`), result);
|
||||
}
|
||||
})
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue