create-ereo 0.1.32 → 0.1.33

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.
Files changed (2) hide show
  1. package/dist/index.js +22 -18
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -111,25 +111,25 @@ COPY package.json bun.lockb* ./
111
111
  RUN bun install --production --ignore-scripts
112
112
 
113
113
  # ---- Stage 3: Production image ----
114
- FROM oven/bun:1-slim AS runner
114
+ FROM oven/bun:1-alpine AS runner
115
115
  WORKDIR /app
116
116
 
117
117
  ENV NODE_ENV=production
118
118
 
119
119
  # Non-root user for security
120
- RUN groupadd --system --gid 1001 ereo && \\
121
- useradd --system --uid 1001 --gid ereo --no-create-home ereo
120
+ RUN addgroup -S -g 1001 ereo && \\
121
+ adduser -S -u 1001 -G ereo -H ereo
122
122
 
123
123
  # Copy production node_modules
124
124
  COPY --from=deps --chown=ereo:ereo /app/node_modules ./node_modules
125
125
 
126
126
  # Copy build output and runtime files
127
- COPY --from=builder --chown=ereo:ereo /app/.ereo ./.ereo
128
- COPY --from=builder --chown=ereo:ereo /app/app ./app
129
- COPY --from=builder --chown=ereo:ereo /app/public ./public
130
- COPY --from=builder --chown=ereo:ereo /app/package.json ./
131
- COPY --from=builder --chown=ereo:ereo /app/ereo.config.* ./
132
- COPY --from=builder --chown=ereo:ereo /app/tsconfig.* ./
127
+ COPY --from=builder --chown=ereo:ereo /app/.ereo ./.ereo
128
+ COPY --from=builder --chown=ereo:ereo /app/app ./app
129
+ COPY --from=builder --chown=ereo:ereo /app/public ./public
130
+ COPY --from=builder --chown=ereo:ereo /app/package.json ./
131
+ COPY --from=builder --chown=ereo:ereo /app/ereo.config.* ./
132
+ COPY --from=builder --chown=ereo:ereo /app/tsconfig.* ./
133
133
 
134
134
  USER ereo
135
135
 
@@ -453,40 +453,44 @@ async function generateTailwindProject(projectDir, projectName, typescript, trac
453
453
  "@ereo/data": EREO_VERSION,
454
454
  "@ereo/cli": EREO_VERSION,
455
455
  "@ereo/runtime-bun": EREO_VERSION,
456
- "@ereo/plugin-tailwind": EREO_VERSION,
457
456
  ...trace ? { "@ereo/trace": EREO_VERSION } : {},
458
457
  react: "^18.2.0",
459
458
  "react-dom": "^18.2.0"
460
459
  },
461
460
  devDependencies: {
461
+ "@ereo/bundler": EREO_VERSION,
462
462
  "@ereo/testing": EREO_VERSION,
463
463
  "@ereo/dev-inspector": EREO_VERSION,
464
+ "@ereo/plugin-tailwind": EREO_VERSION,
465
+ tailwindcss: "^3.4.0",
464
466
  ...ts ? {
465
467
  "@types/bun": "^1.1.0",
466
468
  "@types/react": "^18.2.0",
467
469
  "@types/react-dom": "^18.2.0",
468
470
  typescript: "^5.4.0"
469
- } : {},
470
- tailwindcss: "^3.4.0"
471
+ } : {}
471
472
  }
472
473
  };
473
474
  await Bun.write(join(projectDir, "package.json"), JSON.stringify(packageJson, null, 2));
474
475
  const ereoConfig = `
475
476
  import { defineConfig } from '@ereo/core';
476
- import tailwind from '@ereo/plugin-tailwind';
477
+
478
+ const plugins = [];
479
+
480
+ // Tailwind is a dev/build dependency \u2014 skip in production
481
+ if (process.env.NODE_ENV !== 'production') {
482
+ const { default: tailwind } = await import('@ereo/plugin-tailwind');
483
+ plugins.push(tailwind());
484
+ }
477
485
 
478
486
  export default defineConfig({
479
487
  server: {
480
488
  port: 3000,
481
- // Enable development features
482
- development: process.env.NODE_ENV !== 'production',
483
489
  },
484
490
  build: {
485
491
  target: 'bun',
486
492
  },
487
- plugins: [
488
- tailwind(),
489
- ],
493
+ plugins,
490
494
  });
491
495
  `.trim();
492
496
  await Bun.write(join(projectDir, `ereo.config.${ts ? "ts" : "js"}`), ereoConfig);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-ereo",
3
- "version": "0.1.32",
3
+ "version": "0.1.33",
4
4
  "license": "MIT",
5
5
  "author": "Ereo Team",
6
6
  "homepage": "https://ereo.dev",