Skip to content

Commit 7259bd2

Browse files
committed
0 parents  commit 7259bd2

File tree

17 files changed

+5769
-0
lines changed

17 files changed

+5769
-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/

.nvmrc

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

.vscode/settings.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"typescript.tsdk": "node_modules/typescript/lib",
3+
"[javascript][typescript][javascriptreact][typescriptreact][json][jsonc]": {
4+
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
5+
"editor.formatOnSave": true,
6+
"editor.codeActionsOnSave": {
7+
"source.fixAll.eslint": "explicit"
8+
}
9+
},
10+
"cSpell.words": [
11+
"publint",
12+
"tsdown",
13+
"unbundle"
14+
]
15+
}

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
This is a template repository that can be used to quickly bootstrap new Node
2+
libraries. The minimal but robust toolchain consists of [`tsdown`][tsdown],
3+
[`vitest`][vitest], [`eslint`][eslint], and [`release-it`][release-it].
4+
5+
Click **Use this template** at the top-right of this page to clone this
6+
repository.
7+
8+
[tsdown]: https://tsdown.dev
9+
[vitest]: https://vitest.dev
10+
[eslint]: https://www.eslint.org
11+
[release-it]: https://github.com/release-it/release-it

eslint.config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import { configs } from '@darkobits/eslint-config'
2+
import { defineConfig } from 'eslint/config'
3+
4+
export default defineConfig(configs.ts)

package.json

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
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.git"
9+
},
10+
"license": "SEE LICENSE IN LICENSE",
11+
"author": "Author Name Here <author.name.here@email.com>",
12+
"type": "module",
13+
"exports": {
14+
".": "./dist/index.js",
15+
"./lib/add": "./dist/lib/add.js",
16+
"./lib/subtract": "./dist/lib/subtract.js",
17+
"./package.json": "./package.json"
18+
},
19+
"main": "./dist/index.js",
20+
"module": "./dist/index.js",
21+
"types": "./dist/index.d.ts",
22+
"files": [
23+
"dist"
24+
],
25+
"scripts": {
26+
"build": "tsdown",
27+
"dev": "tsdown --watch src",
28+
"lint": "eslint --cache",
29+
"lint:fix": "eslint --fix --cache",
30+
"test": "vitest --run",
31+
"test:coverage": "vitest --run --coverage",
32+
"test:watch": "vitest",
33+
"tsc": "tsc",
34+
"tsc:watch": "tsc --watch"
35+
},
36+
"devDependencies": {
37+
"@darkobits/eslint-config": "4.0.0-beta.7",
38+
"@types/node": "^24.0.7",
39+
"@vitest/coverage-v8": "^3.2.4",
40+
"@vitest/ui": "^3.2.4",
41+
"eslint": "^9.36.0",
42+
"publint": "^0.3.12",
43+
"tsdown": "^0.12.9",
44+
"typescript": "^5.8.3",
45+
"unplugin-unused": "^0.5.1",
46+
"vitest": "^3.2.4"
47+
},
48+
"packageManager": "pnpm@10.22.0",
49+
"engines": {
50+
"node": ">=22",
51+
"pnpm": ">=10"
52+
},
53+
"engineStrict": true
54+
}

0 commit comments

Comments
 (0)