Skip to content

Commit 88bda6b

Browse files
author
vland
committed
chore: initial commit from vland
0 parents  commit 88bda6b

15 files changed

Lines changed: 244 additions & 0 deletions

File tree

‎.changeset/README.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Changesets
2+
3+
This folder is managed by [changesets](https://github.com/changesets/changesets). Drop one Markdown file per user-facing change here. See the docs for the full lifecycle.

‎.changeset/config.json‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json",
3+
"changelog": ["@changesets/changelog-github", { "repo": "theme-toggle/theme-toggle" }],
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "public",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": []
11+
}

‎.github/workflows/ci.yml‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: pnpm/action-setup@v4
14+
- uses: actions/setup-node@v4
15+
with:
16+
node-version-file: .node-version
17+
cache: pnpm
18+
- run: pnpm install --frozen-lockfile
19+
- run: pnpm rr jsc
20+
- run: pnpm rr tsc
21+
- run: pnpm vitest run
22+
- run: pnpm rr pack

‎.github/workflows/release.yml‎

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
concurrency: ${{ github.workflow }}-${{ github.ref }}
8+
9+
permissions:
10+
contents: write
11+
pull-requests: write
12+
id-token: write
13+
14+
jobs:
15+
release:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: pnpm/action-setup@v4
20+
- uses: actions/setup-node@v4
21+
with:
22+
node-version-file: .node-version
23+
cache: pnpm
24+
registry-url: https://registry.npmjs.org
25+
- run: pnpm install --frozen-lockfile
26+
- run: pnpm rr pack
27+
28+
- name: Create release PR or publish
29+
uses: changesets/action@v1
30+
with:
31+
publish: pnpm changeset publish
32+
commit: "chore: release"
33+
title: "chore: release"
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
37+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

‎.gitignore‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
node_modules
2+
dist
3+
.turbo
4+
coverage
5+
6+
# editor / OS
7+
.DS_Store
8+
.idea
9+
.vscode/*
10+
!.vscode/extensions.json
11+
!.vscode/settings.json

‎.node-version‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
24

‎LICENSE‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 Ricardo Q. Bazan <raquirozbazan@gmail.com>
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

‎README.md‎

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# theme-toggle
2+
3+
A standalone TypeScript library scaffolded with [`@vlandoss/vland`](https://github.com/variableland/dx/tree/main/vland/cli).
4+
5+
## Install
6+
7+
```sh
8+
pnpm add theme-toggle
9+
```
10+
11+
## Usage
12+
13+
```ts
14+
import { greet } from "theme-toggle";
15+
16+
greet("vland");
17+
```
18+
19+
## Set up tooling
20+
21+
This project uses [`rr`](https://github.com/variableland/dx/tree/main/run-run) (the `@rrlab/cli`) as the single entry point for lint, format, type-check, and build. The pre-configured `mise.toml` puts `./node_modules/.bin` on your `PATH`, so `rr` is invokable directly from the project root.
22+
23+
```sh
24+
pnpm install # also pulls in @rrlab/cli
25+
rr plugins add biome # lint + format (writes biome.json)
26+
rr plugins add ts # type-check (writes tsconfig.json)
27+
rr plugins add tsdown # bundle (writes tsdown.config.ts)
28+
```
29+
30+
Each `rr plugins add` records the plugin in `run-run.config.mts` and scaffolds its config file. Re-run any time you want a different toolset.
31+
32+
## Develop
33+
34+
```sh
35+
rr jsc # lint + format check
36+
rr jsc --fix # auto-fix
37+
rr tsc # type-check
38+
rr pack # build to dist/
39+
vitest run # tests
40+
```
41+
42+
## Release
43+
44+
This package uses [Changesets](https://github.com/changesets/changesets). As a developer you only need to describe the change; the publish step is run by CI.
45+
46+
```sh
47+
pnpm changeset # describe a change
48+
pnpm changeset version # bump versions + changelog (locally, when needed)
49+
```
50+
51+
CI invokes `pnpm changeset publish` on `main`. `prepublishOnly` runs `rr pack` automatically before publish.

‎lefthook.yml‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
pre-commit:
2+
parallel: true
3+
jobs:
4+
- name: jsc
5+
run: pnpm rr jsc --fix-staged
6+
stage_fixed: true
7+
8+
- name: tsc
9+
glob: "*.{ts,tsx,json}"
10+
run: pnpm rr tsc
11+
12+
pre-push:
13+
jobs:
14+
- name: test
15+
run: pnpm vitest run

‎mise.toml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[env]
2+
_.path = ["{{config_root}}/node_modules/.bin"]
3+
4+
[tools]
5+
node = "24"
6+
pnpm = "10.6.4"

0 commit comments

Comments
 (0)