Skip to content

Commit f1b9c93

Browse files
authored
Added missing files and polish CONTRIBUTING.md (#143)
* Added missing files and polish CONTRIBUTING.md * Fix watch command
1 parent f1fcc8f commit f1b9c93

File tree

5 files changed

+142
-10
lines changed

5 files changed

+142
-10
lines changed

CONTRIBUTING.md

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
# Contributing
2+
3+
## Prerequisites
4+
5+
- [NodeJS](https://nodejs.org/)
6+
- [PNPM](https://pnpm.io/)
7+
8+
## Project Structure
9+
10+
This project utilizes [PNPM Workspaces](https://pnpm.io/workspaces) with the following structure:
11+
```
12+
├── packages/
13+
│ └── floating-ui-svelte/ # Package
14+
└── sites/
15+
└── floating-ui-svelte.vercel.app/ # Documentation
16+
```
17+
18+
## Development
19+
20+
1. Fork and clone the repository
21+
2. Install dependencies: `pnpm i`
22+
3. Start development: `pnpm build:watch`
23+
24+
## Branch
25+
26+
All pull requests should be created against the `main` branch.
27+
28+
### Branch Conventions
29+
30+
Please use the following naming convention when creating your pull request.
31+
32+
| Branch | Role |
33+
| --- | --- |
34+
| `docs/*` | Updates for the documentation site. |
35+
| `feature/*` | When implementing a new feature. |
36+
| `chore/*` | When implementing small changes. |
37+
| `bugfix/*` | When implementing feature bugfixes. |
38+
39+
Keep branch names short and semantic, using dashes to separate words.
40+
41+
```
42+
docs/getting-started-typo-fix
43+
bugfix/fixed-use-floating-bug
44+
```
45+
46+
## Changesets
47+
48+
[Changesets](https://github.com/changesets/changesets) are used to automatically generate the changelog for each release. Any contributions made to projects that live within the `/lib` directory must contain a Changeset. Use the following instructions to generate a changeset.
49+
50+
1. Make sure you're within local pull request feature branch.
51+
2. Navigate to the root of the project.
52+
3. Run `pnpm changeset` to trigger the Changeset CLI.
53+
4. Follow the instructions when prompted.
54+
5. Changeset are added to the `/.changeset` directory.
55+
6. Commit and push the new changeset file.
56+
57+
Changesets use semantic version. We recommend the following convention.
58+
59+
| Version | Role |
60+
| --- | --- |
61+
| `major` | Do not use. Reserved for maintainers. |
62+
| `minor` | For notable changes, such as a new features. |
63+
| `patch` | For small changes, such as a chore or typo. |
64+
65+
Changeset descriptions will appear verbatim on the [Changelog](https://github.com/skeletonlabs/skeleton/blob/dev/packages/skeleton/CHANGELOG.md). Keep it short, semantic, and prefix this like branch names.
66+
67+
```md
68+
---
69+
'@skeletonlabs/floating-ui-svelte': minor
70+
---
71+
72+
feat: Added a new useFoo hook.
73+
```
74+
75+
> [!CAUTION]
76+
> Only add a changeset when the change affects the library, documentation changes for example will not require a changeset.
77+
78+
## Tooling
79+
80+
### Formatting
81+
82+
This project makes use of [Biome](https://biomejs.dev/), to run the formatter:
83+
84+
```bash
85+
pnpm format
86+
```
87+
88+
### Testing
89+
90+
This project makes use of [Vitest](https://vitest.dev/), to run the tests:
91+
92+
```bash
93+
pnpm test
94+
```
95+
96+
To test and watch:
97+
98+
```bash
99+
pnpm test:watch
100+
```
101+
102+
### Building
103+
104+
This project makes use of [Svelte Package](https://svelte.dev/docs/kit/packaging), to run the build:
105+
106+
```bash
107+
pnpm build
108+
```
109+
110+
To build and watch:
111+
112+
```bash
113+
pnpm build:watch
114+
```

LICENSE.txt

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) 2024-PRESENT Skeleton Labs, LLC
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.

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
"scripts": {
55
"format": "biome check . --write",
66
"format:check": "biome check .",
7-
"build": "pnpm -r build",
8-
"build:watch": "pnpm -r build:watch",
9-
"test": "pnpm -r test",
10-
"test:watch": "pnpm -r test:watch",
11-
"sync": "pnpm -r sync",
7+
"build": "pnpm --recursive build",
8+
"build:watch": "pnpm --recursive --parallel build:watch",
9+
"test": "pnpm --recursive test",
10+
"test:watch": "pnpm --recursive test:watch",
11+
"sync": "pnpm --recursive sync",
1212
"postinstall": "pnpm sync"
1313
},
1414
"devDependencies": {

packages/floating-ui-svelte/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@
99
"postinstall": "svelte-kit sync",
1010
"sync": "pnpm build"
1111
},
12-
"files": [
13-
"dist"
14-
],
12+
"files": ["dist"],
1513
"sideEffects": false,
1614
"svelte": "./dist/index.js",
1715
"types": "./dist/index.d.ts",

sites/floating-ui-svelte.vercel.app/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@
44
"version": "0.0.1",
55
"type": "module",
66
"scripts": {
7-
"dev": "vite dev",
87
"build": "vite build && pagefind",
9-
"preview": "vite preview",
8+
"build:watch": "vite dev",
109
"sync": "svelte-kit sync"
1110
},
1211
"devDependencies": {

0 commit comments

Comments
 (0)