vyriy 0.5.1 → 0.5.2

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.
@@ -1,76 +1,75 @@
1
1
  import packageJson from '../../../package.json' with { type: 'json' };
2
2
  import { base } from './base.js';
3
- export const gql = {
4
- files: (options) => ({
5
- ...base.files(options),
6
- 'package.json': JSON.stringify({
7
- name: options.name,
8
- version: '0.0.0',
9
- description: options.description,
10
- private: true,
11
- type: 'module',
12
- agents: './AGENTS.md',
13
- packageManager: packageJson.packageManager,
14
- engines: {
15
- node: packageJson.engines.node,
16
- },
17
- workspaces: [
18
- 'packages/*',
19
- 'workspaces/*',
20
- ],
21
- scripts: {
22
- storybook: 'cross-env STORYBOOK_DISABLE_TELEMETRY=1 storybook dev -p 6006 --disable-telemetry',
23
- check: 'run-s lint build test',
24
- fix: "run-s 'fix:*'",
25
- start: "run-p 'start:*'",
26
- lint: "run-s 'lint:*'",
27
- build: "run-s 'build:*'",
28
- test: "run-s 'test:*'",
29
- 'fix:prettier': 'prettier . --write',
30
- 'fix:eslint': 'eslint . --fix',
31
- 'start:graphql': 'sh workspaces/graphql/bin/start.sh',
32
- 'lint:ts': 'tsc',
33
- 'lint:prettier': 'prettier . --check',
34
- 'lint:eslint': 'eslint .',
35
- 'build:graphql': 'rimraf dist && sh workspaces/graphql/bin/build.sh',
36
- 'build:storybook': 'cross-env STORYBOOK_DISABLE_TELEMETRY=1 storybook build --quiet --disable-telemetry',
37
- 'test:jest': 'jest',
38
- postinstall: 'husky',
39
- },
40
- dependencies: {
41
- '@vyriy/typescript-config': `^${packageJson.version}`,
42
- typescript: packageJson.peerDependencies.typescript,
43
- '@vyriy/prettier-config': `^${packageJson.version}`,
44
- prettier: packageJson.peerDependencies.prettier,
45
- '@vyriy/eslint-config': `^${packageJson.version}`,
46
- eslint: packageJson.peerDependencies.eslint,
47
- '@vyriy/jest-config': `^${packageJson.version}`,
48
- jest: packageJson.peerDependencies.jest,
49
- '@vyriy/storybook-config': `^${packageJson.version}`,
50
- storybook: packageJson.peerDependencies.storybook,
51
- '@vyriy/path': `^${packageJson.version}`,
52
- husky: packageJson.peerDependencies.husky,
53
- 'npm-run-all2': packageJson.peerDependencies['npm-run-all2'],
54
- 'cross-env': packageJson.peerDependencies['cross-env'],
55
- rimraf: packageJson.peerDependencies.rimraf,
56
- '@vyriy/webpack-config': `^${packageJson.version}`,
57
- '@vyriy/handler': `^${packageJson.version}`,
58
- '@vyriy/server': `^${packageJson.version}`,
59
- '@vyriy/router': `^${packageJson.version}`,
60
- tsx: packageJson.peerDependencies.tsx,
61
- 'webpack-cli': packageJson.peerDependencies['webpack-cli'],
62
- graphql: packageJson.peerDependencies.graphql,
63
- '@vyriy/html': `^${packageJson.version}`,
64
- },
65
- }, null, 2) + '\n',
66
- 'packages/graphql/doc.mdx': `import { Meta, Markdown } from '@storybook/addon-docs/blocks';
3
+ export const gql = (options) => ({
4
+ ...base(options),
5
+ 'package.json': JSON.stringify({
6
+ name: options.name,
7
+ version: '0.0.0',
8
+ description: options.description,
9
+ private: true,
10
+ type: 'module',
11
+ agents: './AGENTS.md',
12
+ packageManager: packageJson.packageManager,
13
+ engines: {
14
+ node: packageJson.engines.node,
15
+ },
16
+ workspaces: [
17
+ 'packages/*',
18
+ 'workspaces/*',
19
+ ],
20
+ scripts: {
21
+ storybook: 'cross-env STORYBOOK_DISABLE_TELEMETRY=1 storybook dev -p 6006 --disable-telemetry',
22
+ check: 'run-s lint build test',
23
+ fix: "run-s 'fix:*'",
24
+ start: "run-p 'start:*'",
25
+ lint: "run-s 'lint:*'",
26
+ build: "run-s 'build:*'",
27
+ test: "run-s 'test:*'",
28
+ 'fix:prettier': 'prettier . --write',
29
+ 'fix:eslint': 'eslint . --fix',
30
+ 'start:graphql': 'sh workspaces/graphql/bin/start.sh',
31
+ 'lint:ts': 'tsc',
32
+ 'lint:prettier': 'prettier . --check',
33
+ 'lint:eslint': 'eslint .',
34
+ 'build:graphql': 'rimraf dist && sh workspaces/graphql/bin/build.sh',
35
+ 'build:storybook': 'cross-env STORYBOOK_DISABLE_TELEMETRY=1 storybook build --quiet --disable-telemetry',
36
+ 'test:jest': 'jest',
37
+ postinstall: 'husky',
38
+ },
39
+ dependencies: {
40
+ '@vyriy/typescript-config': `^${packageJson.version}`,
41
+ typescript: packageJson.peerDependencies.typescript,
42
+ '@vyriy/prettier-config': `^${packageJson.version}`,
43
+ prettier: packageJson.peerDependencies.prettier,
44
+ '@vyriy/eslint-config': `^${packageJson.version}`,
45
+ eslint: packageJson.peerDependencies.eslint,
46
+ '@vyriy/jest-config': `^${packageJson.version}`,
47
+ jest: packageJson.peerDependencies.jest,
48
+ '@vyriy/storybook-config': `^${packageJson.version}`,
49
+ storybook: packageJson.peerDependencies.storybook,
50
+ '@vyriy/path': `^${packageJson.version}`,
51
+ husky: packageJson.peerDependencies.husky,
52
+ 'npm-run-all2': packageJson.peerDependencies['npm-run-all2'],
53
+ 'cross-env': packageJson.peerDependencies['cross-env'],
54
+ rimraf: packageJson.peerDependencies.rimraf,
55
+ '@vyriy/webpack-config': `^${packageJson.version}`,
56
+ '@vyriy/handler': `^${packageJson.version}`,
57
+ '@vyriy/server': `^${packageJson.version}`,
58
+ '@vyriy/router': `^${packageJson.version}`,
59
+ tsx: packageJson.peerDependencies.tsx,
60
+ 'webpack-cli': packageJson.peerDependencies['webpack-cli'],
61
+ graphql: packageJson.peerDependencies.graphql,
62
+ '@vyriy/html': `^${packageJson.version}`,
63
+ },
64
+ }, null, 2) + '\n',
65
+ 'packages/graphql/doc.mdx': `import { Meta, Markdown } from '@storybook/addon-docs/blocks';
67
66
  import ReadMe from './README.md?raw';
68
67
 
69
68
  <Meta title="Packages/GraphQL" />
70
69
 
71
70
  <Markdown>{ReadMe}</Markdown>
72
71
  `,
73
- 'packages/graphql/graphiql.test.ts': `import { describe, expect, it } from '@jest/globals';
72
+ 'packages/graphql/graphiql.test.ts': `import { describe, expect, it } from '@jest/globals';
74
73
 
75
74
  import { graphiql } from './graphiql.js';
76
75
 
@@ -92,7 +91,7 @@ describe('packages/graphql/graphiql.ts', () => {
92
91
  });
93
92
  });
94
93
  `,
95
- 'packages/graphql/graphiql.ts': `import { html, minify } from '@vyriy/html';
94
+ 'packages/graphql/graphiql.ts': `import { html, minify } from '@vyriy/html';
96
95
 
97
96
  export const graphiql = () =>
98
97
  minify(
@@ -189,7 +188,7 @@ export const graphiql = () =>
189
188
  }),
190
189
  );
191
190
  `,
192
- 'packages/graphql/index.test.ts': `import { describe, expect, it } from '@jest/globals';
191
+ 'packages/graphql/index.test.ts': `import { describe, expect, it } from '@jest/globals';
193
192
 
194
193
  import { router } from './router.js';
195
194
 
@@ -201,14 +200,14 @@ describe('packages/graphql/index.ts', () => {
201
200
  });
202
201
  });
203
202
  `,
204
- 'packages/graphql/index.ts': "export * from './router.js';\n",
205
- 'packages/graphql/package.json': `{
203
+ 'packages/graphql/index.ts': "export * from './router.js';\n",
204
+ 'packages/graphql/package.json': `{
206
205
  "name": "@p/graphql",
207
206
  "type": "module",
208
207
  "private": true
209
208
  }
210
209
  `,
211
- 'packages/graphql/README.md': `# @p/graphql
210
+ 'packages/graphql/README.md': `# @p/graphql
212
211
 
213
212
  Reusable GraphQL API package for the application.
214
213
 
@@ -252,7 +251,7 @@ mutation Ping($message: String) {
252
251
  }
253
252
  \`\`\`
254
253
  `,
255
- 'packages/graphql/router.test.ts': `import { describe, expect, it } from '@jest/globals';
254
+ 'packages/graphql/router.test.ts': `import { describe, expect, it } from '@jest/globals';
256
255
  import type { APIGatewayProxyEvent, APIGatewayProxyResult } from '@vyriy/router';
257
256
 
258
257
  import { router } from './router.js';
@@ -390,7 +389,7 @@ describe('packages/graphql/router.ts', () => {
390
389
  });
391
390
  });
