@nextsparkjs/cli 0.1.0-beta.117 → 0.1.0-beta.118
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/cli.js +9 -3
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -87,9 +87,14 @@ async function devCommand(options) {
|
|
|
87
87
|
console.error(chalk.red(`[Registry] Error: ${err.message}`));
|
|
88
88
|
});
|
|
89
89
|
}
|
|
90
|
+
const nextArgs = ["next", "dev", "-p", options.port];
|
|
91
|
+
if (options.turbopack) {
|
|
92
|
+
nextArgs.splice(2, 0, "--turbopack");
|
|
93
|
+
}
|
|
94
|
+
const bundler = options.turbopack ? "Turbopack" : "Webpack";
|
|
90
95
|
console.log(chalk.green(`
|
|
91
|
-
[Dev] Starting Next.js dev server on port ${options.port}...`));
|
|
92
|
-
const devProcess = spawn("npx",
|
|
96
|
+
[Dev] Starting Next.js dev server on port ${options.port} (${bundler})...`));
|
|
97
|
+
const devProcess = spawn("npx", nextArgs, {
|
|
93
98
|
cwd: projectRoot,
|
|
94
99
|
stdio: "inherit",
|
|
95
100
|
shell: true,
|
|
@@ -5155,7 +5160,8 @@ config();
|
|
|
5155
5160
|
var pkg = JSON.parse(readFileSync11(new URL("../package.json", import.meta.url), "utf-8"));
|
|
5156
5161
|
var program = new Command();
|
|
5157
5162
|
program.name("nextspark").description("NextSpark CLI - Professional SaaS Boilerplate").version(pkg.version);
|
|
5158
|
-
program.command("dev").description("Start development server with
|
|
5163
|
+
program.command("dev").description("Start development server with Turbopack (fast)").option("-p, --port <port>", "Port to run the dev server on", process.env.PORT || "3000").option("--no-turbopack", "Disable Turbopack (use Webpack)").option("--registry", "Enable registry watcher").action(devCommand);
|
|
5164
|
+
program.command("dev:registry").description("Start dev server with registry watcher (use when creating entities/templates/blocks)").option("-p, --port <port>", "Port to run the dev server on", process.env.PORT || "3000").option("--turbopack", "Enable Turbopack").action((opts) => devCommand({ ...opts, registry: true, turbopack: opts.turbopack ?? false }));
|
|
5159
5165
|
program.command("build").description("Build for production").option("--no-registry", "Skip registry generation before build").action(buildCommand);
|
|
5160
5166
|
program.command("generate").description("Generate all registries").option("-w, --watch", "Watch for changes").action(generateCommand);
|
|
5161
5167
|
var registry = program.command("registry").description("Registry management commands");
|