Skip to content

Commit 1254181

Browse files
authored
Initial commit
0 parents  commit 1254181

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+19069
-0
lines changed

.browserslistrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
extends @1stg/browserslist-config/modern

.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: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/config/schema.json",
3+
"changelog": [
4+
"@changesets/changelog-github",
5+
{
6+
"repo": "un-ts/lib-boilerplate"
7+
}
8+
],
9+
"commit": false,
10+
"linked": [],
11+
"access": "public",
12+
"baseBranch": "main",
13+
"updateInternalDependencies": "patch",
14+
"ignore": []
15+
}

.codesandbox/ci.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"node": "20",
3+
"sandboxes": []
4+
}

.commitlintrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "@1stg"
3+
}

.editorconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
root=true
2+
3+
[*]
4+
indent_style=space
5+
indent_size=2
6+
tab_width=2
7+
end_of_line=lf
8+
charset=utf-8
9+
trim_trailing_whitespace=true
10+
insert_final_newline=true

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
* text=auto eol=lf
2+
yarn.lock -diff

.github/workflows/autofix.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: autofix.ci # For security reasons, the workflow in which the autofix.ci action is used must be named "autofix.ci".
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- reopened
8+
- synchronize
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
autofix:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout Repo
19+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
20+
21+
- name: Setup Node.js LTS
22+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
23+
with:
24+
node-version: lts/*
25+
cache: yarn
26+
27+
- name: Install dependencies
28+
run: yarn --immutable
29+
30+
- name: Format Codes
31+
run: yarn format
32+
33+
- name: Apply autofix.ci
34+
uses: autofix-ci/action@2891949f3779a1cafafae1523058501de3d4e944 # v1
35+
with:
36+
fail-fast: false

.github/workflows/ci.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: CI
2+
3+
on:
4+
- push
5+
- pull_request
6+
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
10+
11+
jobs:
12+
ci:
13+
name: Lint and Test with Node.js ${{ matrix.node }} on ${{ matrix.os }}
14+
strategy:
15+
matrix:
16+
node:
17+
- 18
18+
- 20
19+
- 22
20+
os:
21+
- macos-latest
22+
- windows-latest
23+
- ubuntu-latest
24+
fail-fast: false
25+
runs-on: ${{ matrix.os }}
26+
steps:
27+
- name: Checkout Repo
28+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
29+
30+
- name: Setup Node.js ${{ matrix.node }}
31+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
32+
with:
33+
node-version: ${{ matrix.node }}
34+
cache: yarn
35+
36+
- name: Install Dependencies
37+
run: yarn --immutable
38+
39+
- name: Build, Lint and Test
40+
run: yarn run-s build lint test
41+
env:
42+
PARSER_NO_WATCH: true
43+
44+
- name: Codecov
45+
uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3
46+
with:
47+
token: ${{ secrets.CODECOV_TOKEN }}
48+
49+
- name: Run codacy-coverage-reporter
50+
# bad Windows -- https://github.com/codacy/codacy-coverage-reporter-action/issues/91
51+
if: ${{ !github.event.pull_request.head.repo.fork && matrix.os != 'windows-latest' }}
52+
uses: codacy/codacy-coverage-reporter-action@89d6c85cfafaec52c72b6c5e8b2878d33104c699 # v1.3.0
53+
continue-on-error: true
54+
with:
55+
api-token: ${{ secrets.CODACY_API_TOKEN }}

.github/workflows/pkg-pr-new.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Publish Any Commit
2+
on:
3+
- push
4+
- pull_request
5+
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.ref }}
8+
cancel-in-progress: true
9+
10+
jobs:
11+
publish:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout Repo
16+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
17+
18+
- name: Setup Node.js LTS
19+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
20+
with:
21+
node-version: lts/*
22+
cache: yarn
23+
24+
- name: Install dependencies
25+
run: yarn --immutable
26+
27+
- name: Build
28+
run: yarn build
29+
30+
- name: Publish
31+
run: yarn dlx pkg-pr-new publish --compact

.github/workflows/pkg-size.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Package Size Report
2+
3+
on:
4+
- pull_request
5+
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.ref }}
8+
cancel-in-progress: true
9+
10+
jobs:
11+
pkg-size-report:
12+
name: Package Size Report
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
18+
19+
- name: Package Size Report
20+
uses: pkg-size/action@a637fb0897b6f14f18e776d8c3dbccb34a1ad27b # v1
21+
continue-on-error: true
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
permissions:
13+
contents: write
14+
id-token: write
15+
pull-requests: write
16+
17+
jobs:
18+
release:
19+
name: Release
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout Repo
23+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
24+
with:
25+
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
26+
fetch-depth: 0
27+
28+
- name: Setup Node.js LTS
29+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
30+
with:
31+
node-version: lts/*
32+
cache: yarn
33+
34+
- name: Install Dependencies
35+
run: yarn --immutable
36+
37+
- name: Create Release Pull Request or Publish to npm
38+
uses: changesets/action@v1
39+
with:
40+
commit: 'chore: release lib-boilerplate'
41+
title: 'chore: release lib-boilerplate'
42+
version: yarn run version
43+
publish: yarn release
44+
env:
45+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46+
NPM_CONFIG_PROVENANCE: true
47+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/size-limit.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Size Limit
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
size-limit:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
17+
18+
- name: Setup Node.js LTS
19+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
20+
with:
21+
node-version: lts/*
22+
cache: yarn
23+
24+
- name: Install Dependencies
25+
run: yarn --immutable
26+
27+
- name: Check Size Limit
28+
uses: andresz1/size-limit-action@e7493a72a44b113341c0cf6186ab49c17c4b65c1 # v1
29+
with:
30+
github_token: ${{ secrets.GITHUB_TOKEN }}
31+
skip_step: install
32+
script: yarn size-limit --json

.github/workflows/vercel.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Vercel Deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request: null
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
deploy:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
18+
19+
- name: Check Branch
20+
id: branch
21+
if: ${{ github.ref == 'refs/heads/main' }}
22+
run: |
23+
echo "args=--prod" >> $GITHUB_OUTPUT
24+
echo "comment=false" >> $GITHUB_OUTPUT
25+
26+
- name: Deploy
27+
uses: amondnet/vercel-action@16e87c0a08142b0d0d33b76aeaf20823c381b9b9 # v25
28+
with:
29+
vercel-args: ${{ steps.branch.outputs.args }}
30+
vercel-token: ${{ secrets.VERCEL_TOKEN }}
31+
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
32+
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
33+
github-comment: ${{ steps.branch.outputs.comment != 'false' }}
34+
github-token: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.*cache
2+
.type-coverage
3+
.vercel
4+
.yarn/*
5+
!.yarn/releases
6+
!.yarn/plugins
7+
coverage
8+
dist
9+
lib
10+
node_modules

.markuplintrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "@1stg/markuplint-config"
3+
}

.nano-staged.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default } from '@1stg/nano-staged/tsc'

.nvmrc

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

.postcssrc.cjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require('@1stg/postcss-config')()

.prettierignore

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

.prettierrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"@1stg/prettier-config"

.remarkrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"plugins": [
3+
"@1stg/preset"
4+
]
5+
}

.renovaterc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"extends": [
3+
"github>1stG/configs"
4+
]
5+
}

.simple-git-hooks.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default } from '@1stg/simple-git-hooks'

.size-limit.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[
2+
{
3+
"path": "./lib/index.js",
4+
"limit": "50B"
5+
}
6+
]

.stylelintignore

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
coverage
2+
dist
3+
lib
4+
LICENSE
5+
*.cjs
6+
*.cts
7+
*.js
8+
*.json
9+
*.jsx
10+
*.lock
11+
*.log
12+
*.mjs
13+
*.mts
14+
*.patch
15+
*.ts
16+
*.tsx
17+
*.yaml
18+
*.yml

.stylelintrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "@1stg/stylelint-config"
3+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports={name:"plugin-prepare-lifecycle",factory:e=>({hooks:{afterAllInstalled(r){if(!r.topLevelWorkspace.manifest.scripts.get("prepare"))return;e("@yarnpkg/shell").execute("yarn prepare")}}})};

0 commit comments

Comments
 (0)