Skip to content

Commit dec54c3

Browse files
committed
chore: template setup
configured with: - solid-js - tsup - bun - nvm - typescript - vitest - eslint - prettier
0 parents  commit dec54c3

28 files changed

+2075
-0
lines changed

.changeset/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

.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.1.1/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/CODEOWNERS

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

.github/workflows/ci.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
branches:
8+
- main
9+
workflow_dispatch:
10+
11+
jobs:
12+
quality-checks:
13+
name: Quality Checks
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
- name: Setup Bun
19+
uses: oven-sh/setup-bun@v1
20+
with:
21+
bun-version: 1.2.12
22+
- name: Install Dependencies
23+
run: bun install --frozen-lockfile
24+
- name: Type Check
25+
run: bun run typecheck
26+
- name: Lint Check
27+
run: bun run lint
28+
- name: Format Check
29+
run: bun run format

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
coverage
2+
dist
3+
node_modules
4+
5+
.env
6+
.DS_Store
7+
/*.tgz

.nvmrc

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

.vscode/settings.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"editor.codeActionsOnSave": {
3+
"source.fixAll": "always"
4+
},
5+
"editor.formatOnSave": true,
6+
"editor.rulers": [100],
7+
"files.autoSave": "onFocusChange",
8+
"files.insertFinalNewline": true,
9+
"editor.tabSize": 2,
10+
"editor.trimAutoWhitespace": true
11+
}

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 Daniel Sanchez
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: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
<p>
2+
<img width="100%" src="https://assets.solidjs.com/banner?type=Ecosystem&background=tiles&project=library-name" alt="solid-create-script">
3+
</p>
4+
5+
# Template: SolidJS Library
6+
7+
Template for [SolidJS](https://www.solidjs.com/) library package. Bundling of the library is managed by [tsup](https://tsup.egoist.dev/).
8+
9+
Other things configured include:
10+
11+
- Bun (for dependency management and running scripts)
12+
- TypeScript
13+
- ESLint / Prettier
14+
- Solid Testing Library + Vitest (for testing)
15+
- Playground app using library
16+
- Simple Bun server scaffolding for playground app
17+
- Support for publishing to NPM and JSR
18+
- GitHub Actions (for all CI/CD)
19+
20+
## Getting Started
21+
22+
Some pre-requisites before install dependencies:
23+
24+
- Install Node Version Manager (NVM)
25+
```bash
26+
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
27+
```
28+
- Install Bun
29+
```bash
30+
curl -fsSL https://bun.sh/install | bash
31+
```
32+
33+
### Installing Dependencies
34+
35+
```bash
36+
nvm use
37+
bun install
38+
```
39+
40+
### Local Development Build
41+
42+
```bash
43+
bun start
44+
bun start:server # entirely optional to use
45+
```
46+
47+
### Linting & Formatting
48+
49+
```bash
50+
bun run lint # checks source for lint violations
51+
bun run format # checks source for format violations
52+
53+
bun run lint:fix # fixes lint violations
54+
bun run format:fix # fixes format violations
55+
```
56+
57+
### Building the Library
58+
59+
This template uses [tsup-preset-solid](https://github.com/solidjs-community/tsup-preset-solid) to build and bundle the library
60+
61+
```bash
62+
bun run build
63+
```
64+
65+
### Publishing the Library
66+
67+
This template also comes with Changeset pre-configured and three utility scripts. You must have Changeset installed to leverage them.
68+
69+
```bash
70+
bun pkg:changeset # run Changeset CLI
71+
bun pkg:version # consume any changeset to produce package manifest updates
72+
bun pkg:publish # git tag and publish the package to NPM via Changeset
73+
```
74+
75+
Another thing to note is the template includes a `jsr.json` config to support publishing to JSR alongside NPM if interested. To publish to JSR, you can run:
76+
77+
```bash
78+
bunx jsr publish # publishes to JSR
79+
bunx jsr publish --dry-run # checks if library is publishable
80+
```
81+
82+
> Note: For JSR publishing, Changeset does not update the jsr.json file after running `bun pkg:publish` so you have to manually update the version by hand after changeset has run.
83+
84+
### Contributing
85+
86+
The only requirements when contributing are:
87+
88+
- You keep a clean git history in your branch
89+
- rebasing `main` instead of making merge commits.
90+
- Using proper commit message formats that adhere to [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/)
91+
- Additionally, squashing (via rebase) commits that are not [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/)
92+
- CI checks pass before merging into `main`

0 commit comments

Comments
 (0)