Skip to content

Commit

Permalink
init commit
Browse files Browse the repository at this point in the history
  • Loading branch information
shixinzhu committed Aug 23, 2023
0 parents commit 0d730c0
Show file tree
Hide file tree
Showing 17 changed files with 4,203 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
root = true

[*]
indent_size = 2
end_of_line = lf
insert_final_newline = true
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: sxzz
3 changes: 3 additions & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
extends: ['github>sxzz/renovate-config'],
}
26 changes: 26 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Release

permissions:
contents: write

on:
push:
tags:
- 'v*'

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set node
uses: actions/setup-node@v3
with:
node-version: lts/*

- run: npx changelogithub
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
57 changes: 57 additions & 0 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Unit Test

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set node
uses: actions/setup-node@v3
with:
node-version: lts/*

- name: Setup
run: npm i -g @antfu/ni

- name: Install
run: nci

- name: Lint
run: nr lint

- name: Typecheck
run: nr typecheck

test:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest, windows-latest]
node: [16, 18]
fail-fast: false

steps:
- uses: actions/checkout@v3
- name: Set node ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}

- name: Setup
run: npm i -g @antfu/ni

- name: Install
run: nci

- name: Build
run: nr build

- name: Test
run: nr test
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules
dist

*.log
.DS_Store
.eslintcache
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"editor.formatOnSave": true,
"eslint.experimental.useFlatConfig": true
}
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright © 2023 三咲智子 (https://github.com/4xii)

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.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# constant-sage

[![Unit Test](https://github.com/sxzz/ts-lib-starter/actions/workflows/unit-test.yml/badge.svg)](https://github.com/sxzz/ts-lib-starter/actions/workflows/unit-test.yml)

## Install

```bash
npm i constant-sage
```

## License

[MIT](./LICENSE) License © 2023 [4xii](https://github.com/4xii)
3 changes: 3 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { sxzz } from '@sxzz/eslint-config'

export default sxzz()
63 changes: 63 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"name": "constant-sage",
"version": "0.0.0",
"packageManager": "pnpm@8.6.12",
"description": "My awesome typescript library",
"type": "module",
"license": "MIT",
"homepage": "https://github.com/4xii/ts-lib-starter#readme",
"bugs": {
"url": "https://github.com/4xii/ts-lib-starter/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/4xii/ts-lib-starter.git"
},
"files": [
"dist"
],
"main": "./dist/index.js",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"types": {
"require": "./dist/index.d.cts",
"import": "./dist/index.d.ts"
},
"require": "./dist/index.cjs",
"import": "./dist/index.js"
},
"./package.json": "./package.json"
},
"publishConfig": {
"access": "public"
},
"scripts": {
"lint": "eslint --cache .",
"lint:fix": "pnpm run lint --fix",
"build": "tsup",
"dev": "tsup --watch",
"test": "vitest",
"typecheck": "tsc --noEmit",
"release": "bumpp && pnpm publish",
"prepublishOnly": "pnpm run build"
},
"devDependencies": {
"@4xii/eslint-config": "^3.3.2",
"@4xii/prettier-config": "^1.0.4",
"@types/node": "^20.4.8",
"bumpp": "^9.1.1",
"eslint": "^8.46.0",
"fast-glob": "^3.3.1",
"prettier": "^3.0.1",
"tsup": "^7.2.0",
"tsx": "^3.12.7",
"typescript": "^5.1.6",
"vitest": "^0.34.1"
},
"engines": {
"node": ">=16.14.0"
},
"prettier": "@4xii/prettier-config"
}
Loading

0 comments on commit 0d730c0

Please sign in to comment.