Skip to content

Commit 363b0ee

Browse files
authored
Merge pull request #202 from shinpr/fix/release-artifact-consistency
fix: keep published setup output clean
2 parents b033b19 + f2510e5 commit 363b0ee

3 files changed

Lines changed: 11 additions & 10 deletions

File tree

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ knip.json
2424
.DS_Store
2525

2626
# Claude Code generated/local files
27+
CLAUDE.md
2728
.claude/settings.local.json
2829
.claude/agents/
2930
.claude/commands/

scripts/post-setup.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,12 @@ function showNextSteps() {
9090
*/
9191
function main() {
9292
try {
93-
// Initialize git repository
94-
initGit()
95-
9693
// Clean up setup-specific files
9794
cleanupFiles()
9895

96+
// Initialize git repository after the generated project is complete
97+
initGit()
98+
9999
// Show next steps
100100
showNextSteps()
101101
} catch (error) {

scripts/setup-project.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -192,13 +192,7 @@ async function setupProject() {
192192
console.log('📝 Creating .gitignore with language-specific exclusions...')
193193
createGitignore(targetRoot)
194194

195-
console.log('🔧 Running post-setup tasks...')
196-
const postSetupScript = path.join(sourceRoot, 'scripts', 'post-setup.js')
197-
if (fs.existsSync(postSetupScript)) {
198-
execSync(`node ${postSetupScript}`, { stdio: 'inherit', cwd: targetRoot })
199-
}
200-
201-
// Create .create-ai-project.json manifest
195+
// Create .create-ai-project.json manifest before the initial commit
202196
const packageJson = JSON.parse(fs.readFileSync(path.join(sourceRoot, 'package.json'), 'utf8'))
203197
const manifest = {
204198
version: packageJson.version,
@@ -212,6 +206,12 @@ async function setupProject() {
212206
)
213207
console.log('📋 Created .create-ai-project.json manifest.')
214208

209+
console.log('🔧 Running post-setup tasks...')
210+
const postSetupScript = path.join(sourceRoot, 'scripts', 'post-setup.js')
211+
if (fs.existsSync(postSetupScript)) {
212+
execSync(`node ${postSetupScript}`, { stdio: 'inherit', cwd: targetRoot })
213+
}
214+
215215
console.log('✅ Project setup completed!')
216216
} catch (error) {
217217
console.error(`❌ Setup failed: ${error.message}`)

0 commit comments

Comments
 (0)