Skip to content
Snippets Groups Projects
Verified Commit c304545c authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

chore: commit save point

parent c1cdce9a
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,8 @@ const regex = /<form action=\"https:\/\/codepen.*<\/form>/gm;
const fs = require('fs');
var path = require('path')
const packageJson = path.join(__dirname, '../../application/package.json');
const packageJsonContent = JSON.parse( fs.readFileSync(packageJson, 'utf8'));
const docPath = path.normalize(__dirname + '/../../deployment/build/docs/')
const dir = fs.opendirSync(docPath);
......@@ -22,7 +24,7 @@ while ((f = dir.readSync()) !== null) {
while ((m = regex.exec(content)) !== null) {
m.forEach((match, groupIndex) => {
const s=match.replaceAll(";@schukai/monster", ";https://cdn.skypack.dev/@schukai/monster@latest");
const s=match.replaceAll(";"+packageJsonContent.name, ";https://cdn.skypack.dev/"+packageJsonContent.name+"@latest");
content=content.replace(match+"", s);
});
}
......@@ -30,8 +32,3 @@ while ((f = dir.readSync()) !== null) {
fs.writeFileSync(fn, content, 'utf8')
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment