Skip to content

Latest commit

 

History

History
95 lines (64 loc) · 1.72 KB

CONTRIBUTING.md

File metadata and controls

95 lines (64 loc) · 1.72 KB

Contributing to Garfish

😁 Excited to hear that you are interested in contributing to this project! Thanks!

Requirement

Node.js >=16.14.0

Setup (locally)

This project uses pnpm to manage the dependencies, install it if you haven't via

npm i -g pnpm

Clone this repo to your local machine and install the dependencies.

pnpm install --filter=\!garfish-docs

Development

To build all the packages at once, run the following command on the project root

pnpm build

Build with watch mode

pnpm build:watch

Run Demo

To run Garfish locally, you can run

pnpm dev
pnpm build:watch

The server will restart automatically every time the builds get updated.

Project Structure

Monorepo

We use monorepo to manage multiple packages

website
packages
  browser-snapshot/          - snapshot sandbox
  browser-vm/                - vm sandbox
  core/                      - core module with sandbox、loader、hooks、router
  garfish/                   - main entry
  hooks/                     - hooks
  loader/                    - loader
  remote-module/             - cjs loader
  es-module/                 - esm loader and compiler
  css-scope/                 - css scope compiler
  router/                    - router
  utils/                     - common utils

The operation of the common

# Debug dev package
$ pnpm dev

# Pack all package
$ pnpm build

# Build with watch mode
$ pnpm build:watch

# Run unit tests
$ pnpm test

# Release a latest package (beta, alpha in the same way)
$ pnpm release

workflow

image