392
391
  `,
393
- 'packages/graphql/router.ts': `import { createRouter } from '@vyriy/router';
392
+ 'packages/graphql/router.ts': `import { createRouter } from '@vyriy/router';
394
393
 
395
394
  import { graphql } from 'graphql';
396
395
 
@@ -458,7 +457,7 @@ router.post('/', async (params) => {
458
457
  };
459
458
  });
460
459
  `,
461
- 'packages/graphql/schema.test.ts': `import { describe, expect, it } from '@jest/globals';
460
+ 'packages/graphql/schema.test.ts': `import { describe, expect, it } from '@jest/globals';
462
461
  import { graphql } from 'graphql';
463
462
 
464
463
  import { schema } from './schema.js';
@@ -498,7 +497,7 @@ describe('packages/graphql/schema.ts', () => {
498
497
  });
499
498
  });
500
499
  `,
501
- 'packages/graphql/schema.ts': `import { GraphQLSchema, GraphQLObjectType, GraphQLString, GraphQLBoolean } from 'graphql';
500
+ 'packages/graphql/schema.ts': `import { GraphQLSchema, GraphQLObjectType, GraphQLString, GraphQLBoolean } from 'graphql';
502
501
 
503
502
  const TestType = new GraphQLObjectType({
504
503
  name: 'Test',
@@ -552,7 +551,7 @@ export const schema = new GraphQLSchema({
552
551
  mutation: MutationType,
553
552
  });
554
553
  `,
555
- 'workspaces/graphql/bin/build.sh': `#!/usr/bin/env sh
554
+ 'workspaces/graphql/bin/build.sh': `#!/usr/bin/env sh
556
555
 
557
556
  set -e
558
557
 
@@ -565,7 +564,7 @@ cp $scriptdir/package.json $distdir/package.json
565
564
  npm pkg delete "type" --prefix $distdir
566
565
  npm pkg delete "private" --prefix $distdir
567
566
  `,
568
- 'workspaces/graphql/bin/start.sh': `#!/usr/bin/env sh
567
+ 'workspaces/graphql/bin/start.sh': `#!/usr/bin/env sh
569
568
 
570
569
  set -e
571
570
 
@@ -573,14 +572,14 @@ scriptdir="$PWD/workspaces/graphql";
573
572
 
574
573
  NODE_ENV=production LOG_LEVEL=info tsx $scriptdir/index.ts
575
574
  `,
576
- 'workspaces/graphql/doc.mdx': `import { Meta, Markdown } from '@storybook/addon-docs/blocks';
575
+ 'workspaces/graphql/doc.mdx': `import { Meta, Markdown } from '@storybook/addon-docs/blocks';
577
576
  import ReadMe from './README.md?raw';
578
577
 
579
578
  <Meta title="Workspaces/Graphql" />
580
579
 
581
580
  <Markdown>{ReadMe}</Markdown>
