adam-os 0.1.9 → 0.2.1

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/bin/adam-os.js CHANGED
@@ -116,7 +116,7 @@ function printBanner(url, mode) {
116
116
  async function main() {
117
117
  checkNodeVersion();
118
118
 
119
- const isProd = process.argv.includes("--prod");
119
+ const isDev = process.argv.includes("--dev");
120
120
  const portArg = process.argv.find((a) => a.startsWith("--port="));
121
121
  const basePort = portArg ? parseInt(portArg.split("=")[1], 10) : 3000;
122
122
 
@@ -137,12 +137,19 @@ async function main() {
137
137
  process.on("SIGINT", () => process.exit(0));
138
138
  process.on("SIGTERM", () => process.exit(0));
139
139
 
140
- if (isProd) {
140
+ if (isDev) {
141
+ printBanner(url, "Development (live reload)");
142
+ const server = spawn(nextBin, ["dev", "--port", String(port)], {
143
+ cwd: PKG_ROOT, stdio: "inherit", env,
144
+ });
145
+ setTimeout(() => openBrowser(url), 3500);
146
+ server.on("exit", (code) => process.exit(code ?? 0));
147
+ } else {
141
148
  console.log("\n Building production bundle (this takes ~30 seconds)...\n");
142
149
  try {
143
150
  execSync(`"${nextBin}" build`, { cwd: PKG_ROOT, stdio: "inherit", env });
144
151
  } catch (_) {
145
- console.error("\n ✗ Build failed. Try dev mode: npx adam-os\n");
152
+ console.error("\n ✗ Build failed. Try dev mode: npx adam-os --dev\n");
146
153
  process.exit(1);
147
154
  }
148
155
  printBanner(url, "Production");
@@ -151,13 +158,6 @@ async function main() {
151
158
  });
152
159
  setTimeout(() => openBrowser(url), 2000);
153
160
  server.on("exit", (code) => process.exit(code ?? 0));
154
- } else {
155
- printBanner(url, "Development (live reload)");
156
- const server = spawn(nextBin, ["dev", "--port", String(port)], {
157
- cwd: PKG_ROOT, stdio: "inherit", env,
158
- });
159
- setTimeout(() => openBrowser(url), 3500);
160
- server.on("exit", (code) => process.exit(code ?? 0));
161
161
  }
162
162
  }
163
163
 
package/next.config.ts CHANGED
@@ -1,6 +1,10 @@
1
1
  import type { NextConfig } from "next";
2
+ import path from "path";
2
3
 
3
4
  const nextConfig: NextConfig = {
5
+ turbopack: {
6
+ root: path.resolve(__dirname),
7
+ },
4
8
  images: {
5
9
  remotePatterns: [
6
10
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adam-os",
3
- "version": "0.1.9",
3
+ "version": "0.2.1",
4
4
  "private": false,
5
5
  "description": "Adam Bush's Windows 95-style portfolio. One command: npx adam-os",
6
6
  "author": "Adam Bush <adamchrisbush@gmail.com>",