create-absolutejs 0.14.3 → 0.14.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.
|
@@ -2,13 +2,15 @@ import { exit } from 'process';
|
|
|
2
2
|
import { spinner } from '@clack/prompts';
|
|
3
3
|
import { $ } from 'bun';
|
|
4
4
|
import { green, red } from 'picocolors';
|
|
5
|
-
import { formatCommands
|
|
5
|
+
import { formatCommands } from '../utils/commandMaps';
|
|
6
6
|
export const formatProject = async ({ projectName, packageManager, installDependenciesNow }) => {
|
|
7
|
+
// A no-install scaffold must be fully offline and must not assume a global
|
|
8
|
+
// formatter. Templates are already formatted in the published package.
|
|
9
|
+
if (!installDependenciesNow)
|
|
10
|
+
return;
|
|
7
11
|
const spin = spinner();
|
|
8
12
|
try {
|
|
9
|
-
const fmt =
|
|
10
|
-
? formatCommands[packageManager]
|
|
11
|
-
: formatNoInstallCommands[packageManager];
|
|
13
|
+
const fmt = formatCommands[packageManager];
|
|
12
14
|
spin.start('Formatting files…');
|
|
13
15
|
const [bin, ...args] = fmt.split(' ');
|
|
14
16
|
await $ `${bin} ${args}`.cwd(projectName).quiet();
|
|
@@ -223,7 +223,8 @@ export const parseCommandLineOptions = () => {
|
|
|
223
223
|
let tailwind = hasTailwindFiles
|
|
224
224
|
? { input: values['tailwind-input'], output: values['tailwind-output'] }
|
|
225
225
|
: undefined;
|
|
226
|
-
const useTailwind = values.tailwind ??
|
|
226
|
+
const useTailwind = values.tailwind ??
|
|
227
|
+
(hasTailwindFiles ? true : values.skip ? false : undefined);
|
|
227
228
|
if (useTailwind === false && hasTailwindFiles) {
|
|
228
229
|
console.warn('Warning: Tailwind CSS input/output files are specified but Tailwind is disabled.');
|
|
229
230
|
tailwind = undefined;
|
|
@@ -262,15 +263,19 @@ export const parseCommandLineOptions = () => {
|
|
|
262
263
|
databaseHost,
|
|
263
264
|
directoryConfig,
|
|
264
265
|
frontendDirectories,
|
|
265
|
-
frontends: selectedFrontends.length
|
|
266
|
+
frontends: selectedFrontends.length
|
|
267
|
+
? selectedFrontends
|
|
268
|
+
: values.skip
|
|
269
|
+
? []
|
|
270
|
+
: undefined,
|
|
266
271
|
githubLink: isGithubLinkOption(values.github)
|
|
267
272
|
? values.github
|
|
268
273
|
: undefined,
|
|
269
274
|
githubRepoUrl: normalizeRepoInput(values.repo)?.httpsUrl,
|
|
270
275
|
githubVisibility,
|
|
271
276
|
includeExamples,
|
|
272
|
-
initializeGitNow: values.git,
|
|
273
|
-
installDependenciesNow: values.install,
|
|
277
|
+
initializeGitNow: values.git ?? (values.skip ? false : undefined),
|
|
278
|
+
installDependenciesNow: values.install ?? (values.skip ? false : undefined),
|
|
274
279
|
orm,
|
|
275
280
|
plugins,
|
|
276
281
|
projectName,
|
package/package.json
CHANGED