Skip to content

Commit 2f6c592

Browse files
committed
init repo
1 parent f6ff996 commit 2f6c592

File tree

10 files changed

+2996
-0
lines changed

10 files changed

+2996
-0
lines changed

.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/[email protected]/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "restricted",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": []
11+
}

.github/workflows/ci.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: ⬇️ Checkout repo
15+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
16+
17+
- name: 🟧 Setup pnpm
18+
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
19+
with:
20+
version: 9
21+
22+
- name: ⎔ Setup node
23+
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
24+
with:
25+
node-version: 22
26+
27+
- name: 📥 Install dependencies
28+
run: pnpm install --frozen-lockfile
29+
30+
- name: 💅 Lint
31+
run: pnpm run lint:ci
32+
33+
- name: 🧪 Run tests
34+
run: pnpm run test:ci
35+
36+
- name: 🏗 Build lib
37+
run: pnpm run build

.github/workflows/release.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: 🦋 Changesets Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
concurrency: ${{ github.workflow }}-${{ github.ref }}
9+
10+
jobs:
11+
release:
12+
name: 🦋 Changesets Release
13+
runs-on: ubuntu-latest
14+
15+
permissions:
16+
# write permission is required to create a github release
17+
contents: write
18+
# write permission is required for autolabeler
19+
# otherwise, read permission is required at least
20+
pull-requests: write
21+
22+
steps:
23+
- name: ⬇️ Checkout Repo
24+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
25+
with:
26+
fetch-depth: 0
27+
28+
- name: 🟧 Setup pnpm
29+
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
30+
with:
31+
version: 9
32+
33+
- name: ⎔ Setup node
34+
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
35+
with:
36+
node-version: 22
37+
38+
- name: 📥 Install dependencies
39+
run: pnpm install
40+
41+
- name: 🚀 PR / Publish
42+
uses: changesets/action@c8bada60c408975afd1a20b3db81d6eee6789308 # v1.4.9
43+
with:
44+
version: pnpm run changeset:version
45+
commit: 'chore: Update version for release'
46+
title: 'chore: Update version for release'
47+
publish: pnpm run changeset:release
48+
env:
49+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# node/npm/next
2+
node_modules
3+
dist/
4+
build/
5+
.next
6+
7+
# editors
8+
.idea/
9+
10+
*.log
11+
*.swp
12+
13+
# os
14+
.DS_Store
15+
16+
# local env files
17+
.env.local

README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# OBOS public frontend modules
2+
3+
This a monorepo of modules and components that enhances or is built on top of the core components in [Grunnmuren, OBOS' design system](https://github.com/code-obos/grunnmuren).
4+
5+
6+
## Packages
7+
8+
* [format](./packages/format)
9+
10+
## Contributing
11+
12+
### Setup pnpm
13+
14+
See the [pnpm installation guide](https://pnpm.io/installation).
15+
16+
```
17+
pnpm install
18+
```
19+
20+
### Linting
21+
22+
This repository uses [biome](https://biomejs.dev/) for linting.
23+
24+
### Build
25+
26+
```
27+
pnpm build
28+
```
29+
30+
### File naming convention
31+
32+
- Use kebab-case for file names. This is enforced at a linter level.
33+
34+
### Releases and changelogs
35+
36+
We use an automated release process based on [changesets](https://github.com/changesets/changesets) and a [Github action](./.github/workflows/release.yml) to version, release and publish the packages. Meaningful changes should be documented by running pnpm changeset and be a part of the pull request. Remember to follow semver.

biome.json

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/1.9.3/schema.json",
3+
"files": {
4+
"ignore": ["dist/"],
5+
"ignoreUnknown": true
6+
},
7+
"linter": {
8+
"enabled": true,
9+
"rules": {
10+
"recommended": true,
11+
"style": {
12+
"useFilenamingConvention": {
13+
"level": "error",
14+
"options": {
15+
"filenameCases": ["kebab-case"]
16+
}
17+
}
18+
}
19+
}
20+
},
21+
"formatter": {
22+
"enabled": true,
23+
"indentStyle": "space"
24+
},
25+
"javascript": {
26+
"formatter": {
27+
"quoteStyle": "single"
28+
}
29+
},
30+
"overrides": [
31+
{
32+
"include": [".vscode/**"],
33+
"json": {
34+
"parser": {
35+
"allowComments": true
36+
}
37+
}
38+
},
39+
{
40+
"include": ["**/package.json"],
41+
"formatter": {
42+
"lineWidth": 1
43+
}
44+
}
45+
]
46+
}

package.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"private": true,
3+
"scripts": {
4+
"build": "pnpm --filter '*' build",
5+
"build:check:types": "pnpm --parallel --filter './packages/*' exec attw --pack",
6+
"lint": "pnpm biome check .",
7+
"lint:ci": "pnpm biome ci .",
8+
"changeset": "changeset",
9+
"changeset:version": "changeset version",
10+
"changeset:release": "pnpm run build && changeset publish",
11+
"test": "vitest",
12+
"test:ci": "vitest run"
13+
},
14+
"type": "module",
15+
"devDependencies": {
16+
"@arethetypeswrong/cli": "0.17.3",
17+
"@biomejs/biome": "1.9.4",
18+
"@changesets/cli": "2.27.12",
19+
"bunchee": "6.3.2",
20+
"typescript": "5.7.3",
21+
"vitest": "3.0.4"
22+
},
23+
"engines": {
24+
"node": ">=22.11",
25+
"pnpm": "9"
26+
}
27+
}

0 commit comments

Comments
 (0)