├── .nvmrc
├── .prettierrc.json
├── test.setup.ts
├── packages
├── vite-body
│ ├── src
│ │ ├── index.ts
│ │ ├── vite-env.d.ts
│ │ ├── components
│ │ │ ├── index.ts
│ │ │ └── Body
│ │ │ │ ├── __snapshots__
│ │ │ │ └── Body.test.tsx.snap
│ │ │ │ ├── index.tsx
│ │ │ │ ├── Body.test.tsx
│ │ │ │ └── Body.stories.tsx
│ │ └── assets
│ │ │ └── colors.svg
│ ├── .storybook
│ │ ├── preview-head.html
│ │ ├── preview.ts
│ │ └── main.ts
│ ├── vite.config.ts
│ ├── tsconfig.json
│ └── package.json
├── vite-common
│ ├── src
│ │ ├── index.ts
│ │ ├── vite-env.d.ts
│ │ ├── components
│ │ │ ├── index.ts
│ │ │ ├── Button
│ │ │ │ ├── styles.module.scss
│ │ │ │ ├── index.tsx
│ │ │ │ └── Button.stories.tsx
│ │ │ └── Links
│ │ │ │ ├── styles.module.scss
│ │ │ │ ├── index.tsx
│ │ │ │ └── Links.stories.tsx
│ │ ├── helpers
│ │ │ └── checkMessage
│ │ │ │ ├── index.ts
│ │ │ │ └── checkMessage.test.ts
│ │ └── assets
│ │ │ └── repo.svg
│ ├── .storybook
│ │ ├── preview-head.html
│ │ ├── preview.ts
│ │ └── main.ts
│ ├── tsconfig.json
│ ├── vite.config.ts
│ └── package.json
├── vite-footer
│ ├── src
│ │ ├── index.ts
│ │ ├── vite-env.d.ts
│ │ ├── components
│ │ │ ├── index.ts
│ │ │ └── Footer
│ │ │ │ ├── index.tsx
│ │ │ │ └── Footer.stories.tsx
│ │ └── assets
│ │ │ └── flow.svg
│ ├── .storybook
│ │ ├── preview-head.html
│ │ ├── preview.ts
│ │ └── main.ts
│ ├── vite.config.ts
│ ├── tsconfig.json
│ └── package.json
└── vite-header
│ ├── src
│ ├── index.ts
│ ├── vite-env.d.ts
│ ├── components
│ │ ├── index.ts
│ │ └── Header
│ │ │ ├── styles.module.scss
│ │ │ ├── index.tsx
│ │ │ └── Header.stories.tsx
│ └── assets
│ │ └── direction.svg
│ ├── .storybook
│ ├── preview-head.html
│ ├── preview.ts
│ └── main.ts
│ ├── vite.config.ts
│ ├── tsconfig.json
│ └── package.json
├── .storybook
├── preview-head.html
├── preview.ts
└── main.ts
├── .prettierignore
├── lerna.json
├── babel.config.json
├── tsconfig.node.json
├── .eslintrc.cjs
├── .gitignore
├── vite.config.ts
├── README.md
├── tsconfig.json
├── jest.config.ts
└── package.json
/.nvmrc:
--------------------------------------------------------------------------------
1 | v18.13.0
2 |
--------------------------------------------------------------------------------
/.prettierrc.json:
--------------------------------------------------------------------------------
1 | {}
2 |
--------------------------------------------------------------------------------
/test.setup.ts:
--------------------------------------------------------------------------------
1 | import "@testing-library/jest-dom/extend-expect";
--------------------------------------------------------------------------------
/packages/vite-body/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./components";
2 |
--------------------------------------------------------------------------------
/packages/vite-common/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./components";
2 |
--------------------------------------------------------------------------------
/packages/vite-footer/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./components";
2 |
--------------------------------------------------------------------------------
/packages/vite-header/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./components";
2 |
--------------------------------------------------------------------------------
/packages/vite-body/src/vite-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/.storybook/preview-head.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/vite-common/src/vite-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/packages/vite-footer/src/vite-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/packages/vite-header/src/vite-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/packages/vite-body/src/components/index.ts:
--------------------------------------------------------------------------------
1 | export { default as Body } from "./Body";
2 |
--------------------------------------------------------------------------------
/packages/vite-footer/src/components/index.ts:
--------------------------------------------------------------------------------
1 | export { default as Footer } from "././Footer";
2 |
--------------------------------------------------------------------------------
/packages/vite-header/src/components/index.ts:
--------------------------------------------------------------------------------
1 | export { default as Header } from "./Header";
2 |
--------------------------------------------------------------------------------
/packages/vite-body/.storybook/preview-head.html:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/packages/vite-common/.storybook/preview-head.html:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/packages/vite-footer/.storybook/preview-head.html:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/packages/vite-header/.storybook/preview-head.html:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/.prettierignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | dist
3 | package.json
4 | package-lock.json
5 | coverage
6 | storybook-static
7 |
--------------------------------------------------------------------------------
/packages/vite-body/.storybook/preview.ts:
--------------------------------------------------------------------------------
1 | import preview from "../../../.storybook/preview";
2 |
3 | export default preview;
4 |
--------------------------------------------------------------------------------
/packages/vite-common/.storybook/preview.ts:
--------------------------------------------------------------------------------
1 | import preview from "../../../.storybook/preview";
2 |
3 | export default preview;
4 |
--------------------------------------------------------------------------------
/packages/vite-footer/.storybook/preview.ts:
--------------------------------------------------------------------------------
1 | import preview from "../../../.storybook/preview";
2 |
3 | export default preview;
4 |
--------------------------------------------------------------------------------
/packages/vite-common/src/components/index.ts:
--------------------------------------------------------------------------------
1 | export { default as Button } from "./Button";
2 | export { default as Links } from "./Links";
--------------------------------------------------------------------------------
/packages/vite-header/.storybook/preview.ts:
--------------------------------------------------------------------------------
1 | import preview from "../../../.storybook/preview";
2 |
3 | import "vite-common/dist/style.css";
4 |
5 | export default preview;
6 |
--------------------------------------------------------------------------------
/lerna.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "node_modules/lerna/schemas/lerna-schema.json",
3 | "useWorkspaces": true,
4 | "packages": ["packages/*"],
5 | "version": "independent"
6 | }
7 |
--------------------------------------------------------------------------------
/packages/vite-common/src/components/Button/styles.module.scss:
--------------------------------------------------------------------------------
1 | .button {
2 | padding: 5px 10px;
3 | border-radius: 4px;
4 | border: 1px solid darkred;
5 | color: white;
6 | }
7 |
--------------------------------------------------------------------------------
/packages/vite-common/src/helpers/checkMessage/index.ts:
--------------------------------------------------------------------------------
1 | export function checkMessage(message: string) {
2 | if (message === "hello") {
3 | return "world";
4 | } else {
5 | return "error";
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/babel.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | "@babel/preset-env",
4 | [
5 | "@babel/preset-react",
6 | {
7 | "runtime": "automatic"
8 | }
9 | ],
10 | "@babel/preset-typescript"
11 | ]
12 | }
13 |
--------------------------------------------------------------------------------
/packages/vite-body/.storybook/main.ts:
--------------------------------------------------------------------------------
1 | import commonConfigs from "../../../.storybook/main";
2 |
3 | const config = {
4 | ...commonConfigs,
5 | stories: ["../src/**/*..mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
6 | };
7 |
8 | export default config;
9 |
--------------------------------------------------------------------------------
/packages/vite-common/.storybook/main.ts:
--------------------------------------------------------------------------------
1 | import commonConfigs from "../../../.storybook/main";
2 |
3 | const config = {
4 | ...commonConfigs,
5 | stories: ["../src/**/*..mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
6 | };
7 |
8 | export default config;
9 |
--------------------------------------------------------------------------------
/packages/vite-footer/.storybook/main.ts:
--------------------------------------------------------------------------------
1 | import commonConfigs from "../../../.storybook/main";
2 |
3 | const config = {
4 | ...commonConfigs,
5 | stories: ["../src/**/*..mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
6 | };
7 |
8 | export default config;
9 |
--------------------------------------------------------------------------------
/packages/vite-header/.storybook/main.ts:
--------------------------------------------------------------------------------
1 | import commonConfigs from "../../../.storybook/main";
2 |
3 | const config = {
4 | ...commonConfigs,
5 | stories: ["../src/**/*..mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
6 | };
7 |
8 | export default config;
9 |
--------------------------------------------------------------------------------
/packages/vite-common/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "compilerOptions": {
4 | "rootDir": "./src",
5 | "outDir": "./dist",
6 | "declarationDir": "./dist/types"
7 | },
8 | "include": ["src/**/*.ts", "src/**/*.tsx"]
9 | }
10 |
--------------------------------------------------------------------------------
/tsconfig.node.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "composite": true,
4 | "skipLibCheck": true,
5 | "module": "ESNext",
6 | "moduleResolution": "node",
7 | "allowSyntheticDefaultImports": true
8 | },
9 | "include": ["vite.config.ts"]
10 | }
11 |
--------------------------------------------------------------------------------
/packages/vite-header/src/components/Header/styles.module.scss:
--------------------------------------------------------------------------------
1 | .header {
2 | border: 2px solid gray;
3 | border-radius: 4px;
4 | background-color: snow;
5 | display: flex;
6 | align-items: center;
7 | justify-content: space-between;
8 | padding: 0 20px;
9 | }
10 |
--------------------------------------------------------------------------------
/packages/vite-body/vite.config.ts:
--------------------------------------------------------------------------------
1 | import * as path from "path";
2 | import { getBaseConfig } from "../../vite.config";
3 |
4 | export default getBaseConfig({
5 | lib: {
6 | entry: path.resolve(__dirname, "src/index.ts"),
7 | name: "ViteBody",
8 | fileName: "vite-body",
9 | },
10 | });
11 |
--------------------------------------------------------------------------------
/packages/vite-common/src/components/Links/styles.module.scss:
--------------------------------------------------------------------------------
1 | .links {
2 | display: flex;
3 | align-items: center;
4 | justify-content: center;
5 | flex-wrap: wrap;
6 | width: 100%;
7 | border: 1px solid green;
8 | list-style-type: none;
9 | li {
10 | padding: 5px 10px;
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/packages/vite-common/vite.config.ts:
--------------------------------------------------------------------------------
1 | import * as path from "path";
2 | import { getBaseConfig } from "../../vite.config";
3 |
4 | export default getBaseConfig({
5 | lib: {
6 | entry: path.resolve(__dirname, "src/index.ts"),
7 | name: "ViteCommon",
8 | fileName: "vite-common",
9 | },
10 | });
11 |
--------------------------------------------------------------------------------
/packages/vite-footer/vite.config.ts:
--------------------------------------------------------------------------------
1 | import * as path from "path";
2 | import { getBaseConfig } from "../../vite.config";
3 |
4 | export default getBaseConfig({
5 | lib: {
6 | entry: path.resolve(__dirname, "src/index.ts"),
7 | name: "ViteFooter",
8 | fileName: "vite-footer",
9 | },
10 | });
11 |
--------------------------------------------------------------------------------
/packages/vite-header/vite.config.ts:
--------------------------------------------------------------------------------
1 | import * as path from "path";
2 | import { getBaseConfig } from "../../vite.config";
3 |
4 | export default getBaseConfig({
5 | lib: {
6 | entry: path.resolve(__dirname, "src/index.ts"),
7 | name: "ViteHeader",
8 | fileName: "vite-header",
9 | },
10 | });
11 |
--------------------------------------------------------------------------------
/packages/vite-body/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "compilerOptions": {
4 | "rootDir": "./src",
5 | "outDir": "./dist",
6 | "declarationDir": "./dist/types",
7 | "typeRoots": ["../../node_modules/@types", "./dist/types"]
8 | },
9 | "include": ["src/**/*.ts", "src/**/*.tsx"]
10 | }
11 |
--------------------------------------------------------------------------------
/packages/vite-footer/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "compilerOptions": {
4 | "rootDir": "./src",
5 | "outDir": "./dist",
6 | "declarationDir": "./dist/types",
7 | "typeRoots": ["../../node_modules/@types", "./dist/types"]
8 | },
9 | "include": ["src/**/*.ts", "src/**/*.tsx"]
10 | }
11 |
--------------------------------------------------------------------------------
/packages/vite-header/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "compilerOptions": {
4 | "rootDir": "./src",
5 | "outDir": "./dist",
6 | "declarationDir": "./dist/types",
7 | "typeRoots": ["../../node_modules/@types", "./dist/types"],
8 | },
9 | "include": ["src/**/*.ts", "src/**/*.tsx"]
10 | }
11 |
--------------------------------------------------------------------------------
/packages/vite-common/src/helpers/checkMessage/checkMessage.test.ts:
--------------------------------------------------------------------------------
1 | import { checkMessage } from ".";
2 |
3 | describe("checkMessage", () => {
4 | it('should return "world" if message is "hello"', () => {
5 | expect(checkMessage("hello")).toBe("world");
6 | });
7 |
8 | it('should return "error" if message is not "hello"', () => {
9 | expect(checkMessage("")).toBe("error");
10 | });
11 | });
12 |
--------------------------------------------------------------------------------
/packages/vite-body/src/components/Body/__snapshots__/Body.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`