@jakubmazanec/carson-templates 2.1.1 → 2.2.0-next.c370ab6

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 (49) hide show
  1. package/build/dependency-versions.js +10 -1
  2. package/build/dependency-versions.js.map +2 -2
  3. package/package.json +6 -5
  4. package/source/dependency-versions.ts +10 -1
  5. package/templates/projects/carson-templates/.editorconfig.ejs +8 -0
  6. package/templates/projects/carson-templates/config.json +1 -4
  7. package/templates/projects/carson-templates/package.json.ejs +2 -0
  8. package/templates/projects/carson-templates/vite.config.ts.ejs +27 -0
  9. package/templates/projects/changesets-changelog/.editorconfig.ejs +8 -0
  10. package/templates/projects/changesets-changelog/config.json +1 -4
  11. package/templates/projects/changesets-changelog/package.json.ejs +2 -0
  12. package/templates/projects/changesets-changelog/vite.config.mts.ejs +27 -0
  13. package/templates/projects/eslint-config/.editorconfig.ejs +8 -0
  14. package/templates/projects/eslint-config/config.json +1 -4
  15. package/templates/projects/library/.editorconfig.ejs +8 -0
  16. package/templates/projects/library/config.json +1 -4
  17. package/templates/projects/library/package.json.ejs +2 -0
  18. package/templates/projects/library/vite.config.ts.ejs +27 -0
  19. package/templates/projects/react-library/.editorconfig.ejs +3 -0
  20. package/templates/projects/react-library/.eslintrc.cjs.ejs +21 -0
  21. package/templates/projects/react-library/.prettierignore.ejs +3 -0
  22. package/templates/projects/react-library/.storybook/main.ts.ejs +32 -0
  23. package/templates/projects/react-library/.storybook/preview.tsx.ensure.ejs +25 -0
  24. package/templates/projects/react-library/.storybook/tailwind.css.ejs +15 -0
  25. package/templates/projects/react-library/.storybook/tailwindConfig.ts.ensure.ejs +13 -0
  26. package/templates/projects/react-library/CONTRIBUTING.md.ejs +3 -0
  27. package/templates/projects/react-library/README.md.create.ejs +36 -0
  28. package/templates/projects/react-library/README.md.insert.header.ejs +12 -0
  29. package/templates/projects/react-library/config.json +1 -0
  30. package/templates/projects/react-library/package.json.create.ejs +3 -0
  31. package/templates/projects/react-library/package.json.ejs +85 -0
  32. package/templates/projects/react-library/postcss.config.cjs.ejs +18 -0
  33. package/templates/projects/react-library/prettier.config.cjs.ejs +3 -0
  34. package/templates/projects/react-library/source/main.ts.check.ejs +3 -0
  35. package/templates/projects/react-library/source/main.ts.create.ejs +3 -0
  36. package/templates/projects/react-library/tailwind.config.ts.ejs +13 -0
  37. package/templates/projects/react-library/tests/setup.ts.ejs +13 -0
  38. package/templates/projects/react-library/tests/tsconfig.json.ejs +24 -0
  39. package/templates/projects/react-library/tsconfig.json.ejs +3 -0
  40. package/templates/projects/react-library/tsconfig.typecheck.json.ejs +25 -0
  41. package/templates/projects/react-library/typedoc.config.cjs.ejs +3 -0
  42. package/templates/projects/react-library/vite.config.ts.ejs +29 -0
  43. package/templates/projects/remix-app/.editorconfig.ejs +8 -0
  44. package/templates/projects/remix-app/config.json +1 -4
  45. package/templates/projects/remix-app/tests/setup.ts.ejs +1 -11
  46. package/templates/projects/remix-app/vite.config.ts.ejs +3 -0
  47. package/templates/workspace/.editorconfig.ejs +8 -0
  48. package/templates/workspace/config.json +1 -4
  49. package/templates/workspace/turbo.json.ejs +3 -3
