create-renoun 2.0.0 → 2.0.2

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.
Files changed (2) hide show
  1. package/dist/index.mjs +36 -1
  2. package/package.json +7 -7
package/dist/index.mjs CHANGED
@@ -153,7 +153,34 @@ function shouldRefreshCache() {
153
153
  log.error('Failed to reformat package.json.');
154
154
  throw error;
155
155
  }
156
- writeFileSync(join(workingDirectory, '.gitignore'), '.next\nnode_modules\nout', 'utf-8');
156
+ writeFileSync(join(workingDirectory, '.gitignore'), `# dependencies
157
+ node_modules
158
+
159
+ # testing
160
+ coverage
161
+
162
+ # next.js
163
+ .next
164
+ out
165
+
166
+ # production
167
+ build
168
+ dist
169
+
170
+ # misc
171
+ .DS_Store
172
+
173
+ # debug
174
+ npm-debug.log*
175
+
176
+ # local env files
177
+ .env
178
+ .env.local
179
+
180
+ # typescript
181
+ *.tsbuildinfo
182
+ next-env.d.ts
183
+ `, 'utf-8');
157
184
  const introInstallInstructions = workingDirectory === process.cwd() ? `Run ${color.bold(`${packageManager ?? 'npm'} install`)} to install the dependencies and get started.` : `Change to the directory (cd ${color.bold(workingDirectory)}) and run ${color.bold(`${packageManager ?? 'npm'} install`)} to install the dependencies and get started.`;
158
185
  log.success(`Example ${color.bold(directoryName)} fetched and configured successfully! ${introInstallInstructions}`);
159
186
  return true;
@@ -217,6 +244,14 @@ const downloadFile = async (url, filePath)=>{
217
244
  const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf-8'));
218
245
  // Remove "@examples/" prefix from package name
219
246
  packageJson.name = packageJson.name.replace('@examples/', '');
247
+ const cliPath = '../../packages/renoun/dist/cli/index.js';
248
+ if (packageJson.scripts) {
249
+ for (const [scriptName, scriptValue] of Object.entries(packageJson.scripts)){
250
+ if (typeof scriptValue === 'string') {
251
+ packageJson.scripts[scriptName] = scriptValue.replaceAll(cliPath, 'renoun');
252
+ }
253
+ }
254
+ }
220
255
  // Replace "workspace:*" and "catalog:" with the latest versions of the package
221
256
  for (const [packageName, version] of Object.entries(packageJson.dependencies)){
222
257
  if (version === 'catalog:' || version === 'workspace:*') {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-renoun",
3
3
  "type": "module",
4
- "version": "2.0.0",
4
+ "version": "2.0.2",
5
5
  "author": {
6
6
  "name": "souporserious",
7
7
  "email": "support@souporserious.com"
@@ -9,7 +9,7 @@
9
9
  "license": "MIT",
10
10
  "repository": {
11
11
  "type": "git",
12
- "url": "https://github.com/souporserious/renoun",
12
+ "url": "git+https://github.com/souporserious/renoun.git",
13
13
  "directory": "packages/create-renoun"
14
14
  },
15
15
  "bugs": "https://github.com/souporserious/renoun/issues",
@@ -19,13 +19,13 @@
19
19
  ],
20
20
  "bin": "./dist/index.mjs",
21
21
  "devDependencies": {
22
- "bunchee": "^6.5.4"
22
+ "bunchee": "6.6.0"
23
23
  },
24
24
  "dependencies": {
25
- "@antfu/install-pkg": "^1.1.0",
26
- "@clack/prompts": "^0.11.0",
27
- "picocolors": "^1.1.1",
28
- "terminal-link": "^4.0.0"
25
+ "@antfu/install-pkg": "1.1.0",
26
+ "@clack/prompts": "0.11.0",
27
+ "picocolors": "1.1.1",
28
+ "terminal-link": "5.0.0"
29
29
  },
30
30
  "scripts": {
31
31
  "build": "bunchee",