Skip to content

Commit 16b7579

Browse files
authored
Merge pull request #2 from BlankRiser/dev
Add docs
2 parents fab9c3d + ec76e8f commit 16b7579

46 files changed

Lines changed: 1939 additions & 145 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/pull_requests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Code quality
22

33
on:
4+
workflow_dispatch:
45
push:
56
branches: [main]
67
paths:

.github/workflows/release.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,17 @@ jobs:
3232
run: bun install --frozen-lockfile
3333

3434
- name: Test package version consistency
35-
run: bun run test:run
35+
run: bun run convert test:run
3636

3737
- name: Build
38-
run: bun run build
38+
run: bun run convert build
3939

4040
- name: "Publish to NPM"
41+
working-directory: ./packages/unit-conversion
4142
env:
4243
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
4344
run: npm publish --provenance --access=public
4445

4546
- name: "Publish to JSR"
47+
working-directory: ./packages/unit-conversion
4648
run: npx jsr publish

.gitignore

Lines changed: 171 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,175 @@
1-
# Environment variables
2-
*.env
1+
# Based on https://raw.githubusercontent.com/github/gitignore/main/Node.gitignore
32

4-
# Build
3+
# Logs
4+
5+
logs
6+
_.log
7+
npm-debug.log_
8+
yarn-debug.log*
9+
yarn-error.log*
10+
lerna-debug.log*
11+
.pnpm-debug.log*
12+
13+
# Caches
14+
15+
.cache
16+
17+
# Diagnostic reports (https://nodejs.org/api/report.html)
18+
19+
report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
20+
21+
# Runtime data
22+
23+
pids
24+
_.pid
25+
_.seed
26+
*.pid.lock
27+
28+
# Directory for instrumented libs generated by jscoverage/JSCover
29+
30+
lib-cov
31+
32+
# Coverage directory used by tools like istanbul
33+
34+
coverage
35+
*.lcov
36+
37+
# nyc test coverage
38+
39+
.nyc_output
40+
41+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
42+
43+
.grunt
44+
45+
# Bower dependency directory (https://bower.io/)
46+
47+
bower_components
48+
49+
# node-waf configuration
50+
51+
.lock-wscript
52+
53+
# Compiled binary addons (https://nodejs.org/api/addons.html)
54+
55+
build/Release
56+
57+
# Dependency directories
58+
59+
node_modules/
60+
jspm_packages/
61+
62+
# Snowpack dependency directory (https://snowpack.dev/)
63+
64+
web_modules/
65+
66+
# TypeScript cache
67+
68+
*.tsbuildinfo
69+
70+
# Optional npm cache directory
71+
72+
.npm
73+
74+
# Optional eslint cache
75+
76+
.eslintcache
77+
78+
# Optional stylelint cache
79+
80+
.stylelintcache
81+
82+
# Microbundle cache
83+
84+
.rpt2_cache/
85+
.rts2_cache_cjs/
86+
.rts2_cache_es/
87+
.rts2_cache_umd/
88+
89+
# Optional REPL history
90+
91+
.node_repl_history
92+
93+
# Output of 'npm pack'
94+
95+
*.tgz
96+
97+
# Yarn Integrity file
98+
99+
.yarn-integrity
100+
101+
# dotenv environment variable files
102+
103+
.env
104+
.env.development.local
105+
.env.test.local
106+
.env.production.local
107+
.env.local
108+
109+
# parcel-bundler cache (https://parceljs.org/)
110+
111+
.parcel-cache
112+
113+
# Next.js build output
114+
115+
.next
116+
out
117+
118+
# Nuxt.js build / generate output
119+
120+
.nuxt
5121
dist
6122

7-
# Node.js
8-
node_modules
123+
# Gatsby files
124+
125+
# Comment in the public line in if your project uses Gatsby and not Next.js
126+
127+
# https://nextjs.org/blog/next-9-1#public-directory-support
128+
129+
# public
130+
131+
# vuepress build output
132+
133+
.vuepress/dist
134+
135+
# vuepress v2.x temp and cache directory
136+
137+
.temp
138+
139+
# Docusaurus cache and generated files
140+
141+
.docusaurus
142+
143+
# Serverless directories
144+
145+
.serverless/
146+
147+
# FuseBox cache
148+
149+
.fusebox/
150+
151+
# DynamoDB Local files
152+
153+
.dynamodb/
154+
155+
# TernJS port file
156+
157+
.tern-port
158+
159+
# Stores VSCode versions used for testing VSCode extensions
160+
161+
.vscode-test
162+
163+
# yarn v2
164+
165+
.yarn/cache
166+
.yarn/unplugged
167+
.yarn/build-state.yml
168+
.yarn/install-state.gz
169+
.pnp.*
170+
171+
# IntelliJ based IDEs
172+
.idea
9173