582
581
  `,
583
- 'workspaces/graphql/index.test.ts': `import { describe, expect, it, jest } from '@jest/globals';
582
+ 'workspaces/graphql/index.test.ts': `import { describe, expect, it, jest } from '@jest/globals';
584
583
  import type { APIGatewayProxyEvent } from '@vyriy/router';
585
584
 
586
585
  const apiMock = jest.fn((handler) => ({
@@ -670,20 +669,20 @@ describe('workspaces/graphql/index.ts', () => {
670
669
  });
671
670
  });
672
671
  `,
673
- 'workspaces/graphql/index.ts': `import { server } from '@vyriy/server';
672
+ 'workspaces/graphql/index.ts': `import { server } from '@vyriy/server';
674
673
  import { api } from '@vyriy/handler';
675
674
 
676
675
  import { router } from '@p/graphql';
677
676
 
678
677
  server(api(async (event) => router.route(event)));
679
678
  `,
680
- 'workspaces/graphql/package.json': `{
679
+ 'workspaces/graphql/package.json': `{
681
680
  "name": "@w/graphql",
682
681
  "type": "module",
683
682
  "private": true
684
683
  }
685
684
  `,
686
- 'workspaces/graphql/README.md': `# @w/graphql
685
+ 'workspaces/graphql/README.md': `# @w/graphql
687
686
 
688
687
  GraphQL runtime workspace for the application.
689
688
 
@@ -726,7 +725,7 @@ The workspace entrypoint is \`index.ts\`. It wraps the shared router with \`api(
726
725
  server(api(async (event) => router.route(event)));
727
726
  \`\`\`
728
727
  `,
729
- 'workspaces/graphql/webpack.config.ts': `import { path } from '@vyriy/path';
728
+ 'workspaces/graphql/webpack.config.ts': `import { path } from '@vyriy/path';
730
729
  import { ssr, external } from '@vyriy/webpack-config';
731
730
 
732
731
  export default ssr(
@@ -742,9 +741,4 @@ export default ssr(
742
741
  }),
743
742
  );
