Skip to content

Commit 6b226c5

Browse files
authored
Merge pull request #173 from arminbro/dev
Production release
2 parents 0e938f2 + 2e75f5f commit 6b226c5

File tree

5 files changed

+19
-8
lines changed

5 files changed

+19
-8
lines changed

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Set up Node.js
1616
uses: actions/setup-node@v4
1717
with:
18-
node-version: '20.19.4'
18+
node-version: '20.19.5'
1919
- run: npm ci
2020
- run: npx semantic-release
2121
env:

package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"@semantic-release/release-notes-generator": "14.0.3",
5858
"eslint": "8.57.1",
5959
"eslint-config-airbnb-base": "15.0.0",
60-
"eslint-config-prettier": "9.1.0",
60+
"eslint-config-prettier": "9.1.2",
6161
"eslint-plugin-prettier": "5.5.4",
6262
"husky": "9.1.7",
6363
"prettier": "3.6.2",

readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,7 @@ export default TemplateName;
317317
| `template-name` | component name in kebab-case |
318318
| `template_name` | component name in snake_case |
319319
| `TEMPLATE_NAME` | component name in uppercase SNAKE_CASE |
320+
| `TEMPLATENAME` | component name in full UPPERCASE |
320321

321322
#### Example of a custom test template file:
322323

src/utils/generateComponentUtils.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,7 @@ export function generateComponent(componentName, cmd, cliConfigFile) {
418418
'template-name': kebabCase(componentName),
419419
template_name: snakeCase(componentName),
420420
TEMPLATE_NAME: snakeCase(componentName).toUpperCase(),
421+
TEMPLATENAME: componentName.toUpperCase(),
421422
};
422423

423424
const { componentPath, filename, template } = generateTemplate({
@@ -490,6 +491,15 @@ export function generateComponent(componentName, cmd, cliConfigFile) {
490491
recursive: false,
491492
silent: true,
492493
});
494+
495+
// Will replace the TEMPLATENAME in uppercase SNAKE_CASE
496+
replace({
497+
regex: 'TEMPLATENAME',
498+
replacement: convertors['TEMPLATENAME'],
499+
paths: [componentPath],
500+
recursive: false,
501+
silent: true,
502+
});
493503
}
494504

495505
console.log(chalk.green(`${filename} was successfully created at ${componentPath}`));

0 commit comments

Comments
 (0)