Skip to content

Commit 18dee8d

Browse files
committed
0 parents  commit 18dee8d

File tree

16 files changed

+2889
-0
lines changed

16 files changed

+2889
-0
lines changed

.github/workflows/ci.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: ci
2+
on:
3+
push:
4+
paths-ignore:
5+
- "**.md"
6+
pull_request:
7+
paths-ignore:
8+
- "**.md"
9+
env:
10+
FORCE_COLOR: 3
11+
concurrency:
12+
group: ${{ github.ref }}
13+
# Only cancel concurrent builds when we are not on the default branch. This
14+
# way, if a commit breaks the default branch, we can more easily determine
15+
# which commit caused the failure.
16+
cancel-in-progress: ${{ github.ref != github.event.repository.default_branch }}
17+
jobs:
18+
ci:
19+
name: CI
20+
# Skip building tags; an identical job for the commit to which the tag
21+
# points will be triggered, making tag-based jobs superfluous.
22+
if: github.ref_type != 'tag'
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Clone
26+
uses: actions/checkout@v4
27+
with:
28+
fetch-depth: 0
29+
30+
- name: Setup pnpm
31+
uses: pnpm/action-setup@v4
32+
33+
- name: Setup Node
34+
uses: actions/setup-node@v4
35+
with:
36+
node-version-file: .nvmrc
37+
cache: pnpm
38+
39+
- name: Install Dependencies
40+
run: pnpm install --frozen-lockfile
41+
42+
- name: Lint
43+
run: pnpm lint
44+
45+
- name: Test
46+
run: pnpm test:coverage
47+
48+
- name: Build
49+
run: pnpm build

.gitignore

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# General
2+
.DS_Store
3+
.AppleDouble
4+
.LSOverride
5+
6+
/NOTES.md
7+
8+
# Icon must end with two \r
9+
Icon
10+
11+
# Thumbnails
12+
._*
13+
14+
# Files that might appear in the root of a volume
15+
.DocumentRevisions-V100
16+
.fseventsd
17+
.Spotlight-V100
18+
.TemporaryItems
19+
.Trashes
20+
.VolumeIcon.icns
21+
.com.apple.timemachine.donotpresent
22+
23+
# Directories potentially created on remote AFP share
24+
.AppleDB
25+
.AppleDesktop
26+
Network Trash Folder
27+
Temporary Items
28+
.apdisk
29+
30+
# Logs
31+
logs
32+
*.log
33+
npm-debug.log*
34+
yarn-debug.log*
35+
yarn-error.log*
36+
37+
# Runtime data
38+
pids
39+
*.pid
40+
*.seed
41+
*.pid.lock
42+
43+
# Directory for instrumented libs generated by jscoverage/JSCover
44+
lib-cov
45+
46+
# Coverage directory used by tools like istanbul
47+
coverage
48+
49+
# nyc test coverage
50+
.nyc_output
51+
52+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
53+
.grunt
54+
55+
# Bower dependency directory (https://bower.io/)
56+
bower_components
57+
58+
# node-waf configuration
59+
.lock-wscript
60+
61+
# Compiled binary addons (https://nodejs.org/api/addons.html)
62+
build/Release
63+
64+
# Dependency directories
65+
node_modules/
66+
jspm_packages/
67+
68+
# Typescript v1 declaration files
69+
typings/
70+
71+
# Optional npm cache directory
72+
.npm
73+
74+
# Optional eslint cache
75+
.eslintcache
76+
77+
# Optional REPL history
78+
.node_repl_history
79+
80+
# Output of 'npm pack'
81+
*.tgz
82+
83+
# Yarn Integrity file
84+
.yarn-integrity
85+
86+
# dotenv environment variables file
87+
.env
88+
89+
# next.js build output
90+
.next
91+
92+
# Claude Code
93+
.claude
94+
95+
# Build artifacts
96+
dist/

.husky/pre-commit

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

.nvmrc

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