744
743
  `,
745
- }),
746
- ci: {
747
- ...base.ci,
748
- },
749
- deploy: {},
750
- };
744
+ });
@@ -44,4 +44,9 @@ export declare const presets: {
44
44
  description: string;
45
45
  preset: import("./types.js").Preset;
46
46
  };
47
+ fullstack: {
48
+ name: string;
49
+ description: string;
50
+ preset: import("./types.js").Preset;
51
+ };
47
52
  };
@@ -7,6 +7,7 @@ import { spa } from './spa.js';
7
7
  import { rest } from './rest.js';
8
8
  import { gql } from './gql.js';
9
9
  import { mfe } from './mfe.js';
10
+ import { fullstack } from './fullstack.js';
10
11
  export const presets = {
11
12
  base: {
12
13
  name: 'Base',
@@ -53,4 +54,9 @@ export const presets = {
53
54
  description: 'Preset for Micro Frontend',
54
55
  preset: mfe,
55
56
  },
57
+ fullstack: {
58
+ name: 'Fullstack',
59
+ description: 'Preset for fullstack React application',
60
+ preset: fullstack,
61
+ },
56
62
  };
@@ -1,121 +1,120 @@
1
1
  import packageJson from '../../../package.json' with { type: 'json' };
2
2
  import { base } from './base.js';
3
3
  import { stylelintConfigFile } from './shared.js';
4
- export const library = {
5
- files: (options) => {
6
- const packageScope = options.scope ?? `@${options.name}`;
7
- const packageName = `${packageScope}/${options.name}`;
8
- return {
9
- ...base.files(options),
10
- 'package.json': JSON.stringify({
11
- name: options.name,
12
- version: '0.0.0',
13
- description: options.description,
14
- private: true,
15
- type: 'module',
16
- agents: './AGENTS.md',
17
- packageManager: packageJson.packageManager,
18
- engines: {
19
- node: packageJson.engines.node,
20
- },
21
- workspaces: [
22
- 'packages/*',
23
- ],
24
- license: 'MIT',
25
- repository: {
26
- type: 'git',
27
- url: `https://github.com/${options.name}/${options.name}`,
28
- },
29
- scripts: {
30
- storybook: 'cross-env STORYBOOK_DISABLE_TELEMETRY=1 storybook dev -p 6006 --disable-telemetry',
31
- check: 'run-s lint build test',
32
- fix: "run-s 'fix:*'",
33
- lint: "run-s 'lint:*'",
34
- build: "run-s 'build:*'",
35
- test: "run-s 'test:*'",
36
- 'fix:prettier': 'prettier . --write',
37
- 'fix:eslint': 'eslint . --fix',
38
- 'fix:stylelint': 'stylelint "**/*.{css,scss}" --fix',
39
- 'lint:ts': 'tsc',
40
- 'lint:prettier': 'prettier . --check',
41
- 'lint:eslint': 'eslint .',
42
- 'lint:stylelint': 'stylelint "**/*.{css,scss}"',
43
- 'build:dist': 'rimraf dist && tsc -p tsconfig.build.json && vyriy -d',
44
- 'build:storybook': 'cross-env STORYBOOK_DISABLE_TELEMETRY=1 storybook build --quiet --disable-telemetry',
45
- 'test:jest': 'jest',
46
- postinstall: 'husky',
47
- },
48
- dependencies: {
49
- '@vyriy/typescript-config': `^${packageJson.version}`,
50
- typescript: packageJson.peerDependencies.typescript,
51
- '@vyriy/prettier-config': `^${packageJson.version}`,
52
- prettier: packageJson.peerDependencies.prettier,
53
- '@vyriy/eslint-config': `^${packageJson.version}`,
54
- eslint: packageJson.peerDependencies.eslint,
55
- '@vyriy/jest-config': `^${packageJson.version}`,
56
- jest: packageJson.peerDependencies.jest,
57
- '@vyriy/storybook-config': `^${packageJson.version}`,
58
- storybook: packageJson.peerDependencies.storybook,
59
- '@vyriy/path': `^${packageJson.version}`,
60
- vyriy: `^${packageJson.version}`,
61
- husky: packageJson.peerDependencies.husky,
62
- 'npm-run-all2': packageJson.peerDependencies['npm-run-all2'],
63
- 'cross-env': packageJson.peerDependencies['cross-env'],
64
- react: packageJson.peerDependencies.react,
65
- 'react-dom': packageJson.peerDependencies['react-dom'],
66
- '@types/react': packageJson.peerDependencies['@types/react'],
67
- '@types/react-dom': packageJson.peerDependencies['@types/react-dom'],
68
- '@vyriy/stylelint-config': `^${packageJson.version}`,
69
- stylelint: packageJson.peerDependencies.stylelint,
70
- rimraf: packageJson.peerDependencies.rimraf,
71
- },
72
- }, null, 2) + '\n',
73
- 'tsconfig.build.json': JSON.stringify({
74
- extends: './tsconfig.json',
75
- include: [
76
- 'packages/**/*.ts',
77
- 'packages/**/*.tsx',
78
- 'packages/**/*.json',
79
- ],
80
- exclude: [
81
- '**/*.test.ts',
82
- '**/*.test.tsx',
83
- '**/*.stories.ts',
84
- '**/*.stories.tsx',
85
- ],
86
- compilerOptions: {
87
- rootDir: './packages',
88
- outDir: './dist',
89
- noEmit: false,
90
- declaration: true,
91
- allowImportingTsExtensions: false,
92
- },
93
- }, null, 2) + '\n',
94
- ...stylelintConfigFile(),
95
- [`packages/${options.name}/package.json`]: JSON.stringify({
96
- name: packageName,
97
- version: '0.0.0',
98
- description: options.description,
99
- private: true,
100
- type: 'module',
101
- main: 'index.js',
102
- dependencies: {
103
- '@vyriy/cn': `^${packageJson.version}`,
104
- },
105
- peerDependencies: {
106
- react: packageJson.peerDependencies.react,
107
- },
108
- }, null, 2) + '\n',
109
- [`packages/${options.name}/README.md`]: `# ${packageName}\n\n${options.description}\n`,
110
- [`packages/${options.name}/doc.mdx`]: `import { Meta, Markdown } from '@storybook/addon-docs/blocks';
4
+ export const library = (options) => {
5
+ const packageScope = options.scope ?? `@${options.name}`;
6
+ const packageName = `${packageScope}/${options.name}`;
7
+ return {
8
+ ...base(options),
9
+ 'package.json': JSON.stringify({
10
+ name: options.name,
11
+ version: '0.0.0',
12
+ description: options.description,
13
+ private: true,
14
+ type: 'module',
15
+ agents: './AGENTS.md',
16
+ packageManager: packageJson.packageManager,
17
+ engines: {
18
+ node: packageJson.engines.node,
19
+ },
20
+ workspaces: [
21
+ 'packages/*',
22
+ ],
23
+ license: 'MIT',
24
+ repository: {
25
+ type: 'git',
26
+ url: `https://github.com/${options.name}/${options.name}`,
27
+ },
28
+ scripts: {
29
+ storybook: 'cross-env STORYBOOK_DISABLE_TELEMETRY=1 storybook dev -p 6006 --disable-telemetry',
30
+ check: 'run-s lint build test',
31
+ fix: "run-s 'fix:*'",
32
+ lint: "run-s 'lint:*'",
33
+ build: "run-s 'build:*'",
34
+ test: "run-s 'test:*'",
35
+ 'fix:prettier': 'prettier . --write',
36
+ 'fix:eslint': 'eslint . --fix',
37
+ 'fix:stylelint': 'stylelint "**/*.{css,scss}" --fix',
38
+ 'lint:ts': 'tsc',
39
+ 'lint:prettier': 'prettier . --check',
40
+ 'lint:eslint': 'eslint .',
41
+ 'lint:stylelint': 'stylelint "**/*.{css,scss}"',
42
+ 'build:dist': 'rimraf dist && tsc -p tsconfig.build.json && vyriy -d',
43
+ 'build:storybook': 'cross-env STORYBOOK_DISABLE_TELEMETRY=1 storybook build --quiet --disable-telemetry',
44
+ 'test:jest': 'jest',
45
+ postinstall: 'husky',
46
+ },
47
+ dependencies: {
48
+ '@vyriy/typescript-config': `^${packageJson.version}`,
49
+ typescript: packageJson.peerDependencies.typescript,
50
+ '@vyriy/prettier-config': `^${packageJson.version}`,
51
+ prettier: packageJson.peerDependencies.prettier,
52
+ '@vyriy/eslint-config': `^${packageJson.version}`,
53
+ eslint: packageJson.peerDependencies.eslint,
54
+ '@vyriy/jest-config': `^${packageJson.version}`,
55
+ jest: packageJson.peerDependencies.jest,
56
+ '@vyriy/storybook-config': `^${packageJson.version}`,
57
+ storybook: packageJson.peerDependencies.storybook,
58
+ '@vyriy/path': `^${packageJson.version}`,
59
+ vyriy: `^${packageJson.version}`,
60
+ husky: packageJson.peerDependencies.husky,
61
+ 'npm-run-all2': packageJson.peerDependencies['npm-run-all2'],
62
+ 'cross-env': packageJson.peerDependencies['cross-env'],
63
+ react: packageJson.peerDependencies.react,
64
+ 'react-dom': packageJson.peerDependencies['react-dom'],
65
+ '@types/react': packageJson.peerDependencies['@types/react'],
66
+ '@types/react-dom': packageJson.peerDependencies['@types/react-dom'],
67
+ '@vyriy/stylelint-config': `^${packageJson.version}`,
68
+ stylelint: packageJson.peerDependencies.stylelint,
69
+ rimraf: packageJson.peerDependencies.rimraf,
70
+ },
71
+ }, null, 2) + '\n',
72
+ 'tsconfig.build.json': JSON.stringify({
73
+ extends: './tsconfig.json',
74
+ include: [
75
+ 'packages/**/*.ts',
76
+ 'packages/**/*.tsx',
77
+ 'packages/**/*.json',
78
+ ],
79
+ exclude: [
80
+ '**/*.test.ts',
81
+ '**/*.test.tsx',
82
+ '**/*.stories.ts',
83
+ '**/*.stories.tsx',
84
+ ],
85
+ compilerOptions: {
86
+ rootDir: './packages',
87
+ outDir: './dist',
88
+ noEmit: false,
89
+ declaration: true,
90
+ allowImportingTsExtensions: false,
91
+ },
92
+ }, null, 2) + '\n',
93
+ ...stylelintConfigFile(),
94
+ [`packages/${options.name}/package.json`]: JSON.stringify({
95
+ name: packageName,
96
+ version: '0.0.0',
97
+ description: options.description,
98
+ private: true,
99
+ type: 'module',
100
+ main: 'index.js',
101
+ dependencies: {
102
+ '@vyriy/cn': `^${packageJson.version}`,
103
+ },
104
+ peerDependencies: {
105
+ react: packageJson.peerDependencies.react,
106
+ },
107
+ }, null, 2) + '\n',
108
+ [`packages/${options.name}/README.md`]: `# ${packageName}\n\n${options.description}\n`,
109
+ [`packages/${options.name}/doc.mdx`]: `import { Meta, Markdown } from '@storybook/addon-docs/blocks';
111
110
  import ReadMe from './README.md?raw';
112
111
 
113
112
  <Meta title="UI/Button" />
114
113
 
115
114
  <Markdown>{ReadMe}</Markdown>
116
115
  `,
