diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/create.js | 7 | ||||
-rw-r--r-- | scripts/package.js | 1 |
2 files changed, 5 insertions, 3 deletions
diff --git a/scripts/create.js b/scripts/create.js index 158b2f2..872b527 100644 --- a/scripts/create.js +++ b/scripts/create.js | |||
@@ -1,4 +1,5 @@ | |||
1 | /* eslint-disable no-console */ | 1 | /* eslint-disable no-console */ |
2 | |||
2 | /** | 3 | /** |
3 | * Create a new recipe for your service | 4 | * Create a new recipe for your service |
4 | */ | 5 | */ |
@@ -74,9 +75,9 @@ const pascalCasedName = toPascalCase(recipe); // PascalCased recipe ID only cont | |||
74 | for (const file of filesThatNeedTextReplace) { | 75 | for (const file of filesThatNeedTextReplace) { |
75 | const filePath = path.join(newRecipeFolder, file); | 76 | const filePath = path.join(newRecipeFolder, file); |
76 | let contents = fs.readFileSync(filePath, 'utf8'); | 77 | let contents = fs.readFileSync(filePath, 'utf8'); |
77 | contents = contents.replace(/SERVICE/g, recipe); | 78 | contents = contents.replaceAll('SERVICE', recipe); |
78 | contents = contents.replace(/SNAME/g, recipeName); | 79 | contents = contents.replaceAll('SNAME', recipeName); |
79 | contents = contents.replace(/SPASCAL/g, pascalCasedName); | 80 | contents = contents.replaceAll('SPASCAL', pascalCasedName); |
80 | fs.writeFileSync(filePath, contents); | 81 | fs.writeFileSync(filePath, contents); |
81 | } | 82 | } |
82 | console.log('[Info] Prepared new recipe'); | 83 | console.log('[Info] Prepared new recipe'); |
diff --git a/scripts/package.js b/scripts/package.js index 0482775..c2e2ab7 100644 --- a/scripts/package.js +++ b/scripts/package.js | |||
@@ -1,4 +1,5 @@ | |||
1 | /* eslint-disable no-console */ | 1 | /* eslint-disable no-console */ |
2 | |||
2 | /** | 3 | /** |
3 | * Package all recipes | 4 | * Package all recipes |
4 | */ | 5 | */ |