@codefast/cli 0.3.1-canary.6 → 0.3.1-canary.8

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @codefast/cli
2
2
 
3
+ ## 0.3.1-canary.8
4
+
5
+ ### Patch Changes
6
+
7
+ - [`bcf67ce`](https://github.com/codefastlabs/codefast/commit/bcf67ce958af5bbb81a031dd3f17a5b5a3f42595) Thanks [@thevuong](https://github.com/thevuong)! - changeset
8
+
9
+ ## 0.3.1-canary.7
10
+
11
+ ### Patch Changes
12
+
13
+ - [`d2bfdc3`](https://github.com/codefastlabs/codefast/commit/d2bfdc328205629d8810756f586e8ff3a2db8f73) Thanks [@thevuong](https://github.com/thevuong)! - fix(cli): update lint script to use autofix option
14
+
3
15
  ## 0.3.1-canary.6
4
16
 
5
17
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -151,6 +151,125 @@ const PACKAGES_TO_REMOVE = [
151
151
  "@eslint/eslintrc"
152
152
  ];
153
153
  const configGroups = {
154
+ deployment: [
155
+ {
156
+ path: ".vercelignore",
157
+ content: `#-------------------------------------------------------------------------------
158
+ # Dependencies and package managers
159
+ #-------------------------------------------------------------------------------
160
+
161
+ # Node dependencies
162
+ node_modules
163
+ .pnpm-store
164
+ .yarn
165
+
166
+ #-------------------------------------------------------------------------------
167
+ # Development and environment
168
+ #-------------------------------------------------------------------------------
169
+
170
+ # Environment variables (except examples)
171
+ .env*
172
+ !.env.example
173
+
174
+ # Build artifacts
175
+ .next
176
+ build
177
+ dist
178
+ .git
179
+ .github
180
+ .turbo
181
+ .changeset
182
+ .eslintcache
183
+
184
+ # Debug logs
185
+ npm-debug.log*
186
+ yarn-debug.log*
187
+
188
+ #-------------------------------------------------------------------------------
189
+ # Testing
190
+ #-------------------------------------------------------------------------------
191
+
192
+ # Test coverage reports and config snapshots
193
+ coverage
194
+ *.test.*
195
+ *.e2e.*
196
+
197
+ #-------------------------------------------------------------------------------
198
+ # Editor and IDE configuration
199
+ #-------------------------------------------------------------------------------
200
+
201
+ # IDE project files
202
+ .idea
203
+ *.suo
204
+ *.ntvs*
205
+ *.njsproj
206
+ *.sln
207
+
208
+ #-------------------------------------------------------------------------------
209
+ # Operating system files
210
+ #-------------------------------------------------------------------------------
211
+
212
+ # System metadata files
213
+ .DS_Store
214
+ Thumbs.db
215
+
216
+ #-------------------------------------------------------------------------------
217
+ # Deployment
218
+ #-------------------------------------------------------------------------------
219
+
220
+ # Vercel deployment configuration
221
+ .vercel
222
+ `,
223
+ description: "Ignore files that should not be deployed to Vercel"
224
+ }
225
+ ],
226
+ formatting: [
227
+ {
228
+ path: "prettier.config.mjs",
229
+ content: `/**
230
+ * @see https://prettier.io/docs/en/configuration.html
231
+ * @type {import('prettier').Config}
232
+ */
233
+ const config = {
234
+ plugins: ["prettier-plugin-packagejson", "prettier-plugin-tailwindcss"],
235
+ printWidth: 100,
236
+ tailwindAttributes: ["classNames"],
237
+ tailwindFunctions: ["tv"],
238
+ };
239
+
240
+ export default config;
241
+ `,
242
+ description: "Prettier configuration for source code formatting"
243
+ },
244
+ {
245
+ path: ".editorconfig",
246
+ content: `# https://editorconfig.org
247
+ root = true
248
+
249
+ [*]
250
+ charset = utf-8
251
+ insert_final_newline = true
252
+
253
+ end_of_line = lf
254
+ indent_style = space
255
+ indent_size = 2
256
+ max_line_length = 120
257
+
258
+ trim_trailing_whitespace = true
259
+
260
+ [Makefile]
261
+ indent_style = tab
262
+
263
+ [{go.mod,go.sum,*.go}]
264
+ indent_style = tab
265
+
266
+ [*.rs]
267
+ # Keep in sync with rustfmt
268
+ indent_size = 4
269
+ `,
270
+ description: "Editor configuration for source code formatting"
271
+ }
272
+ ],
154
273
  linting: [
155
274
  {
156
275
  path: "commitlint.config.mjs",
@@ -164,6 +283,7 @@ const config = {
164
283
  "body-max-line-length": [2, "always", 350],
165
284
  },
166
285
  };
286
+
167
287
  export default config;
168
288
  `,
169
289
  description: "Commitlint configuration"
@@ -176,6 +296,7 @@ export default config;
176
296
  * @type {import('eslint').Linter.Config[]}
177
297
  */
178
298
  const eslintConfig = [...config];
299
+
179
300
  export default eslintConfig;
180
301
  `,
181
302
  description: "ESLint configuration for the project"
@@ -194,6 +315,7 @@ function buildEslintCommand(filenames) {
194
315
  return \`next lint --fix --max-warnings 0 --file \${filenames.map((file) => relative(import.meta.dirname, file)).
195
316
  join(" --file ")}\`;
196
317
  }
318
+
197
319
  /**
198
320
  * @see https://www.npmjs.com/package/lint-staged
199
321
  * @type {import('lint-staged').Configuration}
@@ -202,42 +324,28 @@ const config = {
202
324
  "*.{js,mjs,jsx,ts,tsx}": [buildEslintCommand, "prettier --list-different --write"],
203
325
  "*.{json,css,md,mdx}": ["prettier --list-different --write"],
204
326
  };
327
+
205
328
  export default config;
206
329
  `,
207
330
  description: "Configure lint-staged for pre-commit checks"
208
331
  }
209
332
  ],
210
- formatting: [
211
- {
212
- path: "prettier.config.mjs",
213
- content: `/**
214
- * @see https://prettier.io/docs/en/configuration.html
215
- * @type {import('prettier').Config}
216
- */
217
- const config = {
218
- plugins: ["prettier-plugin-packagejson", "prettier-plugin-tailwindcss"],
219
- printWidth: 100,
220
- tailwindAttributes: ["classNames"],
221
- tailwindFunctions: ["tv"],
222
- };
223
- export default config;
224
- `,
225
- description: "Prettier configuration for source code formatting"
226
- }
227
- ],
228
333
  styles: [
229
334
  {
230
335
  path: "src/lib/fonts.ts",
231
336
  content: `import { cn } from "@codefast/ui";
232
337
  import { Geist, Geist_Mono as GeistMono } from "next/font/google";
338
+
233
339
  const fontGeistSans = Geist({
234
340
  subsets: ["latin"],
235
341
  variable: "--font-geist-sans",
236
342
  });
343
+
237
344
  const fontGeistMono = GeistMono({
238
345
  subsets: ["latin"],
239
346
  variable: "--font-geist-mono",
240
347
  });
348
+
241
349
  export const fontVariables = cn(fontGeistSans.variable, fontGeistMono.variable);
242
350
  `,
243
351
  description: "Font configuration for the application"
@@ -245,9 +353,13 @@ export const fontVariables = cn(fontGeistSans.variable, fontGeistMono.variable);
245
353
  {
246
354
  path: "src/app/globals.css",
247
355
  content: `@import "tailwindcss";
356
+
248
357
  @import "@codefast/ui/styles.css";
358
+
249
359
  @source '../../node_modules/@codefast/ui';
360
+
250
361
  @custom-variant dark (&:where(.dark, .dark *));
362
+
251
363
  @layer base {
252
364
  :root {
253
365
  --font-sans: var(--font-geist-sans);
@@ -370,9 +482,16 @@ function updatePackageJson(projectDir) {
370
482
  const packageJson = JSON.parse(external_node_fs_default().readFileSync(packageJsonPath, "utf8"));
371
483
  packageJson.scripts = {
372
484
  ...packageJson.scripts,
485
+ "deploy:preview": "vercel deploy --archive=tgz",
486
+ "deploy:prod": "vercel deploy --archive=tgz --prod",
373
487
  format: 'prettier --write "**/*.{js,mjs,jsx,ts,tsx,json,css,md,mdx}"',
374
488
  "format:check": 'prettier --check "**/*.{js,mjs,jsx,ts,tsx,json,css,md,mdx}"',
375
- "lint:check": "next lint --max-warnings 0"
489
+ lint: "next lint --fix --max-warnings 0",
490
+ "lint:check": "next lint --max-warnings 0",
491
+ "package:install": "pnpm install",
492
+ "package:outdated": "pnpm outdated",
493
+ "package:upgrade": "pnpm update --latest",
494
+ preview: "pnpm build && pnpm start"
376
495
  };
377
496
  packageJson["simple-git-hooks"] = {
378
497
  "pre-commit": "pnpm lint-staged",