create-rstack 1.7.17 → 1.7.18
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/dist/index.js +16 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2144,15 +2144,15 @@ async function getTools({ tools, dir, template }, extraTools) {
|
|
|
2144
2144
|
const options = [
|
|
2145
2145
|
{
|
|
2146
2146
|
value: 'biome',
|
|
2147
|
-
label: '
|
|
2147
|
+
label: 'Biome (linting & formatting)'
|
|
2148
2148
|
},
|
|
2149
2149
|
{
|
|
2150
2150
|
value: 'eslint',
|
|
2151
|
-
label: '
|
|
2151
|
+
label: 'ESLint (linting)'
|
|
2152
2152
|
},
|
|
2153
2153
|
{
|
|
2154
2154
|
value: 'prettier',
|
|
2155
|
-
label: '
|
|
2155
|
+
label: 'Prettier (formatting)'
|
|
2156
2156
|
}
|
|
2157
2157
|
];
|
|
2158
2158
|
if (extraTools) options.push(...extraTools.map((tool)=>({
|
|
@@ -2183,7 +2183,18 @@ const parseArgv = (processArgv)=>{
|
|
|
2183
2183
|
if (argv['package-name']) argv.packageName = argv['package-name'];
|
|
2184
2184
|
return argv;
|
|
2185
2185
|
};
|
|
2186
|
-
function runCommand(command, cwd) {
|
|
2186
|
+
function runCommand(command, cwd, packageManager) {
|
|
2187
|
+
if (command.startsWith('npm create ')) {
|
|
2188
|
+
const createReplacements = {
|
|
2189
|
+
bun: 'bun create ',
|
|
2190
|
+
pnpm: 'pnpm create ',
|
|
2191
|
+
yarn: 'yarn create ',
|
|
2192
|
+
deno: 'deno run -A npm:create-'
|
|
2193
|
+
};
|
|
2194
|
+
const replacement = createReplacements[packageManager];
|
|
2195
|
+
if (replacement) command = command.replace(/^npm create /, replacement).replace(/ -- --/, ' --');
|
|
2196
|
+
if ('yarn' === packageManager) command = command.replace('@latest', '');
|
|
2197
|
+
}
|
|
2187
2198
|
const [bin, ...args] = command.split(' ');
|
|
2188
2199
|
cross_spawn_default().sync(bin, args, {
|
|
2189
2200
|
stdio: 'inherit',
|
|
@@ -2268,7 +2279,7 @@ async function create({ name, root, templates, skipFiles, getTemplateName, mapES
|
|
|
2268
2279
|
distFolder,
|
|
2269
2280
|
addAgentsMdSearchDirs: (dir)=>agentsMdSearchDirs.push(dir)
|
|
2270
2281
|
});
|
|
2271
|
-
if (matchedTool.command) runCommand(matchedTool.command, distFolder);
|
|
2282
|
+
if (matchedTool.command) runCommand(matchedTool.command, distFolder, packageManager);
|
|
2272
2283
|
continue;
|
|
2273
2284
|
}
|
|
2274
2285
|
}
|