mirror of
https://github.com/moyf/easy-copy.git
synced 2026-07-22 05:43:47 +00:00
docs: add CONTRIBUTING.md with development and testing instructions
This commit is contained in:
parent
ce1b439704
commit
559933dad2
1 changed files with 39 additions and 0 deletions
39
CONTRIBUTING.md
Normal file
39
CONTRIBUTING.md
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
# Contributing
|
||||
|
||||
## Development Setup
|
||||
|
||||
```bash
|
||||
npm install
|
||||
```
|
||||
|
||||
## Building
|
||||
|
||||
```bash
|
||||
npm run build # Type-check + production build
|
||||
npm run dev # Watch mode (rebuilds on file changes)
|
||||
npm run build:local # Build + copy to Obsidian vault (requires .env with VAULT_PATH)
|
||||
```
|
||||
|
||||
For `build:local`, create a `.env` file in the project root:
|
||||
|
||||
```
|
||||
VAULT_PATH=/path/to/your/obsidian/vault
|
||||
```
|
||||
|
||||
## Testing
|
||||
|
||||
Tests use [vitest](https://vitest.dev/) and cover the pure link-building functions in `src/linkBuilder.ts`.
|
||||
|
||||
```bash
|
||||
npm test # Run all tests once
|
||||
npm run test:watch # Run tests in watch mode (re-runs on file changes)
|
||||
```
|
||||
|
||||
Test files live alongside source files with a `.test.ts` suffix (e.g., `src/linkBuilder.test.ts`).
|
||||
|
||||
## Linting
|
||||
|
||||
```bash
|
||||
npm run lint # Check for lint errors
|
||||
npm run lint:fix # Auto-fix lint errors
|
||||
```
|
||||
Loading…
Reference in a new issue