Skip to content

Commit 9aaa830

Browse files
ericyangpanclaude
andcommitted
refactor: replace string concatenation with template literals
Replace outdated string concatenation using '+' operator with modern template literals for improved code readability and consistency across build scripts. πŸ€– Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 148cac1 commit 9aaa830

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

β€Ž.claude/skills/manifest-creator/scripts/create.mjsβ€Ž

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,12 @@ console.log('πŸ“ Workflow Instructions for Claude Code')
8282
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━')
8383
console.log('')
8484
console.log('Step 1: Read the Schema')
85-
console.log(' β†’ Read manifests/schemas/' + type + 's.schema.json')
85+
console.log(` β†’ Read manifests/schemas/${type}s.schema.json`)
8686
console.log(' β†’ Read referenced schema files (entity.schema.json, etc.)')
8787
console.log(' β†’ Understand all required fields and their formats')
8888
console.log('')
8989
console.log('Step 2: Extract Website Content')
90-
console.log(' β†’ Use WebFetch to read: ' + url)
90+
console.log(` β†’ Use WebFetch to read: ${url}`)
9191
console.log(' β†’ Extract: name, description, version, features')
9292
console.log(' β†’ If main page lacks info, follow relevant links')
9393
console.log(' β†’ CRITICAL: Description must be from actual content, not generated')
@@ -113,10 +113,10 @@ console.log(' β†’ Create complete manifest with all required fields')
113113
console.log(' β†’ Use proper formatting (2-space indentation)')
114114
console.log(' β†’ Set unavailable fields to null (not empty string)')
115115
console.log(' β†’ Ensure all URLs use HTTPS protocol')
116-
console.log(' β†’ ID should be: ' + name)
116+
console.log(` β†’ ID should be: ${name}`)
117117
console.log('')
118118
console.log('Step 6: Write Manifest File')
119-
console.log(' β†’ Write to: manifests/' + type + 's/' + name + '.json')
119+
console.log(` β†’ Write to: manifests/${type}s/${name}.json`)
120120
console.log(' β†’ Use proper JSON formatting (2-space indentation)')
121121
console.log(' β†’ Ensure all required fields are present')
122122
console.log('')

β€Žscripts/_shared/runner.mjsβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ async function discoverScripts(categoryDir) {
7777

7878
// Remove category prefix if present (e.g., "generate-", "validate-", "fetch-")
7979
// If filename doesn't start with prefix, use full name without extension
80-
const categoryPrefix = path.basename(categoryDir) + '-'
80+
const categoryPrefix = `${path.basename(categoryDir)}-`
8181
const scriptName = baseName.startsWith(categoryPrefix)
8282
? baseName.slice(categoryPrefix.length)
8383
: baseName

0 commit comments

Comments
Β (0)