chore: init
This commit is contained in:
commit
30083154a8
23 changed files with 6418 additions and 0 deletions
76
.github/CODE_OF_CONDUCT.md
vendored
Normal file
76
.github/CODE_OF_CONDUCT.md
vendored
Normal file
|
|
@ -0,0 +1,76 @@
|
||||||
|
# Contributor Covenant Code of Conduct
|
||||||
|
|
||||||
|
## Our Pledge
|
||||||
|
|
||||||
|
In the interest of fostering an open and welcoming environment, we as
|
||||||
|
contributors and maintainers pledge to making participation in our project and
|
||||||
|
our community a harassment-free experience for everyone, regardless of age, body
|
||||||
|
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
||||||
|
level of experience, education, socio-economic status, nationality, personal
|
||||||
|
appearance, race, religion, or sexual identity and orientation.
|
||||||
|
|
||||||
|
## Our Standards
|
||||||
|
|
||||||
|
Examples of behavior that contributes to creating a positive environment
|
||||||
|
include:
|
||||||
|
|
||||||
|
* Using welcoming and inclusive language
|
||||||
|
* Being respectful of differing viewpoints and experiences
|
||||||
|
* Gracefully accepting constructive criticism
|
||||||
|
* Focusing on what is best for the community
|
||||||
|
* Showing empathy towards other community members
|
||||||
|
|
||||||
|
Examples of unacceptable behavior by participants include:
|
||||||
|
|
||||||
|
* The use of sexualized language or imagery and unwelcome sexual attention or
|
||||||
|
advances
|
||||||
|
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||||
|
* Public or private harassment
|
||||||
|
* Publishing others' private information, such as a physical or electronic
|
||||||
|
address, without explicit permission
|
||||||
|
* Other conduct which could reasonably be considered inappropriate in a
|
||||||
|
professional setting
|
||||||
|
|
||||||
|
## Our Responsibilities
|
||||||
|
|
||||||
|
Project maintainers are responsible for clarifying the standards of acceptable
|
||||||
|
behavior and are expected to take appropriate and fair corrective action in
|
||||||
|
response to any instances of unacceptable behavior.
|
||||||
|
|
||||||
|
Project maintainers have the right and responsibility to remove, edit, or
|
||||||
|
reject comments, commits, code, wiki edits, issues, and other contributions
|
||||||
|
that are not aligned to this Code of Conduct, or to ban temporarily or
|
||||||
|
permanently any contributor for other behaviors that they deem inappropriate,
|
||||||
|
threatening, offensive, or harmful.
|
||||||
|
|
||||||
|
## Scope
|
||||||
|
|
||||||
|
This Code of Conduct applies both within project spaces and in public spaces
|
||||||
|
when an individual is representing the project or its community. Examples of
|
||||||
|
representing a project or community include using an official project e-mail
|
||||||
|
address, posting via an official social media account, or acting as an appointed
|
||||||
|
representative at an online or offline event. Representation of a project may be
|
||||||
|
further defined and clarified by project maintainers.
|
||||||
|
|
||||||
|
## Enforcement
|
||||||
|
|
||||||
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||||
|
reported by contacting the project team.
|
||||||
|
All complaints will be reviewed and investigated and will result in a response that
|
||||||
|
is deemed necessary and appropriate to the circumstances. The project team is
|
||||||
|
obligated to maintain confidentiality with regard to the reporter of an incident.
|
||||||
|
Further details of specific enforcement policies may be posted separately.
|
||||||
|
|
||||||
|
Project maintainers who do not follow or enforce the Code of Conduct in good
|
||||||
|
faith may face temporary or permanent repercussions as determined by other
|
||||||
|
members of the project's leadership.
|
||||||
|
|
||||||
|
## Attribution
|
||||||
|
|
||||||
|
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
||||||
|
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
||||||
|
|
||||||
|
[homepage]: https://www.contributor-covenant.org
|
||||||
|
|
||||||
|
For answers to common questions about this code of conduct, see
|
||||||
|
https://www.contributor-covenant.org/faq
|
||||||
1
.github/CONTRIBUTING.md
vendored
Normal file
1
.github/CONTRIBUTING.md
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
Please refer to https://github.com/kirklin/contribute
|
||||||
5
.github/FUNDING.yml
vendored
Normal file
5
.github/FUNDING.yml
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
# These are supported funding model platforms
|
||||||
|
|
||||||
|
github: kirklin # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||||
|
patreon: kirklin # Replace with a single Patreon username
|
||||||
|
custom: ["https://www.buymeacoffee.com/linkirk"]
|
||||||
49
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal file
49
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal file
|
|
@ -0,0 +1,49 @@
|
||||||
|
name: 🐞 Bug report
|
||||||
|
description: Report an issue
|
||||||
|
labels: [pending triage]
|
||||||
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
Thanks for taking the time to fill out this bug report!
|
||||||
|
- type: textarea
|
||||||
|
id: bug-description
|
||||||
|
attributes:
|
||||||
|
label: Describe the bug
|
||||||
|
description: A clear and concise description of what the bug is. If you intend to submit a PR for this issue, tell us in the description. Thanks!
|
||||||
|
placeholder: Bug description
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: input
|
||||||
|
id: reproduction
|
||||||
|
attributes:
|
||||||
|
label: Reproduction
|
||||||
|
description: A [minimal reproduction](https://stackoverflow.com/help/minimal-reproducible-example) is **required**, otherwise the issue might be closed without further notice.
|
||||||
|
placeholder: Reproduction
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: system-info
|
||||||
|
attributes:
|
||||||
|
label: System Info
|
||||||
|
description: Output of `npx envinfo --system --binaries --browsers`
|
||||||
|
render: Shell
|
||||||
|
placeholder: System, Binaries, Browsers
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: checkboxes
|
||||||
|
id: checkboxes
|
||||||
|
attributes:
|
||||||
|
label: Validations
|
||||||
|
description: Before submitting the issue, please make sure you do the following
|
||||||
|
options:
|
||||||
|
- label: Follow our [Code of Conduct](https://github.com/kirklin/.github/blob/main/CODE_OF_CONDUCT.md)
|
||||||
|
required: true
|
||||||
|
- label: Read the [Contributing Guide](https://github.com/kirklin/contribute).
|
||||||
|
required: true
|
||||||
|
- label: Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
|
||||||
|
required: true
|
||||||
|
- label: Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
|
||||||
|
required: true
|
||||||
|
- label: The provided reproduction is a [minimal reproducible](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.
|
||||||
|
required: true
|
||||||
4
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
4
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
contact_links:
|
||||||
|
- name: 🙌 Contribution Guide
|
||||||
|
url: https://github.com/kirklin/contribute
|
||||||
|
about: Please read through before making contributions.
|
||||||
44
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
Normal file
44
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
Normal file
|
|
@ -0,0 +1,44 @@
|
||||||
|
name: 🚀 New feature proposal
|
||||||
|
description: Propose a new feature
|
||||||
|
labels: [enhancement]
|
||||||
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
Thanks for your interest in the project and taking the time to fill out this feature report!
|
||||||
|
- type: textarea
|
||||||
|
id: feature-description
|
||||||
|
attributes:
|
||||||
|
label: Clear and concise description of the problem
|
||||||
|
description: "We want [goal / wish] so that [benefit]. If you intend to submit a PR for this issue, tell us in the description. Thanks!"
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: suggested-solution
|
||||||
|
attributes:
|
||||||
|
label: Suggested solution
|
||||||
|
description: "In module [xy] we could provide following implementation..."
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: alternative
|
||||||
|
attributes:
|
||||||
|
label: Alternative
|
||||||
|
description: Clear and concise description of any alternative solutions or features you've considered.
|
||||||
|
- type: textarea
|
||||||
|
id: additional-context
|
||||||
|
attributes:
|
||||||
|
label: Additional context
|
||||||
|
description: Any other context or screenshots about the feature request here.
|
||||||
|
- type: checkboxes
|
||||||
|
id: checkboxes
|
||||||
|
attributes:
|
||||||
|
label: Validations
|
||||||
|
description: Before submitting the issue, please make sure you do the following
|
||||||
|
options:
|
||||||
|
- label: Follow our [Code of Conduct](https://github.com/kirklin/.github/blob/main/CODE_OF_CONDUCT.md)
|
||||||
|
required: true
|
||||||
|
- label: Read the [Contributing Guide](https://github.com/kirklin/contribute).
|
||||||
|
required: true
|
||||||
|
- label: Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
|
||||||
|
required: true
|
||||||
15
.github/ISSUE_TEMPLATE/typo.yml
vendored
Normal file
15
.github/ISSUE_TEMPLATE/typo.yml
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
name: 👀 Typo / Grammar fix
|
||||||
|
description: You can just go ahead and send a PR! Thank you!
|
||||||
|
labels: []
|
||||||
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
## PR Welcome!
|
||||||
|
|
||||||
|
If the typo / grammar issue is trivial and straightforward, you can help by **directly sending a quick pull request**!
|
||||||
|
If you spot multiple of them, we suggest combining them into a single PR. Thanks!
|
||||||
|
- type: textarea
|
||||||
|
id: context
|
||||||
|
attributes:
|
||||||
|
label: Additional context
|
||||||
33
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
33
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
<!-- DO NOT IGNORE THE TEMPLATE!
|
||||||
|
|
||||||
|
Thank you for contributing!
|
||||||
|
|
||||||
|
Before submitting the PR, please make sure you do the following:
|
||||||
|
|
||||||
|
- Read the [Contributing Guide](https://github.com/kirklin/contribute).
|
||||||
|
- Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
|
||||||
|
- Provide a description in this PR that addresses **what** the PR is solving, or reference the issue that it solves (e.g. `fixes #123`).
|
||||||
|
- Ideally, include relevant tests that fail without this PR but pass with it.
|
||||||
|
- Added necessary documentation (if appropriate)
|
||||||
|
|
||||||
|
-->
|
||||||
|
## Proposed changes
|
||||||
|
|
||||||
|
<!-- Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue. -->
|
||||||
|
|
||||||
|
## Types of changes
|
||||||
|
|
||||||
|
What types of changes does your code introduce?
|
||||||
|
_Put an `x` in the boxes that apply_
|
||||||
|
|
||||||
|
- [ ] Bugfix (non-breaking change which fixes an issue)
|
||||||
|
- [ ] New feature (non-breaking change which adds functionality)
|
||||||
|
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
||||||
|
- [ ] Documentation Update (if none of the other choices apply)
|
||||||
|
|
||||||
|
## Linked Issues
|
||||||
|
|
||||||
|
|
||||||
|
## Further comments
|
||||||
|
|
||||||
|
<!-- If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc... -->
|
||||||
90
.github/workflows/ci.yml
vendored
Normal file
90
.github/workflows/ci.yml
vendored
Normal file
|
|
@ -0,0 +1,90 @@
|
||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Install pnpm
|
||||||
|
uses: pnpm/action-setup@v2
|
||||||
|
|
||||||
|
- name: Set node
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: 16.x
|
||||||
|
cache: pnpm
|
||||||
|
|
||||||
|
- name: Setup
|
||||||
|
run: npm i -g @antfu/ni
|
||||||
|
|
||||||
|
- name: Install
|
||||||
|
run: nci
|
||||||
|
|
||||||
|
- name: Lint
|
||||||
|
run: nr lint
|
||||||
|
|
||||||
|
typecheck:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Install pnpm
|
||||||
|
uses: pnpm/action-setup@v2
|
||||||
|
|
||||||
|
- name: Set node
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: 16.x
|
||||||
|
cache: pnpm
|
||||||
|
|
||||||
|
- name: Setup
|
||||||
|
run: npm i -g @antfu/ni
|
||||||
|
|
||||||
|
- name: Install
|
||||||
|
run: nci
|
||||||
|
|
||||||
|
- name: Typecheck
|
||||||
|
run: nr typecheck
|
||||||
|
|
||||||
|
test:
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
node: [16.x, 18.x, 20.x]
|
||||||
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
|
fail-fast: false
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Install pnpm
|
||||||
|
uses: pnpm/action-setup@v2
|
||||||
|
|
||||||
|
- name: Set node ${{ matrix.node }}
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: ${{ matrix.node }}
|
||||||
|
cache: pnpm
|
||||||
|
|
||||||
|
- name: Setup
|
||||||
|
run: npm i -g @antfu/ni
|
||||||
|
|
||||||
|
- name: Install
|
||||||
|
run: nci
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: nr build
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
run: nr test
|
||||||
43
.github/workflows/release.yml
vendored
Normal file
43
.github/workflows/release.yml
vendored
Normal file
|
|
@ -0,0 +1,43 @@
|
||||||
|
name: Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- "v*"
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Install pnpm
|
||||||
|
uses: pnpm/action-setup@v2
|
||||||
|
|
||||||
|
- name: Set node
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: 18
|
||||||
|
cache: pnpm
|
||||||
|
registry-url: "https://registry.npmjs.org"
|
||||||
|
|
||||||
|
- run: npx changelogithub
|
||||||
|
continue-on-error: true
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
||||||
|
|
||||||
|
- name: Install Dependencies
|
||||||
|
run: pnpm i
|
||||||
|
|
||||||
|
- name: PNPM build
|
||||||
|
run: pnpm run build
|
||||||
|
|
||||||
|
- name: Publish to NPM
|
||||||
|
run: pnpm -r publish --access public --no-git-checks
|
||||||
|
env:
|
||||||
|
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
||||||
165
.gitignore
vendored
Normal file
165
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,165 @@
|
||||||
|
######################
|
||||||
|
# Project Specific
|
||||||
|
######################
|
||||||
|
dist
|
||||||
|
*.tgz
|
||||||
|
lib-cov
|
||||||
|
.cache
|
||||||
|
|
||||||
|
######################
|
||||||
|
# Node
|
||||||
|
######################
|
||||||
|
/node/
|
||||||
|
node_tmp/
|
||||||
|
node_modules/
|
||||||
|
npm-debug.log.*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
pnpm-debug.log*
|
||||||
|
lerna-debug.log*
|
||||||
|
/.awcache/*
|
||||||
|
/.cache-loader/*
|
||||||
|
|
||||||
|
######################
|
||||||
|
# SASS
|
||||||
|
######################
|
||||||
|
.sass-cache/
|
||||||
|
|
||||||
|
######################
|
||||||
|
# Eclipse
|
||||||
|
######################
|
||||||
|
*.pydevproject
|
||||||
|
.project
|
||||||
|
.metadata
|
||||||
|
tmp/
|
||||||
|
tmp/**/*
|
||||||
|
*.tmp
|
||||||
|
*.bak
|
||||||
|
*.swp
|
||||||
|
*~.nib
|
||||||
|
local.properties
|
||||||
|
.classpath
|
||||||
|
.settings/
|
||||||
|
.loadpath
|
||||||
|
.factorypath
|
||||||
|
/src/main/resources/rebel.xml
|
||||||
|
|
||||||
|
# External tool builders
|
||||||
|
.externalToolBuilders/**
|
||||||
|
|
||||||
|
# Locally stored "Eclipse launch configurations"
|
||||||
|
*.launch
|
||||||
|
|
||||||
|
# CDT-specific
|
||||||
|
.cproject
|
||||||
|
|
||||||
|
# PDT-specific
|
||||||
|
.buildpath
|
||||||
|
|
||||||
|
# STS-specific
|
||||||
|
/.sts4-cache/*
|
||||||
|
|
||||||
|
######################
|
||||||
|
# IntelliJ
|
||||||
|
######################
|
||||||
|
.idea/
|
||||||
|
*.iml
|
||||||
|
*.iws
|
||||||
|
*.ipr
|
||||||
|
*.ids
|
||||||
|
*.orig
|
||||||
|
classes/
|
||||||
|
out/
|
||||||
|
|
||||||
|
######################
|
||||||
|
# Visual Studio Code
|
||||||
|
######################
|
||||||
|
.vscode/*
|
||||||
|
!.vscode/settings.json
|
||||||
|
!.vscode/tasks.json
|
||||||
|
!.vscode/launch.json
|
||||||
|
!.vscode/extensions.json
|
||||||
|
*.code-workspace
|
||||||
|
|
||||||
|
######################
|
||||||
|
# Maven
|
||||||
|
######################
|
||||||
|
/log/
|
||||||
|
/target/
|
||||||
|
|
||||||
|
######################
|
||||||
|
# Gradle
|
||||||
|
######################
|
||||||
|
.gradle/
|
||||||
|
/build/
|
||||||
|
|
||||||
|
######################
|
||||||
|
# Package Files
|
||||||
|
######################
|
||||||
|
*.jar
|
||||||
|
*.war
|
||||||
|
*.ear
|
||||||
|
*.db
|
||||||
|
|
||||||
|
######################
|
||||||
|
# Windows
|
||||||
|
######################
|
||||||
|
# Windows image file caches
|
||||||
|
Thumbs.db
|
||||||
|
|
||||||
|
# Folder config file
|
||||||
|
Desktop.ini
|
||||||
|
|
||||||
|
######################
|
||||||
|
# Mac OSX
|
||||||
|
######################
|
||||||
|
.DS_Store
|
||||||
|
.svn
|
||||||
|
|
||||||
|
# Thumbnails
|
||||||
|
._*
|
||||||
|
|
||||||
|
# Files that might appear on external disk
|
||||||
|
.Spotlight-V100
|
||||||
|
.Trashes
|
||||||
|
|
||||||
|
######################
|
||||||
|
# Directories
|
||||||
|
######################
|
||||||
|
/bin/
|
||||||
|
/deploy/
|
||||||
|
|
||||||
|
######################
|
||||||
|
# Logs
|
||||||
|
######################
|
||||||
|
logs
|
||||||
|
*.log*
|
||||||
|
|
||||||
|
######################
|
||||||
|
# Others
|
||||||
|
######################
|
||||||
|
*.class
|
||||||
|
*.*~
|
||||||
|
*~
|
||||||
|
.merge_file*
|
||||||
|
|
||||||
|
######################
|
||||||
|
# Gradle Wrapper
|
||||||
|
######################
|
||||||
|
!gradle/wrapper/gradle-wrapper.jar
|
||||||
|
|
||||||
|
######################
|
||||||
|
# Maven Wrapper
|
||||||
|
######################
|
||||||
|
!.mvn/wrapper/maven-wrapper.jar
|
||||||
|
|
||||||
|
######################
|
||||||
|
# ESLint
|
||||||
|
######################
|
||||||
|
.eslintcache
|
||||||
|
|
||||||
|
######################
|
||||||
|
# Code coverage
|
||||||
|
######################
|
||||||
|
/coverage/
|
||||||
|
/.nyc_output/
|
||||||
1
.npmrc
Normal file
1
.npmrc
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
ignore-workspace-root-check=true
|
||||||
21
LICENSE
Normal file
21
LICENSE
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2023-PRESENT Kirk Lin <https://github.com/kirklin>
|
||||||
|
|
||||||
|
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.
|
||||||
34
README.md
Normal file
34
README.md
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
# roadmap-render
|
||||||
|
|
||||||
|
[![npm version][npm-version-src]][npm-version-href]
|
||||||
|
[![npm downloads][npm-downloads-src]][npm-downloads-href]
|
||||||
|
[![bundle][bundle-src]][bundle-href]
|
||||||
|
[![JSDocs][jsdocs-src]][jsdocs-href]
|
||||||
|
[![License][license-src]][license-href]
|
||||||
|
[![javascript_code style][code-style-image]][code-style-url]
|
||||||
|
|
||||||
|
_description_
|
||||||
|
|
||||||
|
> **Note**:
|
||||||
|
> Replace `roadmap-render`, `_description_` and `kirklin` globally to use this template.
|
||||||
|
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
[MIT](./LICENSE) License © 2023-PRESENT [Kirk Lin](https://github.com/kirklin)
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Badges -->
|
||||||
|
|
||||||
|
[npm-version-src]: https://img.shields.io/npm/v/roadmap-render?style=flat&colorA=080f12&colorB=3491fa
|
||||||
|
[npm-version-href]: https://npmjs.com/package/roadmap-render
|
||||||
|
[npm-downloads-src]: https://img.shields.io/npm/dm/roadmap-render?style=flat&colorA=080f12&colorB=3491fa
|
||||||
|
[npm-downloads-href]: https://npmjs.com/package/roadmap-render
|
||||||
|
[bundle-src]: https://img.shields.io/bundlephobia/minzip/roadmap-render?style=flat&colorA=080f12&colorB=3491fa&label=minzip
|
||||||
|
[bundle-href]: https://bundlephobia.com/result?p=roadmap-render
|
||||||
|
[license-src]: https://img.shields.io/github/license/kirklin/roadmap-render.svg?style=flat&colorA=080f12&colorB=3491fa
|
||||||
|
[license-href]: https://github.com/kirklin/roadmap-render/blob/main/LICENSE
|
||||||
|
[jsdocs-src]: https://img.shields.io/badge/jsdocs-reference-080f12?style=flat&colorA=080f12&colorB=3491fa
|
||||||
|
[jsdocs-href]: https://www.jsdocs.io/package/roadmap-render
|
||||||
|
[code-style-image]: https://img.shields.io/badge/code__style-%40kirklin%2Feslint--config-3491fa?style=flat&colorA=080f12&colorB=3491fa
|
||||||
|
[code-style-url]: https://github.com/kirklin/eslint-config/
|
||||||
12
build.config.ts
Normal file
12
build.config.ts
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
import { defineBuildConfig } from "unbuild";
|
||||||
|
|
||||||
|
export default defineBuildConfig({
|
||||||
|
entries: [
|
||||||
|
"src/index",
|
||||||
|
],
|
||||||
|
declaration: true,
|
||||||
|
clean: true,
|
||||||
|
rollup: {
|
||||||
|
emitCJS: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
14
eslint.config.js
Normal file
14
eslint.config.js
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
import kirklin from "@kirklin/eslint-config";
|
||||||
|
|
||||||
|
export default kirklin(
|
||||||
|
{
|
||||||
|
ignores: [
|
||||||
|
// eslint ignore globs here
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
rules: {
|
||||||
|
// overrides
|
||||||
|
},
|
||||||
|
},
|
||||||
|
);
|
||||||
75
package.json
Normal file
75
package.json
Normal file
|
|
@ -0,0 +1,75 @@
|
||||||
|
{
|
||||||
|
"name": "roadmap-render",
|
||||||
|
"type": "module",
|
||||||
|
"version": "0.0.0",
|
||||||
|
"packageManager": "pnpm@8.11.0",
|
||||||
|
"description": "_description_",
|
||||||
|
"author": "Kirk Lin <https://github.com/kirklin>",
|
||||||
|
"license": "MIT",
|
||||||
|
"funding": "https://www.buymeacoffee.com/linkirk",
|
||||||
|
"homepage": "https://github.com/kirklin/roadmap-render#readme",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/kirklin/roadmap-render.git"
|
||||||
|
},
|
||||||
|
"bugs": "https://github.com/kirklin/roadmap-render/issues",
|
||||||
|
"keywords": [],
|
||||||
|
"sideEffects": false,
|
||||||
|
"exports": {
|
||||||
|
".": {
|
||||||
|
"types": "./dist/index.d.ts",
|
||||||
|
"import": "./dist/index.mjs",
|
||||||
|
"require": "./dist/index.cjs"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"main": "./dist/index.mjs",
|
||||||
|
"module": "./dist/index.mjs",
|
||||||
|
"types": "./dist/index.d.ts",
|
||||||
|
"typesVersions": {
|
||||||
|
"*": {
|
||||||
|
"*": [
|
||||||
|
"./dist/*",
|
||||||
|
"./dist/index.d.ts"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"dist"
|
||||||
|
],
|
||||||
|
"scripts": {
|
||||||
|
"build": "unbuild",
|
||||||
|
"dev": "unbuild --stub",
|
||||||
|
"lint": "eslint .",
|
||||||
|
"lint:fix": "eslint . --fix",
|
||||||
|
"prepublishOnly": "nr build",
|
||||||
|
"release": "bumpp",
|
||||||
|
"start": "esno src/index.ts",
|
||||||
|
"test": "vitest",
|
||||||
|
"typecheck": "tsc --noEmit",
|
||||||
|
"prepare": "simple-git-hooks",
|
||||||
|
"up": "taze major -r -w -I"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@antfu/ni": "^0.21.12",
|
||||||
|
"@kirklin/eslint-config": "^1.0.1",
|
||||||
|
"@types/node": "^20.10.3",
|
||||||
|
"bumpp": "^9.2.0",
|
||||||
|
"eslint": "^8.55.0",
|
||||||
|
"esno": "^4.0.0",
|
||||||
|
"lint-staged": "^15.2.0",
|
||||||
|
"pnpm": "^8.11.0",
|
||||||
|
"rimraf": "^5.0.5",
|
||||||
|
"simple-git-hooks": "^2.9.0",
|
||||||
|
"taze": "^0.13.0",
|
||||||
|
"typescript": "^5.3.2",
|
||||||
|
"unbuild": "^2.0.0",
|
||||||
|
"vite": "^5.0.6",
|
||||||
|
"vitest": "^1.0.1"
|
||||||
|
},
|
||||||
|
"simple-git-hooks": {
|
||||||
|
"pre-commit": "pnpm lint-staged"
|
||||||
|
},
|
||||||
|
"lint-staged": {
|
||||||
|
"*": "eslint --fix"
|
||||||
|
}
|
||||||
|
}
|
||||||
5708
pnpm-lock.yaml
generated
Normal file
5708
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load diff
3
pnpm-workspace.yaml
Normal file
3
pnpm-workspace.yaml
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
packages:
|
||||||
|
- playground
|
||||||
|
- examples/*
|
||||||
0
src/index.ts
Normal file
0
src/index.ts
Normal file
7
test/index.test.ts
Normal file
7
test/index.test.ts
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
import { describe, expect, it } from "vitest";
|
||||||
|
|
||||||
|
describe("should", () => {
|
||||||
|
it("exported", () => {
|
||||||
|
expect(1).toEqual(1);
|
||||||
|
});
|
||||||
|
});
|
||||||
1
tsconfig.eslint.json
Normal file
1
tsconfig.eslint.json
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{}
|
||||||
17
tsconfig.json
Normal file
17
tsconfig.json
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"target": "es2018",
|
||||||
|
"lib": [
|
||||||
|
"esnext",
|
||||||
|
"dom"
|
||||||
|
],
|
||||||
|
"module": "esnext",
|
||||||
|
"moduleResolution": "node",
|
||||||
|
"resolveJsonModule": true,
|
||||||
|
"strict": true,
|
||||||
|
"strictNullChecks": true,
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"skipDefaultLibCheck": true,
|
||||||
|
"skipLibCheck": true
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue