Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/joshk2/build-react-typescript-components-in-isolation
Build React TypeScript Components in Isolation from your Workspace
https://github.com/joshk2/build-react-typescript-components-in-isolation
Last synced: about 2 months ago
JSON representation
Build React TypeScript Components in Isolation from your Workspace
- Host: GitHub
- URL: https://github.com/joshk2/build-react-typescript-components-in-isolation
- Owner: JoshK2
- License: mit
- Created: 2019-10-23T10:54:28.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T23:21:21.000Z (about 2 years ago)
- Last Synced: 2024-10-13T11:12:59.418Z (3 months ago)
- Language: TypeScript
- Homepage: https://bit.dev/joshk/build-react-typescript-components-in-isolation
- Size: 1.25 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 22
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## 📦 Build React Typescript components in isolated environment
[![bit components](https://img.shields.io/badge/dynamic/json.svg?color=6e3991&label=bit%20components&query=payload.totalComponents&url=https%3A%2F%2Fapi.bit.dev%2Fscope%2Fjoshk%2Fbuild-react-typescript-components-in-isolation)](https://bit.dev/joshk/build-react-typescript-components-in-isolation)
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/JoshK2/build-react-typescript-components-in-isolation/blob/master/LICENSE)This is a demo project for building components locally in isolated environment using [Bit](https://github.com/teambit/bit).
You can read the post [here]().### 👾 Using Bit to virtually isolated components
- Install and Initialize Bit: `npm install bit-bin -g`
- Initialize Bit workspace: `bit init`
- Track all the components: `bit add src/components/*`
- Import the relevant compiler: `bit import bit.envs/compilers/typescript --compiler`
- Build all the components in an isolated environment: `bit build`### 🚀 Export the components to bit.dev so they can be easily shared between projects
- Create a collection in [bit.dev](https://bit.dev/~create-collection)
- Build and tag the tracked components: `bit ag -a 1.0.0`
- Export them to the collection you just created: `bit export .`
- Now you can install your components in other projects and modify them locally using [Bit](https://github.com/teambit/bit).### 🍾 Final result - components are fully reusable
You can see [here](https://bit.dev/joshk/build-react-typescript-components-in-isolation) the collection I created for exporting the components.
📖 Read the full post to understand better this repository.
You can read the post [here]().