Skip to content

Commit

Permalink
Merge pull request #50 from patrickkabwe/fix/failed-to-copy-.gitignore
Browse files Browse the repository at this point in the history
Fix/failed to copy .gitignore
  • Loading branch information
patrickkabwe authored Jan 6, 2025
2 parents 6c774ee + 258b9d0 commit 4e5e0d0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/rich-bananas-jump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'create-nitro-module': patch
---

fix - failed to copy .gitignore
File renamed without changes.
15 changes: 9 additions & 6 deletions src/generate-nitro-module.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { readFile, writeFile } from 'fs/promises'
import { exec } from 'node:child_process'
import path from 'path'
import { fileURLToPath } from 'url'
import util from 'util'
import { androidSettingsGradleCode } from './code-snippets/code.android.js'
import { readFile, rename, writeFile } from 'node:fs/promises'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
import util from 'node:util'
import { androidSettingsGradleCode } from './code-snippets/code.android'
import {
appExampleCode,
babelConfig,
Expand Down Expand Up @@ -160,7 +160,7 @@ export class NitroModuleFactory {
'babel.config.js',
'nitro.json',
'tsconfig.json',
'.gitignore',
'gitignore',
'README.md',
'package.json',
]
Expand All @@ -169,6 +169,9 @@ export class NitroModuleFactory {
[__dirname, '..', 'assets', 'template'],
filesToCopy
)
const oldGitIgnorePath = path.join(this.config.cwd, 'gitignore')
const newGitIgnorePath = path.join(this.config.cwd, '.gitignore')
await rename(oldGitIgnorePath, newGitIgnorePath)
}

private async createExampleApp() {
Expand Down

0 comments on commit 4e5e0d0

Please sign in to comment.