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

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