create-stravi 1.0.1 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { cp, mkdir, readFile, writeFile, access } from 'node:fs/promises'
2
+ import { cp, mkdir, readFile, writeFile, access, rename } from 'node:fs/promises'
3
3
  import { constants as fsConstants } from 'node:fs'
4
4
  import path from 'node:path'
5
5
  import { fileURLToPath } from 'node:url'
@@ -72,6 +72,12 @@ async function run() {
72
72
  await mkdir(targetDir, { recursive: true })
73
73
  await cp(templateDir, targetDir, { recursive: true })
74
74
 
75
+ const gitignorePath = path.join(targetDir, 'gitignore')
76
+ const dotGitignorePath = path.join(targetDir, '.gitignore')
77
+ if ((await exists(gitignorePath)) && !(await exists(dotGitignorePath))) {
78
+ await rename(gitignorePath, dotGitignorePath)
79
+ }
80
+
75
81
  const packageJsonPath = path.join(targetDir, 'package.json')
76
82
  const packageJsonRaw = await readFile(packageJsonPath, 'utf8')
77
83
  const packageJson = JSON.parse(packageJsonRaw)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-stravi",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "Scaffold a Stravi backend app",
5
5
  "type": "module",
6
6
  "bin": {
@@ -0,0 +1,7 @@
1
+ node_modules
2
+ .env
3
+ .env.*
4
+ .DS_Store
5
+ npm-debug.log*
6
+ pnpm-debug.log*
7
+ yarn-error.log*