Skip to content

Feat Workflows, LICENSE and updated README #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Lint
on:
workflow_call:

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout the repository
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
cache: yarn

- name: Install project dependencies
run: yarn install

- name: Check
run: yarn run check

- name: Check eslint
run: yarn run eslint-check

- name: Check prettier
run: yarn run prettier-check
18 changes: 18 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Main
on:
workflow_dispatch:
push:
branches: [main]
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true

jobs:
lint:
uses: ./.github/workflows/lint.yml
secrets: inherit

release:
needs: lint
uses: ./.github/workflows/release.yml
secrets: inherit
12 changes: 12 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Pull Request
on:
pull_request:
types: [opened, synchronize]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
lint:
uses: ./.github/workflows/lint.yml
secrets: inherit
35 changes: 35 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Release
on:
workflow_call:
secrets:
NPM_TOKEN:
required: true

jobs:
release:
name: Release
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout the repository
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
cache: yarn

- name: Install project dependencies
run: yarn install

- name: Build project
run: yarn build

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
createGithubReleases: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2025 Chialab

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# SvelteKit Utils

**SvelteKit Utils** is a set of libraries and utilities to improve the development experience with [SvelteKit](https://kit.svelte.dev/).

## Usage

Package is distribuited as NPM packages through the official NPM registry.

### Install

Then, you can use the `npm` cli or the `yarn` package manager to install the package as a dependency:

```
npm install @chialab/sveltekit-utils
```

```
yarn add @chialab/sveltekit-utils
```

## License

**SvelteKit Utils** are released under the [MIT](https://github.com/chialab/sveltekit-utils/blob/main/LICENSE) license.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@
"eslint-fix": "eslint --fix --ignore-path .gitignore . --ext .js,.cjs,.ts,.svelte",
"prettier-check": "prettier --check \"./**/*.{json,css,js,cjs,ts,svelte}\"",
"prettier-fix": "prettier --write \"./**/*.{json,css,js,cjs,ts,svelte}\"",
"lint-fix-all": "yarn eslint-fix && yarn prettier-fix",
"publish": "yarn npm publish --tolerate-republish; git tag \"v$(node -e 'console.log(require(\"./package.json\").version);')\" || true"
"lint-fix-all": "yarn eslint-fix && yarn prettier-fix"
},
"dependencies": {
"cookie": "^1.0.2",
Expand Down
Loading