10-
# Rolldown
11-
.rolldown
174+
# Finder (MacOS) folder config
175+
.DS_Store

.vscode/extensions.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"recommendations": ["astro-build.astro-vscode"],
3+
"unwantedRecommendations": []
4+
}

.vscode/settings.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"files.watcherExclude": {
3+
"**/routeTree.gen.ts": true
4+
},
5+
"search.exclude": {
6+
"**/routeTree.gen.ts": true
7+
},
8+
"files.readonlyInclude": {
9+
"**/routeTree.gen.ts": true
10+
},
11+
"[javascript]": {
12+
"editor.defaultFormatter": "biomejs.biome"
13+
},
14+
"[javascriptreact]": {
15+
"editor.defaultFormatter": "biomejs.biome"
16+
},
17+
"[typescript]": {
18+
"editor.defaultFormatter": "biomejs.biome"
19+
},
20+
"[typescriptreact]": {
21+
"editor.defaultFormatter": "biomejs.biome"
22+
},
23+
"[json]": {
24+
"editor.defaultFormatter": "biomejs.biome"
25+
},
26+
"[jsonc]": {
27+
"editor.defaultFormatter": "biomejs.biome"
28+
},
29+
"[css]": {
30+
"editor.defaultFormatter": "biomejs.biome"
31+
},
32+
"editor.codeActionsOnSave": {
33+
"source.organizeImports.biome": "explicit"
34+
}
35+
}

CONTRIBUTING.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Contributing
2+
3+
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.
4+
5+
## Development
6+
7+
To set up the development environment, run the following commands:
8+
9+
```bash
10+
bun install
11+
12+
# To run for the unit-conversion package
13+
bun run convert test # or cd packages/unit-conversion && bun test
14+
```

apps/docs/.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# build output
2+
dist/
3+
# generated types
4+
.astro/
5+
6+
# dependencies
7+
node_modules/
8+
9+
# logs
10+
npm-debug.log*
11+
yarn-debug.log*
12+
yarn-error.log*
13+
pnpm-debug.log*
14+
15+
16+
# environment variables
17+
.env
18+
.env.production
19+
20+
# macOS-specific files
21+
.DS_Store

apps/docs/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# @devhaven/unit-conversion Documentation
2+
3+
This is the documentation site for the `@devhaven/unit-conversion` package built with [Astro](https://astro.build/) using [Starlight Rapide](https://starlight.astro.build/resources/themes/) as the documentation theme.

apps/docs/astro.config.mjs

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
// @ts-check
2+
3+
import starlight from "@astrojs/starlight";
4+
import { defineConfig } from "astro/config";
5+
import starlightThemeRapide from "starlight-theme-rapide";
6+
7+
// https://astro.build/config
8+
export default defineConfig({
9+
integrations: [
10+
starlight({
11+
title: "Unit Conversion",
12+
plugins: [starlightThemeRapide()],
13+
social: [{ icon: "github", label: "GitHub", href: "https://github.com/BlankRiser/unit-conversion" }],
14+
sidebar: [
15+
// {
16+
// label: "Guides",
17+
// items: [
18+
// // Each item here is one entry in the navigation menu.
19+
// { label: "Example Guide", slug: "guides/example" },
20+
// ],
21+
// },
22+
{
23+
label: "Overview",
24+
slug: "index",
25+
},
26+
{
27+
label: "Installation",
28+
slug: "installation",
29+
},
30+
{
31+
label: "API Reference",
32+
slug: "api-reference",
33+
},
34+
{
35+
label: "Conversions",
36+
autogenerate: { directory: "conversions" },
37+
},
38+
],
39+
}),
40+
],
41+
});

apps/docs/biome.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/2.1.3/schema.json",
3+
"extends": "//",
4+
"root": false,
5+
"files": {
6+
"includes": ["**", "!.astro"]
7+
}
8+
}

0 commit comments

Comments
 (0)