spinup-ts 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +82 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +96 -0
- package/dist/index.js.map +1 -0
- package/dist/prompts.d.ts +17 -0
- package/dist/prompts.d.ts.map +1 -0
- package/dist/prompts.js +264 -0
- package/dist/prompts.js.map +1 -0
- package/dist/scaffold.d.ts +5 -0
- package/dist/scaffold.d.ts.map +1 -0
- package/dist/scaffold.js +128 -0
- package/dist/scaffold.js.map +1 -0
- package/dist/transforms/devcontainer.d.ts +3 -0
- package/dist/transforms/devcontainer.d.ts.map +1 -0
- package/dist/transforms/devcontainer.js +8 -0
- package/dist/transforms/devcontainer.js.map +1 -0
- package/dist/transforms/docker.d.ts +3 -0
- package/dist/transforms/docker.d.ts.map +1 -0
- package/dist/transforms/docker.js +11 -0
- package/dist/transforms/docker.js.map +1 -0
- package/dist/transforms/docs.d.ts +3 -0
- package/dist/transforms/docs.d.ts.map +1 -0
- package/dist/transforms/docs.js +22 -0
- package/dist/transforms/docs.js.map +1 -0
- package/dist/transforms/documentation.d.ts +3 -0
- package/dist/transforms/documentation.d.ts.map +1 -0
- package/dist/transforms/documentation.js +37 -0
- package/dist/transforms/documentation.js.map +1 -0
- package/dist/transforms/github-actions.d.ts +3 -0
- package/dist/transforms/github-actions.d.ts.map +1 -0
- package/dist/transforms/github-actions.js +48 -0
- package/dist/transforms/github-actions.js.map +1 -0
- package/dist/transforms/index.d.ts +3 -0
- package/dist/transforms/index.d.ts.map +1 -0
- package/dist/transforms/index.js +24 -0
- package/dist/transforms/index.js.map +1 -0
- package/dist/transforms/license.d.ts +3 -0
- package/dist/transforms/license.d.ts.map +1 -0
- package/dist/transforms/license.js +19 -0
- package/dist/transforms/license.js.map +1 -0
- package/dist/transforms/npm-publish.d.ts +3 -0
- package/dist/transforms/npm-publish.d.ts.map +1 -0
- package/dist/transforms/npm-publish.js +15 -0
- package/dist/transforms/npm-publish.js.map +1 -0
- package/dist/transforms/package-manager.d.ts +3 -0
- package/dist/transforms/package-manager.d.ts.map +1 -0
- package/dist/transforms/package-manager.js +31 -0
- package/dist/transforms/package-manager.js.map +1 -0
- package/dist/types.d.ts +116 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +52 -0
- package/dist/types.js.map +1 -0
- package/dist/update.d.ts +2 -0
- package/dist/update.d.ts.map +1 -0
- package/dist/update.js +207 -0
- package/dist/update.js.map +1 -0
- package/package.json +94 -0
- package/template/.commitlintrc.json +3 -0
- package/template/.devcontainer/.zshrc +159 -0
- package/template/.devcontainer/DISCOVER-DEPS.md +109 -0
- package/template/.devcontainer/README.md +223 -0
- package/template/.devcontainer/SETUP.md +191 -0
- package/template/.devcontainer/TOOLS.md +215 -0
- package/template/.devcontainer/devcontainer.json +106 -0
- package/template/.devcontainer/scripts/init-project.sh +167 -0
- package/template/.editorconfig +12 -0
- package/template/.github/.release-please-manifest.json +3 -0
- package/template/.github/ISSUE_TEMPLATE/bug_report.md +21 -0
- package/template/.github/ISSUE_TEMPLATE/feature_request.md +14 -0
- package/template/.github/PULL_REQUEST_TEMPLATE.md +13 -0
- package/template/.github/actions/setup-node-env/action.yml +20 -0
- package/template/.github/dependabot.yml +17 -0
- package/template/.github/labeler.yml +17 -0
- package/template/.github/release-please-config.json +7 -0
- package/template/.github/workflows/ci.yml +95 -0
- package/template/.github/workflows/codeql.yml +31 -0
- package/template/.github/workflows/labeler.yml +18 -0
- package/template/.github/workflows/release-please.yml +72 -0
- package/template/.github/workflows/stale.yml +32 -0
- package/template/.husky/commit-msg +1 -0
- package/template/.husky/pre-commit +1 -0
- package/template/.nvmrc +1 -0
- package/template/.vscode/extensions.json +11 -0
- package/template/.vscode/settings.json +12 -0
- package/template/AGENTS.md +1 -0
- package/template/CHANGELOG.md +11 -0
- package/template/CLAUDE.md +0 -0
- package/template/CONTRIBUTING.md +22 -0
- package/template/Dockerfile +21 -0
- package/template/LICENSE.Apache-2.0 +17 -0
- package/template/LICENSE.BSD-3-Clause +28 -0
- package/template/LICENSE.GPL-3.0 +17 -0
- package/template/LICENSE.ISC +15 -0
- package/template/LICENSE.MIT +21 -0
- package/template/README.md +62 -0
- package/template/biome.json +49 -0
- package/template/docker-compose.yml +7 -0
- package/template/docs/architecture/api-layer.md +44 -0
- package/template/docs/architecture/constitution.md +24 -0
- package/template/docs/architecture/data-model.md +24 -0
- package/template/docs/architecture/index.md +15 -0
- package/template/docs/architecture/project.md +24 -0
- package/template/docs/architecture/quality-checks.md +28 -0
- package/template/docs/architecture/testing-plan.md +35 -0
- package/template/docs/architecture/ui.md +37 -0
- package/template/docs/changelog.md +9 -0
- package/template/docs/contributing.md +46 -0
- package/template/docs/developer-guide/architecture.md +22 -0
- package/template/docs/developer-guide/contributing.md +30 -0
- package/template/docs/developer-guide/data-model.md +25 -0
- package/template/docs/developer-guide/index.md +12 -0
- package/template/docs/developer-guide/testing.md +40 -0
- package/template/docs/examples.md +37 -0
- package/template/docs/getting-started.md +42 -0
- package/template/docs/installation.md +45 -0
- package/template/docs/intro.md +60 -0
- package/template/docs/post-mortems/.gitkeep +0 -0
- package/template/docs/reference/cli.md +32 -0
- package/template/docs/reference/configuration.md +33 -0
- package/template/docs/reference/hooks.md +27 -0
- package/template/docs/research/competitor-analysis.md +21 -0
- package/template/docs/research/real-world-demand.md +21 -0
- package/template/docs/user-guide/configuration.md +32 -0
- package/template/docs/user-guide/features.md +21 -0
- package/template/docs/user-guide/how-it-works.md +29 -0
- package/template/docs/user-guide/index.md +11 -0
- package/template/docusaurus.config.ts +93 -0
- package/template/eslint.config.mjs +66 -0
- package/template/justfile +51 -0
- package/template/package.json +88 -0
- package/template/pnpm-workspace.yaml +8 -0
- package/template/sidebars.ts +72 -0
- package/template/src/index.ts +3 -0
- package/template/static/img/logo.svg +4 -0
- package/template/tests/index.test.ts +8 -0
- package/template/tsconfig.json +23 -0
- package/template/vitest.config.ts +19 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Data Model
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Data Model
|
|
6
|
+
|
|
7
|
+
## Core Types
|
|
8
|
+
|
|
9
|
+
Replace with your project's core TypeScript types and their relationships.
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
// Example: your primary type
|
|
13
|
+
export interface YourType {
|
|
14
|
+
id: string;
|
|
15
|
+
// ...
|
|
16
|
+
}
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Relationships
|
|
20
|
+
|
|
21
|
+
Describe how types relate to each other. Use a diagram if helpful.
|
|
22
|
+
|
|
23
|
+
## Validation
|
|
24
|
+
|
|
25
|
+
Describe how input validation works (Zod, custom validators, etc.).
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Developer Guide
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Developer Guide
|
|
6
|
+
|
|
7
|
+
This section is for developers working on __PROJECT_NAME__ itself.
|
|
8
|
+
|
|
9
|
+
- [Architecture](./architecture) — high-level design
|
|
10
|
+
- [Data Model](./data-model) — types and schema
|
|
11
|
+
- [Testing](./testing) — test strategy and patterns
|
|
12
|
+
- [Contributing](./contributing) — how to contribute
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Testing
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Testing
|
|
6
|
+
|
|
7
|
+
## Test Structure
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
src/
|
|
11
|
+
└── __tests__/
|
|
12
|
+
├── unit/
|
|
13
|
+
└── integration/
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Running Tests
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
pnpm test # all tests
|
|
20
|
+
pnpm test:coverage # with coverage report
|
|
21
|
+
pnpm test -- --watch # watch mode
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Writing Tests
|
|
25
|
+
|
|
26
|
+
```typescript
|
|
27
|
+
import { describe, it, expect } from 'vitest';
|
|
28
|
+
import { yourFunction } from '../src/index.js';
|
|
29
|
+
|
|
30
|
+
describe('yourFunction', () => {
|
|
31
|
+
it('should do X when given Y', () => {
|
|
32
|
+
const result = yourFunction(input);
|
|
33
|
+
expect(result).toEqual(expected);
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Testing Philosophy
|
|
39
|
+
|
|
40
|
+
Replace with your project's specific testing approach and conventions.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Examples
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Examples
|
|
6
|
+
|
|
7
|
+
## Basic Example
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
import { yourExport } from '__PROJECT_NAME__';
|
|
11
|
+
|
|
12
|
+
// Replace with a complete, copy-pasteable example
|
|
13
|
+
const result = yourExport({ input: 'hello' });
|
|
14
|
+
console.log(result);
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Advanced Example
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
import { yourExport, AnotherExport } from '__PROJECT_NAME__';
|
|
21
|
+
|
|
22
|
+
// Replace with a more complex but realistic usage example
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Real-World Patterns
|
|
26
|
+
|
|
27
|
+
### Pattern 1: Replace with a common pattern name
|
|
28
|
+
|
|
29
|
+
```typescript
|
|
30
|
+
// Replace with real code
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Pattern 2: Another common use case
|
|
34
|
+
|
|
35
|
+
```typescript
|
|
36
|
+
// Replace with real code
|
|
37
|
+
```
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Getting Started
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Getting Started
|
|
6
|
+
|
|
7
|
+
## 1. Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pnpm add __PROJECT_NAME__
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## 2. Basic Usage
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import { yourMainExport } from '__PROJECT_NAME__';
|
|
17
|
+
|
|
18
|
+
// Replace with the simplest real usage example
|
|
19
|
+
const result = yourMainExport({
|
|
20
|
+
// required options
|
|
21
|
+
});
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## 3. Configuration
|
|
25
|
+
|
|
26
|
+
```typescript
|
|
27
|
+
import { yourMainExport } from '__PROJECT_NAME__';
|
|
28
|
+
|
|
29
|
+
const result = yourMainExport({
|
|
30
|
+
// common configuration options
|
|
31
|
+
option1: 'value',
|
|
32
|
+
option2: true,
|
|
33
|
+
});
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
See the [Configuration reference](./reference/configuration) for all options.
|
|
37
|
+
|
|
38
|
+
## Next Steps
|
|
39
|
+
|
|
40
|
+
- [User Guide](./user-guide/) — in-depth feature documentation
|
|
41
|
+
- [API Reference](./api) — auto-generated from TypeScript types
|
|
42
|
+
- [Examples](./examples) — real-world usage patterns
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Installation
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Installation
|
|
6
|
+
|
|
7
|
+
## Requirements
|
|
8
|
+
|
|
9
|
+
- Node.js `>= __NODE_VERSION__`
|
|
10
|
+
- A package manager: pnpm (recommended), npm, or bun
|
|
11
|
+
|
|
12
|
+
## Install
|
|
13
|
+
|
|
14
|
+
**pnpm (recommended)**
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
pnpm add __PROJECT_NAME__
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
**npm**
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npm install __PROJECT_NAME__
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
**bun**
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
bun add __PROJECT_NAME__
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Verify
|
|
33
|
+
|
|
34
|
+
```typescript
|
|
35
|
+
import { yourExport } from '__PROJECT_NAME__';
|
|
36
|
+
// Replace with a real smoke-test import
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Peer Dependencies
|
|
40
|
+
|
|
41
|
+
List any peer dependencies here. If none, remove this section.
|
|
42
|
+
|
|
43
|
+
## Next Steps
|
|
44
|
+
|
|
45
|
+
→ [Getting Started](./getting-started)
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: intro
|
|
3
|
+
slug: /
|
|
4
|
+
title: __PROJECT_NAME__
|
|
5
|
+
description: __DESCRIPTION__
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# __PROJECT_NAME__
|
|
9
|
+
|
|
10
|
+
> **__DESCRIPTION__**
|
|
11
|
+
|
|
12
|
+
[](https://npmjs.com/package/__PROJECT_NAME__)
|
|
13
|
+
[](https://github.com/__GITHUB_HANDLE__/__PROJECT_NAME__/actions/workflows/ci.yml)
|
|
14
|
+
[](https://github.com/__GITHUB_HANDLE__/__PROJECT_NAME__/blob/main/LICENSE)
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Why __PROJECT_NAME__?
|
|
19
|
+
|
|
20
|
+
:::tip The short version
|
|
21
|
+
Replace this with your one-sentence value proposition. What does __PROJECT_NAME__ do that nothing else does?
|
|
22
|
+
:::
|
|
23
|
+
|
|
24
|
+
**The problem:** Describe the specific pain point your library solves. Be concrete — what does a developer have to do today without your library?
|
|
25
|
+
|
|
26
|
+
**The solution:** __PROJECT_NAME__ solves this with a clean, TypeScript-first API. One import, zero configuration, full type safety.
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Features
|
|
31
|
+
|
|
32
|
+
| | Feature | Description |
|
|
33
|
+
|---|---------|-------------|
|
|
34
|
+
| ⚡ | **Fast** | Replace with a real performance claim or benchmark |
|
|
35
|
+
| 🔒 | **Type-safe** | Full TypeScript with strict types and IntelliSense |
|
|
36
|
+
| 🧪 | **Well tested** | Comprehensive test suite with >90% coverage |
|
|
37
|
+
| 📦 | **Lightweight** | Zero unnecessary dependencies |
|
|
38
|
+
| 🔌 | **Extensible** | Replace with your extensibility story |
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Install Now
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
pnpm add __PROJECT_NAME__
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
```typescript
|
|
49
|
+
import { yourExport } from '__PROJECT_NAME__';
|
|
50
|
+
|
|
51
|
+
// Replace with the simplest possible usage example
|
|
52
|
+
const result = yourExport({ input: 'value' });
|
|
53
|
+
console.log(result);
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
**[Get Started →](./getting-started)** · **[API Reference →](./api)** · **[GitHub →](https://github.com/__GITHUB_HANDLE__/__PROJECT_NAME__)**
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
*Built with TypeScript. __LICENSE__ License. Made by [__AUTHOR__](https://github.com/__GITHUB_HANDLE__).*
|
|
File without changes
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: CLI Reference
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# CLI Reference
|
|
6
|
+
|
|
7
|
+
Remove this page if __PROJECT_NAME__ is not a CLI tool.
|
|
8
|
+
|
|
9
|
+
## Commands
|
|
10
|
+
|
|
11
|
+
### `__PROJECT_SLUG__ <command>`
|
|
12
|
+
|
|
13
|
+
Replace with your actual CLI command structure.
|
|
14
|
+
|
|
15
|
+
| Command | Description |
|
|
16
|
+
|---------|-------------|
|
|
17
|
+
| `init` | Replace with real command |
|
|
18
|
+
| `run` | Replace with real command |
|
|
19
|
+
|
|
20
|
+
## Global Flags
|
|
21
|
+
|
|
22
|
+
| Flag | Description |
|
|
23
|
+
|------|-------------|
|
|
24
|
+
| `--help`, `-h` | Show help |
|
|
25
|
+
| `--version`, `-v` | Show version |
|
|
26
|
+
|
|
27
|
+
## Exit Codes
|
|
28
|
+
|
|
29
|
+
| Code | Meaning |
|
|
30
|
+
|------|---------|
|
|
31
|
+
| `0` | Success |
|
|
32
|
+
| `1` | Error |
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Configuration Reference
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Configuration Reference
|
|
6
|
+
|
|
7
|
+
## Full Config Schema
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
interface Config {
|
|
11
|
+
// Replace with your actual Config interface
|
|
12
|
+
required: string;
|
|
13
|
+
optional?: boolean;
|
|
14
|
+
}
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Options
|
|
18
|
+
|
|
19
|
+
### `required`
|
|
20
|
+
|
|
21
|
+
**Type:** `string` · **Required:** yes
|
|
22
|
+
|
|
23
|
+
Description of this option.
|
|
24
|
+
|
|
25
|
+
### `optional`
|
|
26
|
+
|
|
27
|
+
**Type:** `boolean` · **Default:** `false`
|
|
28
|
+
|
|
29
|
+
Description of this option.
|
|
30
|
+
|
|
31
|
+
## Configuration Sources
|
|
32
|
+
|
|
33
|
+
List where configuration can come from (constructor args, env vars, config file, etc.).
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Hooks Reference
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Hooks Reference
|
|
6
|
+
|
|
7
|
+
Remove this page if __PROJECT_NAME__ does not have a hooks/plugin system.
|
|
8
|
+
|
|
9
|
+
## Available Hooks
|
|
10
|
+
|
|
11
|
+
| Hook | When it fires | Arguments |
|
|
12
|
+
|------|--------------|-----------|
|
|
13
|
+
| `onInit` | Replace with real hook | `(config: Config) => void` |
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import { createInstance } from '__PROJECT_NAME__';
|
|
19
|
+
|
|
20
|
+
const instance = createInstance({
|
|
21
|
+
hooks: {
|
|
22
|
+
onInit: (config) => {
|
|
23
|
+
console.log('Initialized', config);
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
```
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Competitor Analysis
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Competitor Analysis
|
|
6
|
+
|
|
7
|
+
## Comparison Table
|
|
8
|
+
|
|
9
|
+
| Feature | __PROJECT_NAME__ | Alt A | Alt B |
|
|
10
|
+
|---------|-----------------|-------|-------|
|
|
11
|
+
| TypeScript-first | ✅ | ❌ | ⚠️ |
|
|
12
|
+
| Bundle size | TBD | TBD | TBD |
|
|
13
|
+
| Replace with real feature | | | |
|
|
14
|
+
|
|
15
|
+
## Key Differentiators
|
|
16
|
+
|
|
17
|
+
List what makes __PROJECT_NAME__ genuinely different, not just feature-matched.
|
|
18
|
+
|
|
19
|
+
## Migration from Competitors
|
|
20
|
+
|
|
21
|
+
If relevant, describe how to migrate from the most common competing library.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Real-World Demand
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Real-World Demand
|
|
6
|
+
|
|
7
|
+
## Problem Evidence
|
|
8
|
+
|
|
9
|
+
Replace with evidence that the problem your library solves is real and common.
|
|
10
|
+
Links to Stack Overflow questions, GitHub issues, forum posts, etc.
|
|
11
|
+
|
|
12
|
+
## Existing Solutions
|
|
13
|
+
|
|
14
|
+
| Solution | Approach | Gap |
|
|
15
|
+
|----------|----------|-----|
|
|
16
|
+
| Competitor A | How they solve it | What's missing |
|
|
17
|
+
| Competitor B | How they solve it | What's missing |
|
|
18
|
+
|
|
19
|
+
## Our Position
|
|
20
|
+
|
|
21
|
+
Why __PROJECT_NAME__ fills the gap better than existing solutions.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Configuration
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Configuration
|
|
6
|
+
|
|
7
|
+
## Configuration Object
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
import type { Config } from '__PROJECT_NAME__';
|
|
11
|
+
|
|
12
|
+
const config: Config = {
|
|
13
|
+
// Replace with your actual configuration options
|
|
14
|
+
option1: 'default-value',
|
|
15
|
+
option2: true,
|
|
16
|
+
};
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Options Reference
|
|
20
|
+
|
|
21
|
+
| Option | Type | Default | Description |
|
|
22
|
+
|--------|------|---------|-------------|
|
|
23
|
+
| `option1` | `string` | `'default'` | Replace with real option description |
|
|
24
|
+
| `option2` | `boolean` | `true` | Replace with real option description |
|
|
25
|
+
|
|
26
|
+
## Environment Variables
|
|
27
|
+
|
|
28
|
+
| Variable | Description |
|
|
29
|
+
|----------|-------------|
|
|
30
|
+
| `__PROJECT_SLUG___OPTION` | Replace with real env var if applicable |
|
|
31
|
+
|
|
32
|
+
Replace or remove this section if your library doesn't use environment variables.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Features
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Features
|
|
6
|
+
|
|
7
|
+
## Feature 1: Replace with your feature name
|
|
8
|
+
|
|
9
|
+
Describe what this feature does and why it's useful.
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
// Show a code example of using this feature
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Feature 2: Another feature
|
|
16
|
+
|
|
17
|
+
Describe the second major feature.
|
|
18
|
+
|
|
19
|
+
## Feature 3: Third feature
|
|
20
|
+
|
|
21
|
+
Add as many feature sections as you have features.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: How It Works
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# How It Works
|
|
6
|
+
|
|
7
|
+
Replace this section with your project's core concepts and mental model.
|
|
8
|
+
|
|
9
|
+
## Core Concepts
|
|
10
|
+
|
|
11
|
+
### Concept 1
|
|
12
|
+
|
|
13
|
+
Explain the first key concept. Use analogies where helpful.
|
|
14
|
+
|
|
15
|
+
### Concept 2
|
|
16
|
+
|
|
17
|
+
Explain the second key concept.
|
|
18
|
+
|
|
19
|
+
## Data Flow
|
|
20
|
+
|
|
21
|
+
Describe how data flows through your library from input to output.
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
Input → [Step 1] → [Step 2] → Output
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Key Design Decisions
|
|
28
|
+
|
|
29
|
+
Explain any non-obvious design choices that affect how users interact with the library.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: User Guide
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# User Guide
|
|
6
|
+
|
|
7
|
+
Welcome to the __PROJECT_NAME__ User Guide. This section covers everything you need to use __PROJECT_NAME__ effectively.
|
|
8
|
+
|
|
9
|
+
- [How It Works](./how-it-works) — core concepts and mental model
|
|
10
|
+
- [Configuration](./configuration) — all configuration options
|
|
11
|
+
- [Features](./features) — feature-by-feature documentation
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import type { Config } from '@docusaurus/types';
|
|
2
|
+
import type * as Preset from '@docusaurus/preset-classic';
|
|
3
|
+
|
|
4
|
+
const config: Config = {
|
|
5
|
+
title: '__PROJECT_NAME__',
|
|
6
|
+
tagline: '__DESCRIPTION__',
|
|
7
|
+
favicon: 'img/logo.svg',
|
|
8
|
+
|
|
9
|
+
url: 'https://__GITHUB_HANDLE__.github.io',
|
|
10
|
+
baseUrl: '/__PROJECT_NAME__/',
|
|
11
|
+
organizationName: '__GITHUB_HANDLE__',
|
|
12
|
+
projectName: '__PROJECT_NAME__',
|
|
13
|
+
trailingSlash: false,
|
|
14
|
+
|
|
15
|
+
onBrokenLinks: 'throw',
|
|
16
|
+
onBrokenMarkdownLinks: 'warn',
|
|
17
|
+
|
|
18
|
+
i18n: {
|
|
19
|
+
defaultLocale: 'en',
|
|
20
|
+
locales: ['en'],
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
plugins: [
|
|
24
|
+
[
|
|
25
|
+
'docusaurus-plugin-typedoc',
|
|
26
|
+
{
|
|
27
|
+
entryPoints: ['./src/index.ts'],
|
|
28
|
+
tsconfig: './tsconfig.json',
|
|
29
|
+
out: 'api',
|
|
30
|
+
sidebar: {
|
|
31
|
+
categoryLabel: 'API Reference',
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
[
|
|
36
|
+
'docusaurus-plugin-llms',
|
|
37
|
+
{
|
|
38
|
+
generateLLMsTxt: true,
|
|
39
|
+
generateMarkdownFiles: true,
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
],
|
|
43
|
+
|
|
44
|
+
presets: [
|
|
45
|
+
[
|
|
46
|
+
'classic',
|
|
47
|
+
{
|
|
48
|
+
docs: {
|
|
49
|
+
sidebarPath: './sidebars.ts',
|
|
50
|
+
editUrl: 'https://github.com/__GITHUB_HANDLE__/__PROJECT_NAME__/edit/main/',
|
|
51
|
+
routeBasePath: '/',
|
|
52
|
+
},
|
|
53
|
+
blog: false,
|
|
54
|
+
} satisfies Preset.Options,
|
|
55
|
+
],
|
|
56
|
+
],
|
|
57
|
+
|
|
58
|
+
themeConfig: {
|
|
59
|
+
navbar: {
|
|
60
|
+
title: '__PROJECT_NAME__',
|
|
61
|
+
items: [
|
|
62
|
+
{
|
|
63
|
+
type: 'docSidebar',
|
|
64
|
+
sidebarId: 'mainSidebar',
|
|
65
|
+
position: 'left',
|
|
66
|
+
label: 'Docs',
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
href: 'https://github.com/__GITHUB_HANDLE__/__PROJECT_NAME__',
|
|
70
|
+
label: 'GitHub',
|
|
71
|
+
position: 'right',
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
},
|
|
75
|
+
footer: {
|
|
76
|
+
style: 'dark',
|
|
77
|
+
copyright: `Copyright © __YEAR__ __AUTHOR__. Built with <a href="https://docusaurus.io">Docusaurus</a>.`,
|
|
78
|
+
},
|
|
79
|
+
colorMode: {
|
|
80
|
+
defaultMode: 'light',
|
|
81
|
+
disableSwitch: false,
|
|
82
|
+
respectPrefersColorScheme: true,
|
|
83
|
+
},
|
|
84
|
+
// Algolia DocSearch — apply at https://docsearch.algolia.com/apply/
|
|
85
|
+
// algolia: {
|
|
86
|
+
// appId: 'YOUR_APP_ID',
|
|
87
|
+
// apiKey: 'YOUR_SEARCH_API_KEY',
|
|
88
|
+
// indexName: '__PROJECT_SLUG__',
|
|
89
|
+
// },
|
|
90
|
+
} satisfies Preset.ThemeConfig,
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
export default config;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import tseslint from 'typescript-eslint';
|
|
2
|
+
import unicorn from 'eslint-plugin-unicorn';
|
|
3
|
+
import sonarjs from 'eslint-plugin-sonarjs';
|
|
4
|
+
import importX from 'eslint-plugin-import-x';
|
|
5
|
+
import noSecrets from 'eslint-plugin-no-secrets';
|
|
6
|
+
|
|
7
|
+
export default tseslint.config(
|
|
8
|
+
...tseslint.configs.strictTypeChecked,
|
|
9
|
+
...tseslint.configs.stylisticTypeChecked,
|
|
10
|
+
unicorn.configs['flat/recommended'],
|
|
11
|
+
sonarjs.configs.recommended,
|
|
12
|
+
importX.flatConfigs.recommended,
|
|
13
|
+
importX.flatConfigs.typescript,
|
|
14
|
+
{
|
|
15
|
+
plugins: { 'no-secrets': noSecrets },
|
|
16
|
+
languageOptions: {
|
|
17
|
+
parserOptions: {
|
|
18
|
+
project: true,
|
|
19
|
+
tsconfigRootDir: import.meta.dirname,
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
rules: {
|
|
23
|
+
'@typescript-eslint/no-floating-promises': 'error',
|
|
24
|
+
'@typescript-eslint/no-misused-promises': ['error', { checksVoidReturn: { attributes: false } }],
|
|
25
|
+
'@typescript-eslint/require-await': 'error',
|
|
26
|
+
'@typescript-eslint/no-unnecessary-condition': 'error',
|
|
27
|
+
'@typescript-eslint/consistent-type-imports': ['error', { prefer: 'type-imports', fixStyle: 'inline-type-imports' }],
|
|
28
|
+
'@typescript-eslint/explicit-function-return-type': ['error', { allowExpressions: true, allowTypedFunctionExpressions: true, allowHigherOrderFunctions: true }],
|
|
29
|
+
'@typescript-eslint/restrict-template-expressions': ['error', { allowNumber: true }],
|
|
30
|
+
'@typescript-eslint/consistent-type-assertions': ['error', { assertionStyle: 'as', objectLiteralTypeAssertions: 'never' }],
|
|
31
|
+
'sonarjs/cognitive-complexity': ['error', 10],
|
|
32
|
+
'sonarjs/no-duplicate-string': ['error', { threshold: 3 }],
|
|
33
|
+
'max-lines-per-function': ['warn', { max: 80, skipBlankLines: true, skipComments: true, IIFEs: true }],
|
|
34
|
+
'max-lines': ['warn', { max: 400, skipBlankLines: true, skipComments: true }],
|
|
35
|
+
'max-params': ['error', { max: 5 }],
|
|
36
|
+
'max-depth': ['error', { max: 5 }],
|
|
37
|
+
'max-statements': ['warn', { max: 20 }, { ignoreTopLevelFunctions: true }],
|
|
38
|
+
'no-empty': ['error', { allowEmptyCatch: false }],
|
|
39
|
+
'unicorn/error-message': 'error',
|
|
40
|
+
'unicorn/catch-error-name': 'error',
|
|
41
|
+
'unicorn/custom-error-definition': 'error',
|
|
42
|
+
'import-x/no-relative-parent-imports': 'error',
|
|
43
|
+
'import-x/no-cycle': ['error', { maxDepth: 10 }],
|
|
44
|
+
'import-x/order': 'off',
|
|
45
|
+
'import-x/no-duplicates': 'off',
|
|
46
|
+
'no-secrets/no-secrets': ['error', { tolerance: 4.5 }],
|
|
47
|
+
'@typescript-eslint/no-magic-numbers': ['warn', { ignore: [-1, 0, 1, 2, 10, 100, 1000], ignoreArrayIndexes: true, ignoreDefaultValues: true, ignoreClassFieldInitialValues: true, ignoreEnums: true, ignoreNumericLiteralTypes: true, ignoreReadonlyClassProperties: true, enforceConst: true }],
|
|
48
|
+
'unicorn/prevent-abbreviations': ['error', { replacements: { props: false, ref: false, ctx: false, req: false, res: false, err: false, db: false, id: false, env: false, fn: false, dir: false, src: false, dest: false, tmp: false, config: false, args: false } }],
|
|
49
|
+
'unicorn/no-null': 'off',
|
|
50
|
+
'unicorn/filename-case': ['error', { case: 'kebabCase', multipleFileExtensions: true }],
|
|
51
|
+
'unicorn/no-process-exit': 'off',
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
// Typed ESLint covers `src` only; tests are formatted/linted by Biome and
|
|
56
|
+
// type-checked by `tsc`/Vitest (keeps `pnpm lint` green out of the box).
|
|
57
|
+
ignores: [
|
|
58
|
+
'node_modules/**',
|
|
59
|
+
'dist/**',
|
|
60
|
+
'tests/**',
|
|
61
|
+
'coverage/**',
|
|
62
|
+
'*.config.mjs',
|
|
63
|
+
'vitest.config.ts',
|
|
64
|
+
],
|
|
65
|
+
},
|
|
66
|
+
);
|