@@ -29,11 +29,19 @@ export const DEPENDENCY_VERSIONS = {
29
29
  [CHANGELOG_PACKAGE_NAME]: "^2.0.0",
30
30
  [LINTER_CONFIG_PACKAGE_NAME]: "^3.0.0",
31
31
  "@changesets/cli": "^2.0.0",
32
+ "@chromatic-com/storybook": "^1.0.0",
32
33
  "@remix-run/dev": "^2.0.0",
33
34
  "@remix-run/express": "^2.0.0",
34
35
  "@remix-run/node": "^2.0.0",
35
36
  "@remix-run/react": "^2.0.0",
36
37
  "@remix-run/serve": "^2.0.0",
38
+ "@storybook/addon-essentials": "^8.0.0",
39
+ "@storybook/addon-interactions": "^8.0.0",
40
+ "@storybook/addon-links": "^8.0.0",
41
+ "@storybook/blocks": "^8.0.0",
42
+ "@storybook/react": "^8.0.0",
43
+ "@storybook/react-vite": "^8.0.0",
44
+ "@storybook/test": "^8.0.0",
37
45
  "@testing-library/jest-dom": "^6.0.0",
38
46
  "@testing-library/react": "^14.0.0",
39
47
  "@types/lodash": "^4.0.0",
@@ -48,14 +56,15 @@ export const DEPENDENCY_VERSIONS = {
48
56
  esbuild: "^0.19.0",
49
57
  eslint: "^8.0.0",
50
58
  "happy-dom": "^13.0.0",
51
- lodash: "^4.0.0",
52
59
  isbot: "^4.0.0",
60
+ lodash: "^4.0.0",
53
61
  "patch-package": "^6.0.0",
54
62
  prettier: "^3.0.0",
55
63
  "prettier-plugin-packagejson": "^2.0.0",
56
64
  "prettier-plugin-tailwindcss": "^0.5.0",
57
65
  react: "^18.0.0",
58
66
  "react-dom": "^18.0.0",
67
+ storybook: "^8.0.0",
59
68
  tailwindcss: "^3.0.0",
60
69
  turbo: "^1.0.0",
61
70
  typedoc: "^0.24.0",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../source/dependency-versions.ts"],
4
- "sourcesContent": ["import fs from 'node:fs';\nimport {createRequire} from 'node:module';\nimport semver from 'semver';\n\nimport {\n CARSON_PACKAGE_NAME,\n CHANGELOG_PACKAGE_NAME,\n LINTER_CONFIG_PACKAGE_NAME,\n TEMPLATE_PACKAGE_NAME,\n} from './constants.js';\n\nlet require = createRequire(import.meta.url);\nlet carsonPackageVersion =\n semver\n .minVersion(\n (\n JSON.parse(\n fs.readFileSync(require.resolve(`${TEMPLATE_PACKAGE_NAME}/package.json`), {\n encoding: 'utf8',\n }),\n ) as {peerDependencies: Record<string, string>}\n ).peerDependencies[CARSON_PACKAGE_NAME] ?? '^1.0.0',\n )\n ?.format() ?? '1.0.0';\nlet isCarsonPackageVersionPrerelease = !!semver.prerelease(carsonPackageVersion)?.length;\nlet templatesPackageVersion = (\n JSON.parse(\n fs.readFileSync(require.resolve(`${TEMPLATE_PACKAGE_NAME}/package.json`), {\n encoding: 'utf8',\n }),\n ) as {version: string}\n).version;\nlet isTemplatesPackageVersionPrerelease = !!semver.prerelease(templatesPackageVersion)?.length;\n\nexport const DEPENDENCY_VERSIONS: Record<string, string> = {\n [CARSON_PACKAGE_NAME]:\n isCarsonPackageVersionPrerelease ? carsonPackageVersion : `^${carsonPackageVersion}`,\n [TEMPLATE_PACKAGE_NAME]:\n isTemplatesPackageVersionPrerelease ? templatesPackageVersion : `^${templatesPackageVersion}`,\n [CHANGELOG_PACKAGE_NAME]: '^2.0.0',\n [LINTER_CONFIG_PACKAGE_NAME]: '^3.0.0',\n\n '@changesets/cli': '^2.0.0',\n '@remix-run/dev': '^2.0.0',\n '@remix-run/express': '^2.0.0',\n '@remix-run/node': '^2.0.0',\n '@remix-run/react': '^2.0.0',\n '@remix-run/serve': '^2.0.0',\n '@testing-library/jest-dom': '^6.0.0',\n '@testing-library/react': '^14.0.0',\n '@types/lodash': '^4.0.0',\n '@types/node': '^20.0.0',\n '@types/react': '^18.0.0',\n '@types/react-dom': '^18.0.0',\n '@vitest/coverage-v8': '^1.0.0',\n autoprefixer: '^10.0.0',\n concurrently: '^8.0.0',\n 'cross-env': '^7.0.0',\n 'del-cli': '^5.0.0',\n esbuild: '^0.19.0',\n eslint: '^8.0.0',\n 'happy-dom': '^13.0.0',\n lodash: '^4.0.0',\n isbot: '^4.0.0',\n 'patch-package': '^6.0.0',\n prettier: '^3.0.0',\n 'prettier-plugin-packagejson': '^2.0.0',\n 'prettier-plugin-tailwindcss': '^0.5.0',\n react: '^18.0.0',\n 'react-dom': '^18.0.0',\n tailwindcss: '^3.0.0',\n turbo: '^1.0.0',\n typedoc: '^0.24.0',\n 'typedoc-plugin-markdown': '^3.0.0',\n typescript: '^5.0.0',\n vite: '^5.0.0',\n vitest: '^1.0.0',\n};\n"],
5
- "mappings": ";AAAA,OAAO,QAAQ;AACf,SAAQ,qBAAoB;AAC5B,OAAO,YAAY;AAEnB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,IAAI,UAAU,cAAc,YAAY,GAAG;AAC3C,IAAI,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,EACP,SAAS;AAAA,EACT,2BAA2B;AAAA,EAC3B,YAAY;AAAA,EACZ,MAAM;AAAA,EACN,QAAQ;AACV;",
4
+ "sourcesContent": ["import fs from 'node:fs';\nimport {createRequire} from 'node:module';\nimport semver from 'semver';\n\nimport {\n CARSON_PACKAGE_NAME,\n CHANGELOG_PACKAGE_NAME,\n LINTER_CONFIG_PACKAGE_NAME,\n TEMPLATE_PACKAGE_NAME,\n} from './constants.js';\n\nlet require = createRequire(import.meta.url);\nlet carsonPackageVersion =\n semver\n .minVersion(\n (\n JSON.parse(\n fs.readFileSync(require.resolve(`${TEMPLATE_PACKAGE_NAME}/package.json`), {\n encoding: 'utf8',\n }),\n ) as {peerDependencies: Record<string, string>}\n ).peerDependencies[CARSON_PACKAGE_NAME] ?? '^1.0.0',\n )\n ?.format() ?? '1.0.0';\nlet isCarsonPackageVersionPrerelease = !!semver.prerelease(carsonPackageVersion)?.length;\nlet templatesPackageVersion = (\n JSON.parse(\n fs.readFileSync(require.resolve(`${TEMPLATE_PACKAGE_NAME}/package.json`), {\n encoding: 'utf8',\n }),\n ) as {version: string}\n).version;\nlet isTemplatesPackageVersionPrerelease = !!semver.prerelease(templatesPackageVersion)?.length;\n\nexport const DEPENDENCY_VERSIONS: Record<string, string> = {\n [CARSON_PACKAGE_NAME]:\n isCarsonPackageVersionPrerelease ? carsonPackageVersion : `^${carsonPackageVersion}`,\n [TEMPLATE_PACKAGE_NAME]:\n isTemplatesPackageVersionPrerelease ? templatesPackageVersion : `^${templatesPackageVersion}`,\n [CHANGELOG_PACKAGE_NAME]: '^2.0.0',\n [LINTER_CONFIG_PACKAGE_NAME]: '^3.0.0',\n\n '@changesets/cli': '^2.0.0',\n '@chromatic-com/storybook': '^1.0.0',\n '@remix-run/dev': '^2.0.0',\n '@remix-run/express': '^2.0.0',\n '@remix-run/node': '^2.0.0',\n '@remix-run/react': '^2.0.0',\n '@remix-run/serve': '^2.0.0',\n '@storybook/addon-essentials': '^8.0.0',\n '@storybook/addon-interactions': '^8.0.0',\n '@storybook/addon-links': '^8.0.0',\n '@storybook/blocks': '^8.0.0',\n '@storybook/react': '^8.0.0',\n '@storybook/react-vite': '^8.0.0',\n '@storybook/test': '^8.0.0',\n '@testing-library/jest-dom': '^6.0.0',\n '@testing-library/react': '^14.0.0',\n '@types/lodash': '^4.0.0',\n '@types/node': '^20.0.0',\n '@types/react': '^18.0.0',\n '@types/react-dom': '^18.0.0',\n '@vitest/coverage-v8': '^1.0.0',\n autoprefixer: '^10.0.0',\n concurrently: '^8.0.0',\n 'cross-env': '^7.0.0',\n 'del-cli': '^5.0.0',\n esbuild: '^0.19.0',\n eslint: '^8.0.0',\n 'happy-dom': '^13.0.0',\n isbot: '^4.0.0',\n lodash: '^4.0.0',\n 'patch-package': '^6.0.0',\n prettier: '^3.0.0',\n 'prettier-plugin-packagejson': '^2.0.0',\n 'prettier-plugin-tailwindcss': '^0.5.0',\n react: '^18.0.0',\n 'react-dom': '^18.0.0',\n storybook: '^8.0.0',\n tailwindcss: '^3.0.0',\n turbo: '^1.0.0',\n typedoc: '^0.24.0',\n 'typedoc-plugin-markdown': '^3.0.0',\n typescript: '^5.0.0',\n vite: '^5.0.0',\n vitest: '^1.0.0',\n};\n"],
5
+ "mappings": ";AAAA,OAAO,QAAQ;AACf,SAAQ,qBAAoB;AAC5B,OAAO,YAAY;AAEnB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,IAAI,UAAU,cAAc,YAAY,GAAG;AAC3C,IAAI,uBACF,OACG;AAAA,EAEG,KAAK;AAAA,IACH,GAAG,aAAa,QAAQ,QAAQ,GAAG,qBAAqB,eAAe,GAAG;AAAA,MACxE,UAAU;AAAA,IACZ,CAAC;AAAA,EACH,EACA,iBAAiB,mBAAmB,KAAK;AAC7C,GACE,OAAO,KAAK;AAClB,IAAI,mCAAmC,CAAC,CAAC,OAAO,WAAW,oBAAoB,GAAG;AAClF,IAAI,0BACF,KAAK;AAAA,EACH,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names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jakubmazanec/carson-templates",
3
- "version": "2.1.1",
3
+ "version": "2.2.0-next.c370ab6",
4
4
  "description": "Collection of Carson templates.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -34,9 +34,9 @@
34
34
  "semver": "^7.6.0"
35
35
  },
36
36
  "devDependencies": {
37
- "@jakubmazanec/carson": "^1.0.0",
38
- "@jakubmazanec/eslint-config": "^3.0.0",
39
- "@jakubmazanec/fs-utils": "^0.2.0",
37
+ "@jakubmazanec/carson": "1.1.0-next.c370ab6",
38
+ "@jakubmazanec/eslint-config": "3.2.0-next.c370ab6",
39
+ "@jakubmazanec/fs-utils": "0.2.2-next.c370ab6",
40
40
  "@types/fs-extra": "^11.0.4",
41
41
  "@types/lodash": "^4.14.202",
42
42
  "@types/node": "^20.8.5",
@@ -48,6 +48,7 @@
48
48
  "execa": "^8.0.1",
49
49
  "fast-glob": "^3.3.2",
50
50
  "fs-extra": "^11.2.0",
51
+ "lodash": "^4.17.21",
51
52
  "prettier": "^3.2.5",
52
53
  "prettier-plugin-packagejson": "^2.4.12",
53
54
  "typedoc": "^0.25.10",
@@ -57,7 +58,7 @@
57
58
  "zen-observable": "^0.10.0"
58
59
  },
59
60
  "peerDependencies": {
60
- "@jakubmazanec/carson": "^1.0.0"
61
+ "@jakubmazanec/carson": "1.1.0-next.c370ab6"
61
62
  },
62
63
  "packageManager": "npm@10.1.0",
63
64
  "engines": {
@@ -41,11 +41,19 @@ export const DEPENDENCY_VERSIONS: Record<string, string> = {
41
41
  [LINTER_CONFIG_PACKAGE_NAME]: '^3.0.0',
42
42
 
43
43
  '@changesets/cli': '^2.0.0',
44
+ '@chromatic-com/storybook': '^1.0.0',
44
45
  '@remix-run/dev': '^2.0.0',
45
46
  '@remix-run/express': '^2.0.0',
46
47
  '@remix-run/node': '^2.0.0',
47
48
  '@remix-run/react': '^2.0.0',
48
49
  '@remix-run/serve': '^2.0.0',
50
+ '@storybook/addon-essentials': '^8.0.0',
51
+ '@storybook/addon-interactions': '^8.0.0',
52
+ '@storybook/addon-links': '^8.0.0',
53
+ '@storybook/blocks': '^8.0.0',
54
+ '@storybook/react': '^8.0.0',
55
+ '@storybook/react-vite': '^8.0.0',
56
+ '@storybook/test': '^8.0.0',
49
57
  '@testing-library/jest-dom': '^6.0.0',
50
58
  '@testing-library/react': '^14.0.0',
51
59
  '@types/lodash': '^4.0.0',
@@ -60,14 +68,15 @@ export const DEPENDENCY_VERSIONS: Record<string, string> = {
60
68
  esbuild: '^0.19.0',
61
69
  eslint: '^8.0.0',
62
70
  'happy-dom': '^13.0.0',
63
- lodash: '^4.0.0',
64
71
  isbot: '^4.0.0',
72
+ lodash: '^4.0.0',
65
73
  'patch-package': '^6.0.0',
66
74
  prettier: '^3.0.0',
67
75
  'prettier-plugin-packagejson': '^2.0.0',
68
76
  'prettier-plugin-tailwindcss': '^0.5.0',
69
77
  react: '^18.0.0',
70
78
  'react-dom': '^18.0.0',
79
+ storybook: '^8.0.0',
71
80
  tailwindcss: '^3.0.0',
72
81
  turbo: '^1.0.0',
73
82
  typedoc: '^0.24.0',
@@ -2,6 +2,14 @@
2
2
  to: '.editorconfig'
3
3
  strategy: overwrite
4
4
  ---
5
+ #
6
+ # DO NOT EDIT!
7
+ # This file was autogenerated by Carson.
8
+ # Changes may cause incorrect behavior and will be lost when the file is regenerated.
9
+ #
10
+ # Run `npx carson update workspace` to regenerate.
11
+ #
12
+
5
13
  root = true
6
14
 
7
15
  [*]
@@ -1,4 +1 @@
1
- {
2
- "disallowMultiProjectWorkspace": false,
3
- "disallowSingleProjectWorkspace": false
4
- }
1
+ {}
@@ -6,11 +6,13 @@ strategy: merge
6
6
  let developmentDependencies = getDependencies(
7
7
  [
8
8
  LINTER_CONFIG_PACKAGE_NAME,
9
+ '@types/lodash',
9
10
  '@types/node',
10
11
  '@vitest/coverage-v8',
11
12
  'del-cli',
12
13
  'esbuild',
13
14
  'eslint',
15
+ 'lodash',
14
16
  'prettier',
15
17
  'prettier-plugin-packagejson',
16
18
  'typedoc',
@@ -0,0 +1,27 @@
1
+ ---
2
+ to: 'vite.config.ts'
3
+ strategy: overwrite
4
+ ---
5
+ /**
6
+ * DO NOT EDIT!
7
+ * This file was autogenerated by Carson.
8
+ * Changes may cause incorrect behavior and will be lost when the file is regenerated.
9
+ *
10
+ * Run `npx carson update workspace` to regenerate.
11
+ */
12
+
13
+ import _ from 'lodash';
14
+ import {defineConfig} from 'vitest/config';
15
+
16
+ export default defineConfig(
17
+ _.merge(
18
+ {
19
+ test: {
20
+ coverage: {
21
+ include: ['<%- SOURCE_DIRECTORY %>/**'],
22
+ },
23
+ },
24
+ },
25
+ <%- JSON.stringify(project.config.overrides?.viteConfig ?? {}, null, 2) %>,
26
+ ),
27
+ );
@@ -2,6 +2,14 @@
2
2
  to: '.editorconfig'
3
3
  strategy: overwrite
4
4
  ---
5
+ #
6
+ # DO NOT EDIT!
7
+ # This file was autogenerated by Carson.
8
+ # Changes may cause incorrect behavior and will be lost when the file is regenerated.
9
+ #
10
+ # Run `npx carson update workspace` to regenerate.
11
+ #
12
+
5
13
  root = true
6
14
 
7
15
  [*]
@@ -1,4 +1 @@
1
- {
2
- "disallowMultiProjectWorkspace": false,
3
- "disallowSingleProjectWorkspace": false
4
- }
1
+ {}
@@ -6,11 +6,13 @@ strategy: merge
6
6
  let developmentDependencies = getDependencies(
7
7
  [
8
8
  LINTER_CONFIG_PACKAGE_NAME,
9
+ '@types/lodash',
9
10
  '@types/node',
10
11
  '@vitest/coverage-v8',
11
12
  'del-cli',
12
13
  'esbuild',
13
14
  'eslint',
15
+ 'lodash',
14
16
  'prettier',
15
17
  'prettier-plugin-packagejson',
16
18
  'typescript',
@@ -0,0 +1,27 @@
1
+ ---
2
+ to: 'vite.config.mts'
3
+ strategy: overwrite
4
+ ---
5
+ /**
6
+ * DO NOT EDIT!
7
+ * This file was autogenerated by Carson.
8
+ * Changes may cause incorrect behavior and will be lost when the file is regenerated.
9
+ *
10
+ * Run `npx carson update workspace` to regenerate.
11
+ */
12
+
13
+ import _ from 'lodash';
14
+ import {defineConfig} from 'vitest/config';
15
+
16
+ export default defineConfig(
17
+ _.merge(
18
+ {
19
+ test: {
20
+ coverage: {
21
+ include: ['<%- SOURCE_DIRECTORY %>/**'],
22
+ },
23
+ },
24
+ },
25
+ <%- JSON.stringify(project.config.overrides?.viteConfig ?? {}, null, 2) %>,
26
+ ),
27
+ );
@@ -2,6 +2,14 @@
2
2
  to: '.editorconfig'
3
3
  strategy: overwrite
4
4
  ---
5
+ #
6
+ # DO NOT EDIT!
7
+ # This file was autogenerated by Carson.
8
+ # Changes may cause incorrect behavior and will be lost when the file is regenerated.
9
+ #
10
+ # Run `npx carson update workspace` to regenerate.
11
+ #
12
+
5
13
  root = true
6
14
 
7
15
  [*]
@@ -1,4 +1 @@
1
- {
2
- "disallowMultiProjectWorkspace": false,
3
- "disallowSingleProjectWorkspace": false
4
- }
1
+ {}
@@ -2,6 +2,14 @@
2
2
  to: '.editorconfig'
3
3
  strategy: overwrite
4
4
  ---
5
+ #
6
+ # DO NOT EDIT!
7
+ # This file was autogenerated by Carson.
8
+ # Changes may cause incorrect behavior and will be lost when the file is regenerated.
9
+ #
10
+ # Run `npx carson update workspace` to regenerate.
11
+ #
12
+
5
13
  root = true
6
14
 
7
15
  [*]
@@ -1,4 +1 @@
1
- {
2
- "disallowMultiProjectWorkspace": false,
3
- "disallowSingleProjectWorkspace": false
4
- }
1
+ {}
@@ -14,12 +14,14 @@ files.sort();
14
14
  let developmentDependencies = getDependencies(
15
15
  [
16
16
  LINTER_CONFIG_PACKAGE_NAME,
17
+ '@types/lodash',
17
18
  '@types/node',
18
19
  '@vitest/coverage-v8',
19
20
  'concurrently',
20
21
  'del-cli',
21
22
  'esbuild',
22
23
  'eslint',
24
+ 'lodash',
23
25
  'prettier',
24
26
  'prettier-plugin-packagejson',
25
27
  'typedoc',
@@ -0,0 +1,27 @@
1
+ ---
2
+ to: 'vite.config.ts'
3
+ strategy: overwrite
4
+ ---
5
+ /**
6
+ * DO NOT EDIT!
7
+ * This file was autogenerated by Carson.
8
+ * Changes may cause incorrect behavior and will be lost when the file is regenerated.
9
+ *
10
+ * Run `npx carson update workspace` to regenerate.
11
+ */
12
+
13
+ import _ from 'lodash';
14
+ import {defineConfig} from 'vitest/config';
15
+
16
+ export default defineConfig(
17
+ _.merge(
18
+ {
19
+ test: {
20
+ coverage: {
21
+ include: ['<%- SOURCE_DIRECTORY %>/**'],
22
+ },
23
+ },
24
+ },
25
+ <%- JSON.stringify(project.config.overrides?.viteConfig ?? {}, null, 2) %>,
26
+ ),
27
+ );
@@ -0,0 +1,3 @@
1
+ ---
2
+ extends: '../library/.editorconfig.ejs'
3
+ ---
@@ -0,0 +1,21 @@
1
+ ---
2
+ to: '.eslintrc.cjs'
3
+ strategy: overwrite
4
+ ---
5
+ /**
6
+ * DO NOT EDIT!
7
+ * This file was autogenerated by Carson.
8
+ * Changes may cause incorrect behavior and will be lost when the file is regenerated.
9
+ *
10
+ * Run `npx carson update workspace` to regenerate.
11
+ */
12
+
13
+ module.exports = {
14
+ root: true,
15
+ extends: [
16
+ '@jakubmazanec/eslint-config',
17
+ '@jakubmazanec/eslint-config/nodejs',
18
+ '@jakubmazanec/eslint-config/prettier',
19
+ ],
20
+ ignorePatterns: <%- JSON.stringify([...LINT_IGNORE_PATTERNS, '!.storybook'], null, 2) %>,
21
+ };
@@ -0,0 +1,3 @@
1
+ ---
2
+ extends: '../../workspace/.prettierignore.ejs'
3
+ ---
@@ -0,0 +1,32 @@
1
+ ---
2
+ to: '.storybook/main.ts'
3
+ strategy: overwrite
4
+ ---
5
+ /**
6
+ * DO NOT EDIT!
7
+ * This file was autogenerated by Carson.
8
+ * Changes may cause incorrect behavior and will be lost when the file is regenerated.
9
+ *
10
+ * Run `npx carson update workspace` to regenerate.
11
+ */
12
+
13
+ import {type StorybookConfig} from '@storybook/react-vite';
14
+
15
+ const config: StorybookConfig = {
16
+ stories: ['../stories/**/*.mdx', '../stories/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
17
+ addons: [
18
+ '@chromatic-com/storybook',
19
+ '@storybook/addon-essentials',
20
+ '@storybook/addon-interactions',
21
+ '@storybook/addon-links',
22
+ ],
23
+ framework: {
24
+ name: '@storybook/react-vite',
25
+ options: {},
26
+ },
27
+ docs: {
28
+ autodocs: 'tag',
29
+ },
30
+ };
31
+
32
+ export default config;
@@ -0,0 +1,25 @@
1
+ ---
2
+ to: '.storybook/preview.tsx'
3
+ strategy: ensure
4
+ ---
5
+ import {type Preview} from '@storybook/react';
6
+
7
+ import './tailwind.css';
8
+
9
+ const preview: Preview = {
10
+ parameters: {
11
+ controls: {
12
+ matchers: {
13
+ color: /(background|color)$/i,
14
+ date: /Date$/i,
15
+ },
16
+ },
17
+ },
18
+ decorators: [
19
+ (Story) => (
20
+ <Story />
21
+ ),
22
+ ],
23
+ };
24
+
25
+ export default preview;
@@ -0,0 +1,15 @@
1
+ ---
2
+ to: '.storybook/tailwind.css'
3
+ strategy: overwrite
4
+ ---
5
+ /**
6
+ * DO NOT EDIT!
7
+ * This file was autogenerated by Carson.
8
+ * Changes may cause incorrect behavior and will be lost when the file is regenerated.
9
+ *
10
+ * Run `npx carson update workspace` to regenerate.
11
+ */
12
+
13
+ @tailwind base;
14
+ @tailwind components;
15
+ @tailwind utilities;
@@ -0,0 +1,13 @@
1
+ ---
2
+ to: '.storybook/tailwindConfig.ts'
3
+ strategy: ensure
4
+ ---
5
+ import {type Config} from 'tailwindcss';
6
+
7
+ export const tailwindConfig = {
8
+ content: ['./{.storybook,source,stories}/**/*.{js,jsx,ts,tsx}'],
9
+ theme: {
10
+ extend: {},
11
+ },
12
+ plugins: [],
13
+ } satisfies Config;
@@ -0,0 +1,3 @@
1
+ ---
2
+ extends: '../library/CONTRIBUTING.md.ejs'
3
+ ---
@@ -0,0 +1,36 @@
1
+ ---
2
+ to: 'README.md'
3
+ strategy: create
4
+ ---
5
+ <!-- header --><!-- header -->
6
+
7
+ ## Installation
8
+
9
+ ```sh
10
+ npm install <%- project.name %>
11
+ ```
12
+
13
+ ⚠️ This is an [ESM](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c) package!
14
+ It cannot be required from a CommonJS module.
15
+
16
+ #### Prerequisites
17
+
18
+ - Node.js 20 or later
19
+ - TypeScript 5 or later
20
+
21
+ ## Usage
22
+
23
+ 🚧 This section is under development. Please check back later for updates.
24
+
25
+ ## Documentation
26
+
27
+ See [API reference](./docs) for auto-generated documentation.
28
+
29
+ ## Contributing
30
+
31
+ If you want to contribute, see [CONTRIBUTING](./CONTRIBUTING.md) for details.
32
+
33
+ ## License
34
+
35
+ This package is licensed under the GNU Lesser General Public License v3. See [LICENSE](./LICENSE.md)
36
+ for details.
@@ -0,0 +1,12 @@
1
+ ---
2
+ to: 'README.md'
3
+ strategy: [insert, header]
4
+ ---
5
+
6
+ <div align="center">
7
+
8
+ # <%- project.name -%>
9
+
10
+ <%- project.packageJson.description -%>
11
+
12
+ </div>
@@ -0,0 +1,3 @@
1
+ ---
2
+ extends: '../library/package.json.create.ejs'
3
+ ---
@@ -0,0 +1,85 @@
1
+ ---
2
+ to: 'package.json'
3
+ strategy: merge
4
+ ---
5
+ <%
6
+ let files = [BUILD_DIRECTORY, SOURCE_DIRECTORY];
7
+
8
+ if (project.packageJson.bin) {
9
+ files.push('bin');
10
+ }
11
+
12
+ files.sort();
13
+
14
+ let dependencies = [
15
+ LINTER_CONFIG_PACKAGE_NAME,
16
+ '@chromatic-com/storybook',
17
+ '@storybook/addon-essentials',
18
+ '@storybook/addon-interactions',
19
+ '@storybook/addon-links',
20
+ '@storybook/blocks',
21
+ '@storybook/react',
22
+ '@storybook/react-vite',
23
+ '@storybook/test',
24
+ '@testing-library/jest-dom',
25
+ '@testing-library/react',
26
+ '@types/lodash',
27
+ '@types/node',
28
+ '@types/react',
29
+ '@types/react-dom',
30
+ '@vitest/coverage-v8',
31
+ 'autoprefixer',
32
+ 'concurrently',
33
+ 'del-cli',
34
+ 'esbuild',
35
+ 'eslint',
36
+ 'happy-dom',
37
+ 'lodash',
38
+ 'prettier',
39
+ 'prettier-plugin-packagejson',
40
+ 'prettier-plugin-tailwindcss',
41
+ 'react',
42
+ 'react-dom',
43
+ 'storybook',
44
+ 'tailwindcss',
45
+ 'typedoc',
46
+ 'typedoc-plugin-markdown',
47
+ 'typescript',
48
+ 'vitest',
49
+ ].filter((dependency) => {
50
+ return !Object.keys(project.packageJson.dependencies ?? {}).some((key) => key === dependency); // if a project package.json already contains dependency, we don't need to add it
51
+ });
52
+ let developmentDependencies = getDependencies(dependencies, workspace);
53
+ let packageJson = lodash.merge(
54
+ {
55
+ repository: {
56
+ type: 'git',
57
+ directory: project.relativePath,
58
+ },
59
+ type: 'module',
60
+ exports: `./${BUILD_DIRECTORY}/main.js`,
61
+ files,
62
+ scripts: {
63
+ build: `del-cli ${BUILD_DIRECTORY} tsconfig.tsbuildinfo && ${BUILD_TO_ESM_COMMAND} && tsc && storybook build`,
64
+ clean: `del-cli coverage ${BUILD_DIRECTORY} *.tsbuildinfo`,
65
+ develop: `concurrently "${BUILD_TO_ESM_COMMAND} --watch" "tsc --watch" "storybook dev -p 6006 --no-open"`,
66
+ document: 'del-cli docs && typedoc --options typedoc.config.cjs',
67
+ format: FORMAT_COMMAND,
68
+ lint: 'eslint .',
69
+ test: `del-cli coverage && ${TEST_COMMAND}`,
70
+ typecheck: 'tsc --project tsconfig.typecheck.json',
71
+ },
72
+ devDependencies: developmentDependencies,
73
+ peerDependencies: {
74
+ react: '18.x',
75
+ 'react-dom': '18.x',
76
+ },
77
+ packageManager: 'npm@10.1.0',
78
+ engines: {
79
+ node: '^20.8.0',
80
+ },
81
+ },
82
+ project.config.overrides?.packageJson ?? {},
83
+ );
84
+ -%>
85
+ <%- JSON.stringify(packageJson) %>
@@ -0,0 +1,18 @@
1
+ ---
2
+ to: 'postcss.config.cjs'
3
+ strategy: overwrite
4
+ ---
5
+ /**
6
+ * DO NOT EDIT!
7
+ * This file was autogenerated by Carson.
8
+ * Changes may cause incorrect behavior and will be lost when the file is regenerated.
9
+ *
10
+ * Run `npx carson update workspace` to regenerate.
11
+ */
12
+
13
+ module.exports = {
14
+ plugins: {
15
+ tailwindcss: {},
16
+ autoprefixer: {},
17
+ },
18
+ };
@@ -0,0 +1,3 @@
1
+ ---
2
+ extends: '../../workspace/prettier.config.cjs.ejs'
3
+ ---
@@ -0,0 +1,3 @@
1
+ ---
2
+ extends: '../../library/source/main.ts.check.ejs'
3
+ ---
@@ -0,0 +1,3 @@
1
+ ---
2
+ extends: '../../library/source/main.ts.create.ejs'
3
+ ---
@@ -0,0 +1,13 @@
1
+ ---
2
+ to: 'tailwind.config.ts'
3
+ strategy: overwrite
4
+ ---
5
+ /**
6
+ * DO NOT EDIT!
7
+ * This file was autogenerated by Carson.
8
+ * Changes may cause incorrect behavior and will be lost when the file is regenerated.
9
+ *
10
+ * Run `npx carson update workspace` to regenerate.
11
+ */
12
+
13
+ export {tailwindConfig as default} from './.storybook/tailwindConfig.js';
@@ -0,0 +1,13 @@
1
+ ---
2
+ to: 'tests/setup.ts'
3
+ strategy: overwrite
4
+ ---
5
+ /**
6
+ * DO NOT EDIT!
7
+ * This file was autogenerated by Carson.
8
+ * Changes may cause incorrect behavior and will be lost when the file is regenerated.
9
+ *
10
+ * Run `npx carson update workspace` to regenerate.
11
+ */
12
+
13
+ import '@testing-library/jest-dom/vitest';
@@ -0,0 +1,24 @@
1
+ ---
2
+ to: 'tests/tsconfig.json'
3
+ strategy: overwrite
4
+ ---
5
+ <%
6
+ let tsconfig = {
7
+ compilerOptions: {
8
+ ...TSCONFIG_COMPILER_OPTIONS,
9
+ composite: false,
10
+ noEmit: true,
11
+ },
12
+ include: ['./**/*'],
13
+ references: [{path: '..'}],
14
+ };
15
+ -%>
16
+ //
17
+ // DO NOT EDIT!
18
+ // This file was autogenerated by Carson.
19
+ // Changes may cause incorrect behavior and will be lost when the file is regenerated.
20
+ //
21
+ // Run `npx carson update workspace` to regenerate.
22
+ //
23
+
24
+ <%- JSON.stringify(tsconfig, null, 2) %>
@@ -0,0 +1,3 @@
1
+ ---
2
+ extends: '../library/tsconfig.json.ejs'
3
+ ---
@@ -0,0 +1,25 @@
1
+ ---
2
+ to: 'tsconfig.typecheck.json'
3
+ strategy: overwrite
4
+ ---
5
+ <%
6
+ let tsconfig = {
7
+ extends: './tsconfig.json',
8
+ compilerOptions: {
9
+ composite: false,
10
+ emitDeclarationOnly: false,
11
+ noEmit: true,
12
+ rootDir: '.',
13
+ },
14
+ include: ['./.storybook/**/*', `./${SOURCE_DIRECTORY}/**/*`, './stories/**/*', './tests/**/*', './*'],
15
+ };
16
+ -%>
17
+ //
18
+ // DO NOT EDIT!
19
+ // This file was autogenerated by Carson.
20
+ // Changes may cause incorrect behavior and will be lost when the file is regenerated.
21
+ //
22
+ // Run `npx carson update workspace` to regenerate.
23
+ //
24
+
25
+ <%- JSON.stringify(tsconfig, null, 2) %>
@@ -0,0 +1,3 @@
1
+ ---
2
+ extends: '../library/typedoc.config.cjs.ejs'
3
+ ---
@@ -0,0 +1,29 @@
1
+ ---
2
+ to: 'vite.config.ts'
3
+ strategy: overwrite
4
+ ---
5
+ /**
6
+ * DO NOT EDIT!
7
+ * This file was autogenerated by Carson.
8
+ * Changes may cause incorrect behavior and will be lost when the file is regenerated.
9
+ *
10
+ * Run `npx carson update workspace` to regenerate.
11
+ */
12
+
13
+ import _ from 'lodash';
14
+ import {defineConfig} from 'vitest/config';
15
+
16
+ export default defineConfig(
17
+ _.merge(
18
+ {
19
+ test: {
20
+ environment: 'happy-dom',
21
+ setupFiles: ['tests/setup.ts'],
22
+ coverage: {
23
+ include: ['<%- SOURCE_DIRECTORY %>/**'],
24
+ },
25
+ },
26
+ },
27
+ <%- JSON.stringify(project.config.overrides?.viteConfig ?? {}, null, 2) %>,
28
+ ),
29
+ );
@@ -2,6 +2,14 @@
2
2
  to: '.editorconfig'
3
3
  strategy: overwrite
4
4
  ---
5
+ #
6
+ # DO NOT EDIT!
7
+ # This file was autogenerated by Carson.
8
+ # Changes may cause incorrect behavior and will be lost when the file is regenerated.
9
+ #
10
+ # Run `npx carson update workspace` to regenerate.
11
+ #
12
+
5
13
  root = true
6
14
 
7
15
  [*]
@@ -1,4 +1 @@
1
- {
2
- "disallowMultiProjectWorkspace": false,
3
- "disallowSingleProjectWorkspace": false
4
- }
1
+ {}
@@ -1,13 +1,3 @@
1
1
  ---
2
- to: 'tests/setup.ts'
3
- strategy: overwrite
2
+ extends: '../../react-library/tests/setup.ts.ejs'
4
3
  ---
5
- /**
6
- * DO NOT EDIT!
7
- * This file was autogenerated by Carson.
8
- * Changes may cause incorrect behavior and will be lost when the file is regenerated.
9
- *
10
- * Run `npx carson update workspace` to regenerate.
11
- */
12
-
13
- import '@testing-library/jest-dom/vitest';
@@ -34,6 +34,9 @@ export default defineConfig(
34
34
  test: {
35
35
  environment: 'happy-dom',
36
36
  setupFiles: ['tests/setup.ts'],
37
+ coverage: {
38
+ include: ['app/**'],
39
+ },
37
40
  },
38
41
  },
39
42
  <%- JSON.stringify(project.config.overrides?.viteConfig ?? {}, null, 2) %>,
@@ -2,6 +2,14 @@
2
2
  to: '.editorconfig'
3
3
  strategy: overwrite
4
4
  ---
5
+ #
6
+ # DO NOT EDIT!
7
+ # This file was autogenerated by Carson.
8
+ # Changes may cause incorrect behavior and will be lost when the file is regenerated.
9
+ #
10
+ # Run `npx carson update workspace` to regenerate.
11
+ #
12
+
5
13
  root = true
6
14
 
7
15
  [*]
@@ -1,4 +1 @@
1
- {
2
- "disallowMultiProjectWorkspace": false,
3
- "disallowSingleProjectWorkspace": false
4
- }
1
+ {}
@@ -46,13 +46,13 @@ let turboConfig = {
46
46
  '.eslintrc.cjs',
47
47
  '.prettierignore',
48
48
  'prettier.config.js',
49
- 'tsconfig.options.json',
49
+ 'tsconfig.json',
50
50
  'tsconfig.typecheck.json',
51
51
  ],
52
52
  };
53
53
 
54
- if (workspace.projects.find((project) => project.name === '@jakubmazanec/eslint-config')) {
55
- turboConfig.pipeline.lint.dependsOn = ['@jakubmazanec/eslint-config#build', '^build', 'codegen'];
54
+ if (workspace.projects.find((project) => project.name === LINTER_CONFIG_PACKAGE_NAME)) {
55
+ turboConfig.pipeline.lint.dependsOn = [`${LINTER_CONFIG_PACKAGE_NAME}#build`, '^build', 'codegen'];
56
56
  }
57
57
  -%>
58
58
  <%- JSON.stringify(turboConfig, null, 2) %>