create-rslib 0.7.1 → 0.9.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.
Files changed (83) hide show
  1. package/dist/index.js +64 -5
  2. package/package.json +5 -5
  3. package/template-[node-dual]-[]-ts/package.json +1 -1
  4. package/template-[node-dual]-[vitest]-js/package.json +1 -1
  5. package/template-[node-dual]-[vitest]-ts/package.json +2 -2
  6. package/template-[node-esm]-[]-ts/package.json +1 -1
  7. package/template-[node-esm]-[vitest]-js/package.json +1 -1
  8. package/template-[node-esm]-[vitest]-ts/package.json +2 -2
  9. package/template-[react]-[]-ts/package.json +1 -1
  10. package/template-[react]-[storybook,vitest]-js/package.json +10 -10
  11. package/template-[react]-[storybook,vitest]-ts/package.json +11 -11
  12. package/template-[react]-[storybook]-js/package.json +9 -9
  13. package/template-[react]-[storybook]-ts/package.json +10 -10
  14. package/template-[react]-[vitest]-js/package.json +1 -1
  15. package/template-[react]-[vitest]-ts/package.json +2 -2
  16. package/template-[vue]-[]-js/package.json +27 -0
  17. package/template-[vue]-[]-js/rslib.config.ts +15 -0
  18. package/template-[vue]-[]-js/src/Button.vue +43 -0
  19. package/template-[vue]-[]-js/src/index.js +1 -0
  20. package/template-[vue]-[]-js/src/style.css +34 -0
  21. package/template-[vue]-[]-ts/package.json +29 -0
  22. package/template-[vue]-[]-ts/rslib.config.ts +15 -0
  23. package/template-[vue]-[]-ts/src/Button.vue +35 -0
  24. package/template-[vue]-[]-ts/src/index.ts +1 -0
  25. package/template-[vue]-[]-ts/src/style.css +34 -0
  26. package/template-[vue]-[]-ts/tsconfig.json +25 -0
  27. package/template-[vue]-[storybook,vitest]-js/.storybook/main.js +37 -0
  28. package/template-[vue]-[storybook,vitest]-js/.storybook/preview.js +12 -0
  29. package/template-[vue]-[storybook,vitest]-js/package.json +46 -0
  30. package/template-[vue]-[storybook,vitest]-js/rslib.config.ts +15 -0
  31. package/template-[vue]-[storybook,vitest]-js/src/Button.vue +43 -0
  32. package/template-[vue]-[storybook,vitest]-js/src/index.js +1 -0
  33. package/template-[vue]-[storybook,vitest]-js/src/style.css +34 -0
  34. package/template-[vue]-[storybook,vitest]-js/stories/Button.stories.js +50 -0
  35. package/template-[vue]-[storybook,vitest]-js/tests/index.test.js +16 -0
  36. package/template-[vue]-[storybook,vitest]-js/vitest.config.js +13 -0
  37. package/template-[vue]-[storybook,vitest]-js/vitest.setup.js +1 -0
  38. package/template-[vue]-[storybook,vitest]-ts/.storybook/main.ts +38 -0
  39. package/template-[vue]-[storybook,vitest]-ts/.storybook/preview.ts +12 -0
  40. package/template-[vue]-[storybook,vitest]-ts/package.json +48 -0
  41. package/template-[vue]-[storybook,vitest]-ts/rslib.config.ts +15 -0
  42. package/template-[vue]-[storybook,vitest]-ts/src/Button.vue +35 -0
  43. package/template-[vue]-[storybook,vitest]-ts/src/index.ts +1 -0
  44. package/template-[vue]-[storybook,vitest]-ts/src/style.css +34 -0
  45. package/template-[vue]-[storybook,vitest]-ts/stories/Button.stories.js +50 -0
  46. package/template-[vue]-[storybook,vitest]-ts/tests/index.test.ts +16 -0
  47. package/template-[vue]-[storybook,vitest]-ts/tsconfig.json +25 -0
  48. package/template-[vue]-[storybook,vitest]-ts/vitest.config.js +13 -0
  49. package/template-[vue]-[storybook,vitest]-ts/vitest.setup.js +1 -0
  50. package/template-[vue]-[storybook]-js/.storybook/main.js +37 -0
  51. package/template-[vue]-[storybook]-js/.storybook/preview.js +12 -0
  52. package/template-[vue]-[storybook]-js/package.json +40 -0
  53. package/template-[vue]-[storybook]-js/rslib.config.ts +15 -0
  54. package/template-[vue]-[storybook]-js/src/Button.vue +43 -0
  55. package/template-[vue]-[storybook]-js/src/index.js +1 -0
  56. package/template-[vue]-[storybook]-js/src/style.css +34 -0
  57. package/template-[vue]-[storybook]-js/stories/Button.stories.js +50 -0
  58. package/template-[vue]-[storybook]-ts/.storybook/main.ts +38 -0
  59. package/template-[vue]-[storybook]-ts/.storybook/preview.ts +12 -0
  60. package/template-[vue]-[storybook]-ts/package.json +42 -0
  61. package/template-[vue]-[storybook]-ts/rslib.config.ts +15 -0
  62. package/template-[vue]-[storybook]-ts/src/Button.vue +35 -0
  63. package/template-[vue]-[storybook]-ts/src/index.ts +1 -0
  64. package/template-[vue]-[storybook]-ts/src/style.css +34 -0
  65. package/template-[vue]-[storybook]-ts/stories/Button.stories.js +50 -0
  66. package/template-[vue]-[storybook]-ts/tsconfig.json +25 -0
  67. package/template-[vue]-[vitest]-js/package.json +33 -0
  68. package/template-[vue]-[vitest]-js/rslib.config.ts +15 -0
  69. package/template-[vue]-[vitest]-js/src/Button.vue +43 -0
  70. package/template-[vue]-[vitest]-js/src/index.js +1 -0
  71. package/template-[vue]-[vitest]-js/src/style.css +34 -0
  72. package/template-[vue]-[vitest]-js/tests/index.test.js +16 -0
  73. package/template-[vue]-[vitest]-js/vitest.config.js +13 -0
  74. package/template-[vue]-[vitest]-js/vitest.setup.js +1 -0
  75. package/template-[vue]-[vitest]-ts/package.json +35 -0
  76. package/template-[vue]-[vitest]-ts/rslib.config.ts +15 -0
  77. package/template-[vue]-[vitest]-ts/src/Button.vue +35 -0
  78. package/template-[vue]-[vitest]-ts/src/index.ts +1 -0
  79. package/template-[vue]-[vitest]-ts/src/style.css +34 -0
  80. package/template-[vue]-[vitest]-ts/tests/index.test.ts +16 -0
  81. package/template-[vue]-[vitest]-ts/tsconfig.json +25 -0
  82. package/template-[vue]-[vitest]-ts/vitest.config.js +13 -0
  83. package/template-[vue]-[vitest]-ts/vitest.setup.js +1 -0
