diff --git a/.github/workflows/build-and-lint.yml b/.github/workflows/build-and-lint.yml index 1012f5f7..52ed4ddb 100644 --- a/.github/workflows/build-and-lint.yml +++ b/.github/workflows/build-and-lint.yml @@ -36,4 +36,4 @@ jobs: run: pnpm install - name: Build and lint - run: pnpm mitosis:react && pnpm b:react + run: pnpm c:react diff --git a/.gitignore b/.gitignore index ce067b5b..08ad3fc7 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,5 @@ packages/vue/src .parcel-cache parcel-bundle-reports /src/**/dist + +*storybook.log \ No newline at end of file diff --git a/README.md b/README.md index 3442c592..4ad990d4 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,8 @@ The Design System for the Interchain - [Compiler](#compiler) - [Icons](#icons) - [Customizing theme](#customizing-theme) + - [Package dev scripts in root package.json](#package-dev-scripts-in-root-packagejson) + - [Convention](#convention) - [Related](#related) - [Credits](#credits) @@ -79,6 +81,42 @@ Check [Icon guide](./docs/icons.md) to know how to add more icons Check [Customizing guide](./docs/custom-theme.md) to know how to customize the default theme. +## Package dev scripts in root package.json +- `t:` to compile target framework (t is short for transpile) +- `b:` to bundle target framework +- `c:` to compile and bundle target framework, it's equivalent to sequentially running `pnpm run t: && pnpm run b:` + +## Convention + +- Component file names must end with `*.lite.tsx` +- Style sheets must be in `*.css.ts` files, this is because we use a styling solution called `vanilla-extract` to have a CSS-in-JS API across all frameworks. +- For a component, you must use default export, not named export. This is a limitation of Mitosis +- There are more rules and limitations, please read more about Mitosis [here](https://github.com/BuilderIO/mitosis/tree/main/docs) +- To quickly test to see the compilation result from one Mitosis to any framework source code, please use +[mitosis sandbox](https://mitosis.builder.io/). It's similar to TS playground but for Mitosis testing purpose. +- [Vue specifics] Event handlers + - Event handlers in `