.vscode/settings.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"typescript.tsdk": "node_modules/typescript/lib",
3+
"editor.defaultFormatter": "esbenp.prettier-vscode",
4+
"editor.formatOnSave": true,
5+
"editor.formatOnPaste": true,
6+
"emmet.showExpandedAbbreviation": "never",
7+
"editor.codeActionsOnSave": {
8+
"source.fixAll.biome": "explicit",
9+
"source.organizeImports.biome": "explicit"
10+
},
11+
"[typescript]": {
12+
"editor.defaultFormatter": "biomejs.biome"
13+
},
14+
"[json]": {
15+
"editor.defaultFormatter": "biomejs.biome"
16+
},
17+
"[javascript]": {
18+
"editor.defaultFormatter": "biomejs.biome"
19+
},
20+
"[jsonc]": {
21+
"editor.defaultFormatter": "biomejs.biome"
22+
},
23+
"[typescriptreact]": {
24+
"editor.defaultFormatter": "biomejs.biome"
25+
},
26+
"cSpell.words": ["publint", "tsdown", "ultracite", "unbundle"],
27+
"[javascript][typescript][javascriptreact][typescriptreact][json][jsonc][css][graphql]": {
28+
"editor.defaultFormatter": "biomejs.biome"
29+
}
30+
}

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
This is a [template repository][template-repository-url] that can be used to
2+
quickly bootstrap new Node libraries.
3+
4+
The minimal (but robust) toolchain consists of [`tsdown`][tsdown],
5+
[`vitest`][vitest], and [`ultracite`][ultracite].
6+
7+
Click **Use this template** at the top-right of this page to clone this
8+
repository, or:
9+
10+
<p align="center">
11+
<a href="https://codesandbox.io/p/github/darkobits/ts-template/codesandbox?embed=1&file=%2Fsrc%2Findex.ts&showConsole=true">
12+
<img width="160" alt="Edit on Codesandbox" src="https://github.com/user-attachments/assets/fa81ea3b-3bd6-421c-85fd-772c1dee77a8">
13+
</a>
14+
</p>
15+
16+
[tsdown]: https://tsdown.dev
17+
[vitest]: https://vitest.dev
18+
[ultracite]: https://www.ultracite.ai
19+
[template-repository-url]: https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template?search-overlay-input=template+repository#about-repository-templates

biome.json

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/2.0.6/schema.json",
3+
"extends": ["ultracite"],
4+
"vcs": {
5+
"enabled": false,
6+
"clientKind": "git",
7+
"useIgnoreFile": true
8+
},
9+
"files": {
10+
"ignoreUnknown": false,
11+
"includes": ["**", "!dist/**"]
12+
},
13+
"formatter": {
14+
"enabled": true,
15+
"indentWidth": 2,
16+
"indentStyle": "space",
17+
"lineWidth": 120
18+
},
19+
"linter": {
20+
"enabled": true,
21+
"rules": {
22+
"recommended": true
23+
}
24+
},
25+
"javascript": {
26+
"formatter": {
27+
"quoteStyle": "single",
28+
"jsxQuoteStyle": "single",
29+
"semicolons": "asNeeded",
30+
"trailingCommas": "none"
31+
}
32+
},
33+
"json": {
34+
"formatter": {
35+
"enabled": true,
36+
"lineWidth": 120
37+
}
38+
},
39+
"assist": {
40+
"enabled": true,
41+
"actions": {
42+
"source": {
43+
"organizeImports": "on"
44+
}
45+
}
46+
}
47+
}

package.json

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
"name": "project-name-here",
3+
"version": "0.1.0",
4+
"private": true,
5+
"description": "Project description here.",
6+
"repository": {
7+
"type": "git",
8+
"url": "git+https://repository/url/here"
9+
},
10+
"license": "project-license-here",
11+
"author": "Author Name Here <[email protected]>",
12+
"type": "module",
13+
"exports": {
14+
".": "./dist/index.js",
15+
"./lib/add": "./dist/lib/add.js",
16+
"./package.json": "./package.json"
17+
},
18+
"main": "./dist/index.js",
19+
"module": "./dist/index.js",
20+
"types": "./dist/index.d.ts",
21+
"files": [
22+
"dist"
23+
],
24+
"scripts": {
25+
"build": "tsdown",
26+
"dev": "tsdown --watch src",
27+
"format": "ultracite format",
28+
"prepare": "husky",
29+
"lint": "ultracite lint",
30+
"test": "vitest --run",
31+
"test:coverage": "vitest --run --coverage",
32+
"test:watch": "vitest",
33+
"tsc": "tsc",
34+
"tsc:watch": "tsc --watch"
35+
},
36+
"lint-staged": {
37+
"*.{js,jsx,ts,tsx,json,jsonc,css,scss,md,mdx}": [
38+
"pnpm ultracite format"
39+
]
40+
},
41+
"devDependencies": {
42+
"@biomejs/biome": "2.0.6",
43+
"@types/node": "^24.0.7",
44+
"@vitest/coverage-v8": "^3.2.4",
45+
"@vitest/ui": "^3.2.4",
46+
"husky": "^9.1.7",
47+
"lint-staged": "^16.1.2",
48+
"publint": "^0.3.12",
49+
"tsdown": "^0.12.9",
50+
"typescript": "^5.8.3",
51+
"ultracite": "^5.0.32",
52+
"unplugin-unused": "^0.5.1",
53+
"vite": "^7.0.0",
54+
"vitest": "^3.2.4"
55+
},
56+
"packageManager": "[email protected]+sha512.5ea8b0deed94ed68691c9bad4c955492705c5eeb8a87ef86bc62c74a26b037b08ff9570f108b2e4dbd1dd1a9186fea925e527f141c648e85af45631074680184",
57+
"engines": {
58+
"node": ">=22",
59+
"pnpm": ">=10"
60+
},
61+
"engineStrict": true
62+
}

0 commit comments

Comments
 (0)