@@ -0,0 +1,34 @@
1
+ .demo-button {
2
+ font-weight: 700;
3
+ border: 0;
4
+ border-radius: 3em;
5
+ cursor: pointer;
6
+ display: inline-block;
7
+ line-height: 1;
8
+ }
9
+
10
+ .demo-button--primary {
11
+ color: white;
12
+ background-color: #1ea7fd;
13
+ }
14
+
15
+ .demo-button--secondary {
16
+ color: #333;
17
+ background-color: transparent;
18
+ box-shadow: rgba(0, 0, 0, 0.15) 0px 0px 0px 1px inset;
19
+ }
20
+
21
+ .demo-button--small {
22
+ font-size: 12px;
23
+ padding: 10px 16px;
24
+ }
25
+
26
+ .demo-button--medium {
27
+ font-size: 14px;
28
+ padding: 11px 20px;
29
+ }
30
+
31
+ .demo-button--large {
32
+ font-size: 16px;
33
+ padding: 12px 24px;
34
+ }
@@ -0,0 +1,16 @@
1
+ import { render, screen } from '@testing-library/vue';
2
+ import { expect, test } from 'vitest';
3
+ import Button from '../src/Button.vue';
4
+
5
+ test('The button should have correct background color', async () => {
6
+ render(Button, {
7
+ props: {
8
+ backgroundColor: '#ccc',
9
+ label: 'Demo Button',
10
+ },
11
+ });
12
+ const button = screen.getByText('Demo Button');
13
+ expect(button).toHaveStyle({
14
+ backgroundColor: '#ccc',
15
+ });
16
+ });
@@ -0,0 +1,25 @@
1
+ {
2
+ "compilerOptions": {
3
+ "lib": ["DOM", "ES2020"],
4
+ "jsx": "preserve",
5
+ "target": "ES2020",
6
+ "skipLibCheck": true,
7
+ "jsxImportSource": "vue",
8
+ "useDefineForClassFields": true,
9
+ "declaration": true,
10
+ "outDir": "dist",
11
+ "emitDeclarationOnly": true,
12
+
13
+ /* modules */
14
+ "module": "ESNext",
15
+ "isolatedModules": true,
16
+ "resolveJsonModule": true,
17
+ "moduleResolution": "bundler",
18
+
19
+ /* type checking */
20
+ "strict": true,
21
+ "noUnusedLocals": true,
22
+ "noUnusedParameters": true
23
+ },
24
+ "include": ["src"]
25
+ }
@@ -0,0 +1,13 @@
1
+ /// <reference types="vitest/config" />
2
+
3
+ import pluginVue from '@vitejs/plugin-vue';
4
+ import { defineConfig } from 'vitest/config';
5
+
6
+ export default defineConfig({
7
+ // Configure Vitest (https://vitest.dev/config/)
8
+ test: {
9
+ environment: 'jsdom',
10
+ setupFiles: './vitest.setup.js',
11
+ },
12
+ plugins: [pluginVue()],
13
+ });
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom/vitest';