create-renoun 2.0.3 → 2.0.5
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/LICENSE.md +1 -1
- package/dist/index.mjs +11 -16
- package/package.json +1 -1
package/LICENSE.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c)
|
|
3
|
+
Copyright (c) 2025 souporserious LLC
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
6
|
|
package/dist/index.mjs
CHANGED
|
@@ -10,10 +10,10 @@ import { pipeline } from 'node:stream/promises';
|
|
|
10
10
|
import { homedir } from 'node:os';
|
|
11
11
|
import __node_cjsUrl from 'node:url';
|
|
12
12
|
|
|
13
|
-
const __filename$
|
|
14
|
-
const __dirname$
|
|
13
|
+
const __filename$2 = __node_cjsUrl.fileURLToPath(import.meta.url);
|
|
14
|
+
const __dirname$2 = __node_cjsPath.dirname(__filename$2);
|
|
15
15
|
|
|
16
|
-
const packageJsonPath$1 = resolve(__dirname$
|
|
16
|
+
const packageJsonPath$1 = resolve(__dirname$2, '../package.json');
|
|
17
17
|
const packageJson$1 = JSON.parse(readFileSync(packageJsonPath$1, 'utf-8'));
|
|
18
18
|
const cacheDirectory = resolve(homedir(), '.config', 'create-renoun');
|
|
19
19
|
const cacheFilePath = resolve(cacheDirectory, 'version.json');
|
|
@@ -159,9 +159,13 @@ node_modules
|
|
|
159
159
|
# testing
|
|
160
160
|
coverage
|
|
161
161
|
|
|
162
|
+
# renoun
|
|
163
|
+
.renoun
|
|
164
|
+
|
|
162
165
|
# next.js
|
|
163
166
|
.next
|
|
164
167
|
out
|
|
168
|
+
next-env.d.ts
|
|
165
169
|
|
|
166
170
|
# production
|
|
167
171
|
build
|
|
@@ -173,13 +177,12 @@ dist
|
|
|
173
177
|
# debug
|
|
174
178
|
npm-debug.log*
|
|
175
179
|
|
|
176
|
-
#
|
|
180
|
+
# environment files
|
|
177
181
|
.env
|
|
178
182
|
.env.local
|
|
179
183
|
|
|
180
184
|
# typescript
|
|
181
185
|
*.tsbuildinfo
|
|
182
|
-
next-env.d.ts
|
|
183
186
|
`, 'utf-8');
|
|
184
187
|
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.`;
|
|
185
188
|
log.success(`Example ${color.bold(directoryName)} fetched and configured successfully! ${introInstallInstructions}`);
|
|
@@ -244,14 +247,6 @@ const downloadFile = async (url, filePath)=>{
|
|
|
244
247
|
const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf-8'));
|
|
245
248
|
// Remove "@examples/" prefix from package name
|
|
246
249
|
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
|
-
}
|
|
255
250
|
// Replace "workspace:*" and "catalog:" with the latest versions of the package
|
|
256
251
|
for (const [packageName, version] of Object.entries(packageJson.dependencies)){
|
|
257
252
|
if (version === 'catalog:' || version === 'workspace:*') {
|
|
@@ -277,10 +272,10 @@ const downloadFile = async (url, filePath)=>{
|
|
|
277
272
|
}));
|
|
278
273
|
}
|
|
279
274
|
|
|
280
|
-
const __filename = __node_cjsUrl.fileURLToPath(import.meta.url);
|
|
281
|
-
const __dirname = __node_cjsPath.dirname(__filename);
|
|
275
|
+
const __filename$1 = __node_cjsUrl.fileURLToPath(import.meta.url);
|
|
276
|
+
const __dirname$1 = __node_cjsPath.dirname(__filename$1);
|
|
282
277
|
|
|
283
|
-
const packageJsonPath = resolve(__dirname, '../package.json');
|
|
278
|
+
const packageJsonPath = resolve(__dirname$1, '../package.json');
|
|
284
279
|
const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf-8'));
|
|
285
280
|
/** Compares two simple semvar versions and returns true if the first version is less than the second. */ function isVersionLessThan(v1, v2) {
|
|
286
281
|
const parts1 = v1.split('.').map(Number);
|