117
- [`packages/${options.name}/index.ts`]: "export * from './button.js';\nexport type * from './types.js';\n",
118
- [`packages/${options.name}/types.ts`]: `import type { ComponentProps, FC } from 'react';
116
+ [`packages/${options.name}/index.ts`]: "export * from './button.js';\nexport type * from './types.js';\n",
117
+ [`packages/${options.name}/types.ts`]: `import type { ComponentProps, FC } from 'react';
119
118
 
120
119
  export type ButtonProps = ComponentProps<'button'> & {
121
120
  readonly variant?: 'primary' | 'secondary';
@@ -123,7 +122,7 @@ export type ButtonProps = ComponentProps<'button'> & {
123
122
 
124
123
  export type ButtonType = FC<ButtonProps>;
125
124
  `,
126
- [`packages/${options.name}/button.tsx`]: `import { cn } from '@vyriy/cn';
125
+ [`packages/${options.name}/button.tsx`]: `import { cn } from '@vyriy/cn';
127
126
 
128
127
  import type { ButtonType } from './types.js';
129
128
 
@@ -133,7 +132,7 @@ export const Button: ButtonType = ({ className, variant = 'primary', ...props })
133
132
  <button type="button" className={cn('button', \`button--\${variant}\`, className)} {...props} />
134
133
  );
135
134
  `,
136
- [`packages/${options.name}/index.test.ts`]: `import { describe, expect, it } from '@jest/globals';
135
+ [`packages/${options.name}/index.test.ts`]: `import { describe, expect, it } from '@jest/globals';
137
136
 
138
137
  import { Button } from './button.js';
139
138
  import { Button as PublicButton } from './index.js';
@@ -144,7 +143,7 @@ describe('ui entry point', () => {
144
143
  });
145
144
  });
