JSBook is an interactive and versatile platform that allows developers to:
- Store notes for personal or collaborative use.
- Write and execute React code with live output rendering on the side.
- Experiment with new packages and create dynamic documentation.
The project uses a monorepo setup powered by Lerna and incorporates various powerful packages and tools.
Write React code in an editor and instantly see the output rendered on the right side. Perfect for prototyping components, testing libraries, or teaching React concepts.
Store and organize notes alongside your code. Ideal for creating detailed documentation or brainstorming ideas.
Use the platform to create interactive documentation for projects, allowing others to explore and experiment with your code examples.
- esbuild-wasm: For super-fast bundling and code execution.
- jscodeshift: Enables seamless code transformations and manipulation.
- monaco-editor: Provides a robust, feature-rich code editor interface.
- react-split: Enables resizable panes, enhancing the user interface for split-screen code and output views.
- prettier: Ensures consistent and clean code formatting across the project.
-
Clone the Repository
git clone https://github.com/your-username/jsbook.git cd jsbook
-
Install Dependencies Use Lerna to bootstrap the packages:
npx lerna bootstrap
-
Start the Development Server
npm start
- Use the left pane to create and manage your notes.
- Type your React code in the editor.
- Watch the live output update instantly on the right side.
- Drag the divider between the editor and output pane to adjust their sizes. This functionality is powered by react-split.
We welcome contributions to make JSBook even better! Follow these steps to contribute:
- Fork the repository.
- Create a new branch for your feature or bugfix:
git checkout -b feature/your-feature-name
- Commit your changes:
git commit -m "Add your message here"
- Push to your branch:
git push origin feature/your-feature-name
- Create a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
- Lerna for managing the monorepo architecture.
- esbuild for its unparalleled speed in bundling and execution.
- monaco-editor for the excellent code editor experience.
- react-split for seamless resizable panes.
- Prettier for ensuring clean and readable code.
Example of the interactive editor and live preview.