Skip to content

Latest commit

 

History

History
89 lines (58 loc) · 1.55 KB

contributing.md

File metadata and controls

89 lines (58 loc) · 1.55 KB

Univer Contributing Guide

Tool

  • vite
  • Typescript/tsx
  • Typescript references
  • pnpm workspace

Project Introduction

For multi-package projects managed by lerna, there are plugins and cores in the packages directory, and examples are in the examples directory

Develop

Install dependencies

Node.js >= 14.19

git clone http://github.com/dream-num/univer
cd univer
npm i -g pnpm # MacOS : sudo npm i -g pnpm
npx playwright install
pnmp install
npm run dev

Command

Execute a command in a subpackage

pnpm run --filter  [package name] [command]

For example, start the dev development mode of the packages/sheets-plugin-sort project

pnpm run --filter @univerjs/sheets-plugin-sort dev

Clean

If you encounter any npm installation problems, please try one-click reinstallation of dependencies first

npm run clean

Plug-in development

  1. Quickly generate plug-in template directory
npm run cli
  1. For example, select the plugin-temp template and enter the plugin name filter to generate the packages/sheets-plugin-filter plugin.

  2. Execute the following command to start the plug-in development mode

pnpm run --filter  @univerjs/sheets-plugin-filter dev
  1. There will be an additional filter plugin button in the toolbar on the interface

Code comment

English is preferred, if the comment is longer, you can add bilingual

/*
  en: get result

  zh: 得出结果
*/
function(){

}

Update a dependency package

pnpm update