146
145
  `,
147
- [`packages/${options.name}/button.scss`]: `.button {
146
+ [`packages/${options.name}/button.scss`]: `.button {
148
147
  border: 1px solid transparent;
149
148
  border-radius: 6px;
150
149
  cursor: pointer;
@@ -163,8 +162,8 @@ describe('ui entry point', () => {
163
162
  color: #24292f;
164
163
  }
165
164
  `,
166
- [`packages/${options.name}/styles.d.ts`]: "declare module '*.scss';\n",
167
- [`packages/${options.name}/button.stories.tsx`]: `import type { Meta, StoryObj } from '@storybook/react-webpack5';
165
+ [`packages/${options.name}/styles.d.ts`]: "declare module '*.scss';\n",
166
+ [`packages/${options.name}/button.stories.tsx`]: `import type { Meta, StoryObj } from '@storybook/react-webpack5';
168
167
 
169
168
  import { Button } from './button.js';
170
169
 
@@ -213,7 +212,7 @@ export const Secondary: Story = {
213
212
  },
214
213
  };
215
214
  `,
216
- [`packages/${options.name}/button.test.tsx`]: `import type { ReactElement } from 'react';
215
+ [`packages/${options.name}/button.test.tsx`]: `import type { ReactElement } from 'react';
217
216
  import { describe, expect, it } from '@jest/globals';
218
217
 
219
218
  import { Button } from './button.js';
@@ -244,10 +243,5 @@ describe('Button', () => {
244
243
  });
245
244
  });
246
245
  `,
247
- };
248
- },
249
- ci: {
250
- ...base.ci,
251
- },
252
- deploy: {},
246
+ };
253
247
  };