create-packkit 1.5.0 → 2.0.0

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/README.md CHANGED
@@ -33,7 +33,7 @@ No install needed: **[danmat.github.io/create-packkit](https://danmat.github.io/
33
33
  | Area | Options |
34
34
  |---|---|
35
35
  | **Language** | TypeScript (strict) · JavaScript (ESM) |
36
- | **Module format** | ESM · CJS · dual (proper `exports` map) |
36
+ | **Module format** | **ESM-only (default)** · dual (ESM + CJS) · CJS proper `exports` map |
37
37
  | **Target** | Library · CLI tool · **HTTP service (Hono)** · **App (Vite SPA)** · any combination |
38
38
  | **Framework** | None · **React** · **Vue** · **Svelte** (component libraries or apps) |
39
39
  | **Storybook** | optional, for React / Vue / Svelte component libraries |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-packkit",
3
- "version": "1.5.0",
3
+ "version": "2.0.0",
4
4
  "description": "Highly configurable scaffolder for modern npm packages and CLIs — pick your stack (TS/JS, bundler, tests, linter, CI, releases) from a CLI or a web configurator.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -21,11 +21,11 @@ export const OPTIONS = {
21
21
  ],
22
22
  },
23
23
  moduleFormat: {
24
- group: 'core', type: 'select', label: 'Module format', default: 'dual',
24
+ group: 'core', type: 'select', label: 'Module format', default: 'esm',
25
25
  choices: [
26
- { value: 'esm', label: 'ESM only' },
27
- { value: 'cjs', label: 'CommonJS only' },
26
+ { value: 'esm', label: 'ESM only (recommended)' },
28
27
  { value: 'dual', label: 'Dual (ESM + CJS)' },
28
+ { value: 'cjs', label: 'CommonJS only' },
29
29
  ],
30
30
  },
31
31
  target: {
@@ -2,12 +2,12 @@
2
2
  // the wizard: `npx packkit ts-lib my-project`.
3
3
 
4
4
  export const PRESETS = {
5
- 'ts-lib': { language: 'ts', target: ['library'], moduleFormat: 'dual' },
6
- 'js-lib': { language: 'js', target: ['library'], moduleFormat: 'dual', bundler: 'tsup' },
5
+ 'ts-lib': { language: 'ts', target: ['library'], moduleFormat: 'esm' },
6
+ 'js-lib': { language: 'js', target: ['library'], moduleFormat: 'esm', bundler: 'tsup' },
7
7
  'ts-cli': { language: 'ts', target: ['cli', 'library'], moduleFormat: 'esm' },
8
8
  cli: { language: 'ts', target: ['cli', 'library'], moduleFormat: 'esm' },
9
- 'react-lib': { language: 'ts', framework: 'react', target: ['library'], moduleFormat: 'dual', test: 'vitest' },
10
- 'react-lib-js': { language: 'js', framework: 'react', target: ['library'], moduleFormat: 'dual', bundler: 'tsup', test: 'vitest' },
9
+ 'react-lib': { language: 'ts', framework: 'react', target: ['library'], moduleFormat: 'esm', test: 'vitest' },
10
+ 'react-lib-js': { language: 'js', framework: 'react', target: ['library'], moduleFormat: 'esm', bundler: 'tsup', test: 'vitest' },
11
11
  'react-app': { language: 'ts', framework: 'react', target: ['app'], test: 'vitest', release: 'none', workflows: ['ci'] },
12
12
  'vue-lib': { language: 'ts', framework: 'vue', target: ['library'], test: 'vitest' },
13
13
  'vue-app': { language: 'ts', framework: 'vue', target: ['app'], test: 'vitest', release: 'none', workflows: ['ci'] },
@@ -20,19 +20,19 @@ export const PRESETS = {
20
20
  },
21
21
  monorepo: { monorepo: true, language: 'ts', packageManager: 'pnpm' },
22
22
  oss: {
23
- language: 'ts', target: ['library'], moduleFormat: 'dual', bundler: 'tsup',
23
+ language: 'ts', target: ['library'], moduleFormat: 'esm', bundler: 'tsup',
24
24
  test: 'vitest', coverage: true, lint: 'eslint-prettier', gitHooks: 'simple-git-hooks',
25
25
  release: 'changesets', workflows: ['ci', 'npm-publish', 'codeql', 'codecov'],
26
26
  deps: 'renovate', community: true, agents: true, vscode: true,
27
27
  pkgChecks: true, knip: true,
28
28
  },
29
29
  minimal: {
30
- language: 'ts', target: ['library'], moduleFormat: 'dual', bundler: 'tsup',
30
+ language: 'ts', target: ['library'], moduleFormat: 'esm', bundler: 'tsup',
31
31
  test: 'none', lint: 'none', gitHooks: 'none', release: 'none',
32
32
  workflows: ['ci'], deps: 'none', community: false, agents: false, vscode: false,
33
33
  },
34
34
  full: {
35
- language: 'ts', target: ['library', 'cli'], moduleFormat: 'dual', bundler: 'tsup',
35
+ language: 'ts', target: ['library', 'cli'], moduleFormat: 'esm', bundler: 'tsup',
36
36
  test: 'vitest', coverage: true, lint: 'eslint-prettier', gitHooks: 'simple-git-hooks',
37
37
  release: 'changesets',
38
38
  workflows: ['ci', 'npm-publish', 'pages', 'codeql', 'codecov', 'stale'],
@@ -65,14 +65,14 @@ export function resolvePreset(name) {
65
65
 
66
66
  // Short gists for the CLI help and the web configurator (tooltips + description).
67
67
  export const PRESET_INFO = {
68
- 'ts-lib': 'TypeScript library — dual ESM/CJS, tsup, Vitest, ESLint.',
68
+ 'ts-lib': 'TypeScript library — ESM-only, tsup, Vitest, ESLint.',
69
69
  'js-lib': 'JavaScript (ESM) library — tsup, Vitest, ESLint.',
70
70
  'ts-cli': 'TypeScript CLI + library — ESM, ships a bin.',
71
71
  cli: 'TypeScript CLI tool — ESM, ships a bin.',
72
72
  'react-lib': 'React component library (TS) — JSX, peer deps, jsdom tests.',
73
73
  'react-lib-js': 'React component library (JS) — JSX, peer deps, jsdom tests.',
74
74
  'react-app': 'React SPA — Vite dev server, build, Testing Library.',
75
- 'vue-lib': 'Vue component library — Vite lib build (SFCs), dual + types.',
75
+ 'vue-lib': 'Vue component library — Vite lib build (SFCs), ESM + types.',
76
76
  'vue-app': 'Vue SPA — Vite dev server, build, Testing Library.',
77
77
  'svelte-lib': 'Svelte component library — ships source, peer svelte, jsdom tests.',
78
78
  'svelte-app': 'Svelte SPA — Vite dev server, build, Testing Library.',