|
1 | 1 | # fs-packages |
2 | 2 |
|
3 | | -Shared frontend service packages for the script-development ecosystem, published to the public npm registry under the `@script-development` scope. |
| 3 | +Shared frontend service packages by [Script Development](https://github.com/script-development), published to the public npm registry under the `@script-development` scope. |
| 4 | + |
| 5 | +**[Documentation](https://packages.script.nl)** — Getting started, architecture, package guides, and contributing. |
4 | 6 |
|
5 | 7 | ## Packages |
6 | 8 |
|
7 | | -| Package | Description | |
8 | | -| ---------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | |
9 | | -| [@script-development/fs-adapter-store](./packages/adapter-store) | Reactive adapter-store pattern with domain state management and CRUD resource adapters | |
10 | | -| [@script-development/fs-dialog](./packages/dialog) | Component-agnostic dialog stack service for Vue 3 — LIFO management with error middleware | |
11 | | -| [@script-development/fs-helpers](./packages/helpers) | Tree-shakeable shared utility helpers: deep copy, type guards, and case conversion | |
12 | | -| [@script-development/fs-http](./packages/http) | Framework-agnostic HTTP service factory with middleware architecture | |
13 | | -| [@script-development/fs-loading](./packages/loading) | Reactive loading state service with counter-based tracking and HTTP middleware | |
14 | | -| [@script-development/fs-storage](./packages/storage) | Framework-agnostic localStorage service factory with prefix namespacing | |
15 | | -| [@script-development/fs-theme](./packages/theme) | Reactive theme service with dark/light mode, system preference detection, and storage persistence | |
16 | | -| [@script-development/fs-toast](./packages/toast) | Component-agnostic toast queue service for Vue 3 — FIFO management | |
17 | | -| [@script-development/fs-translation](./packages/translation) | Type-safe reactive i18n service for Vue 3 — multi-locale, dot-notation keys, parameter interpolation | |
| 9 | +### Foundation |
18 | 10 |
|
19 | | -## Development |
| 11 | +| Package | Description | |
| 12 | +| ---------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- | |
| 13 | +| [@script-development/fs-http](https://www.npmjs.com/package/@script-development/fs-http) | HTTP service factory with middleware architecture | |
| 14 | +| [@script-development/fs-storage](https://www.npmjs.com/package/@script-development/fs-storage) | localStorage service factory with prefix namespacing | |
| 15 | +| [@script-development/fs-helpers](https://www.npmjs.com/package/@script-development/fs-helpers) | Tree-shakeable utilities: deep copy, type guards, case conversion | |
20 | 16 |
|
21 | | -```bash |
22 | | -npm install # Install all dependencies |
23 | | -npm run build # Build all packages |
24 | | -npm run test # Run all tests |
25 | | -npm run lint # Lint all packages |
26 | | -npm run format # Format all packages |
27 | | -``` |
| 17 | +### Services |
28 | 18 |
|
29 | | -## Adding a Package |
| 19 | +| Package | Description | |
| 20 | +| ------------------------------------------------------------------------------------------------------ | --------------------------------------------------------- | |
| 21 | +| [@script-development/fs-theme](https://www.npmjs.com/package/@script-development/fs-theme) | Reactive dark/light mode with system preference detection | |
| 22 | +| [@script-development/fs-loading](https://www.npmjs.com/package/@script-development/fs-loading) | Loading state service with HTTP middleware integration | |
| 23 | +| [@script-development/fs-toast](https://www.npmjs.com/package/@script-development/fs-toast) | Component-agnostic toast notification queue | |
| 24 | +| [@script-development/fs-dialog](https://www.npmjs.com/package/@script-development/fs-dialog) | Component-agnostic dialog stack with error middleware | |
| 25 | +| [@script-development/fs-translation](https://www.npmjs.com/package/@script-development/fs-translation) | Type-safe reactive i18n with multi-locale support | |
30 | 26 |
|
31 | | -1. Create `packages/{name}/` with `package.json`, `tsconfig.json`, `tsdown.config.ts`, `vitest.config.ts` |
32 | | -2. Name it `@script-development/fs-{name}` |
33 | | -3. Add tests with 100% coverage threshold |
34 | | -4. Add mutation testing with 90% score threshold |
35 | | -5. Create a changeset: `npx changeset` |
| 27 | +### Domain |
36 | 28 |
|
37 | | -## Publishing |
| 29 | +| Package | Description | |
| 30 | +| ---------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------- | |
| 31 | +| [@script-development/fs-adapter-store](https://www.npmjs.com/package/@script-development/fs-adapter-store) | Reactive state management with CRUD resource adapters | |
| 32 | +| [@script-development/fs-router](https://www.npmjs.com/package/@script-development/fs-router) | Type-safe router with CRUD navigation and middleware pipeline | |
38 | 33 |
|
39 | | -Packages are published to the **public npm registry** via OIDC Trusted Publishing. After merging changes: |
| 34 | +## Quick Start |
40 | 35 |
|
41 | | -1. `npx changeset` — describe the change and version bump |
42 | | -2. `npx changeset version` — apply version bumps and generate changelog |
43 | | -3. Commit the version bump |
44 | | -4. Push to main — CI publishes automatically with provenance attestation |
| 36 | +```bash |
| 37 | +npm install @script-development/fs-http |
| 38 | +``` |
45 | 39 |
|
46 | | -## Consuming |
| 40 | +```typescript |
| 41 | +import { createHttpService } from "@script-development/fs-http"; |
47 | 42 |
|
48 | | -Install directly from npm: |
| 43 | +const http = createHttpService("https://api.example.com"); |
| 44 | +const response = await http.getRequest<User[]>("/users"); |
| 45 | +``` |
| 46 | + |
| 47 | +See the [documentation](https://packages.script.nl) for the full getting started guide, architecture deep-dive, and package API tours. |
| 48 | + |
| 49 | +## Development |
49 | 50 |
|
50 | 51 | ```bash |
51 | | -npm install @script-development/fs-http |
| 52 | +npm install # Install all dependencies |
| 53 | +npm run build # Build all packages |
| 54 | +npm run test # Run all tests |
| 55 | +npm run lint # Lint all packages |
| 56 | +npm run format # Format all packages |
52 | 57 | ``` |
| 58 | + |
| 59 | +See [CONTRIBUTING.md](./CONTRIBUTING.md) for the full development guide. |
0 commit comments