Skip to content

Commit

Permalink
feat: first version
Browse files Browse the repository at this point in the history
  • Loading branch information
2214962083 committed Aug 17, 2024
0 parents commit 4f70a95
Show file tree
Hide file tree
Showing 33 changed files with 9,438 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github: [nicepkg, 2214962083]
open_collective: nicepkg
58 changes: 58 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Release

on:
push:
branches:
- "**"

jobs:
release:
permissions:
id-token: write
contents: write
if: "contains(github.event.head_commit.message, 'chore: release')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Use Node.js v20
uses: actions/setup-node@v4
with:
node-version: "20"
registry-url: https://registry.npmjs.org/
cache: npm

- run: npm install

- name: Test
run: npm run test

- name: Publish
run: npm publish --access public --no-git-checks
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
NPM_CONFIG_PROVENANCE: true

- name: Git commit
id: commit
run: |
git config --local user.email github-actions[bot]@users.noreply.github.com
git config --local user.name github-actions[bot]
git config --global core.autocrlf true
git config --global core.safecrlf false
git add .
git commit -m "chore: ci build" -a
continue-on-error: true

- name: Git push
uses: ad-m/github-push-action@master
if: ${{ steps.commit.outcome == 'success' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}

- name: Log
if: ${{ steps.commit.outcome != 'success' }}
run: echo Nothing to commit.
33 changes: 33 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Check

on:
push:
branches:
- "**"
pull_request:
branches:
- master

jobs:
check:
if: "!contains(github.event.head_commit.message, 'chore: release')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Use Node.js v20
uses: actions/setup-node@v4
with:
node-version: "20"
registry-url: https://registry.npmjs.org/
cache: npm

- run: npm install

- name: Test
run: npm run test

- name: Build
run: npm run build
18 changes: 18 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: release-please

on:
push:
branches:
- master

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@v4
id: release

- name: Release Please Results
env:
RESULTS: ${{ toJSON(steps.release.outputs) }}
run: echo "$RESULTS"
150 changes: 150 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
# Created by https://www.toptal.com/developers/gitignore/api/dotenv,node
# Edit at https://www.toptal.com/developers/gitignore?templates=dotenv,node

### dotenv ###
.env
config.toml

### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*
error.log
combined.log

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

### Node Patch ###
# Serverless Webpack directories
.webpack/

# Optional stylelint cache

# SvelteKit build / generate output
.svelte-kit

# End of https://www.toptal.com/developers/gitignore/api/dotenv,node
.gpt-runner
1 change: 1 addition & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ ".": "0.1" }
16 changes: 16 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"workbench.colorCustomizations": {
"activityBar.background": "#033607",
"titleBar.activeBackground": "#044C0A",
"titleBar.activeForeground": "#F0FEF1"
},
// format on save
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"typescript.tsdk": "node_modules/typescript/lib", // Use the workspace version of TypeScript
"typescript.enablePromptUseWorkspaceTsdk": true, // For security reasons it's require that users opt into using the workspace version of typescript
"typescript.preferences.preferTypeOnlyAutoImports": true, // Prefer type-only imports
"prettier.ignorePath": ".gitignore",
"typescript.inlayHints.parameterNames.enabled": "all",
"typescript.inlayHints.parameterTypes.enabled": true
}
26 changes: 26 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# 🤝 Contributing

We're excited that you're interested in contributing to this project! Before submitting your contribution, please read through the following guide.

## 🔧 Setup

This project uses [NPM](https://www.npmjs.com/) for package management. Please make sure you have it installed before proceeding.

1. Fork the repo and create your branch from `master`.
2. Run `npm install` in the repository root.
3. Run `npm run dev` to start the development server.
4. Make your changes!

## ✅ Linting and Type Checking

This project uses [TypeScript](https://www.typescriptlang.org/) for type checking, respectively. Please make sure your code passes both before submitting a PR.

```bash
npm run test
```

## 📝 Commit Message Format

This project follows the [Conventional Commits](https://www.conventionalcommits.org/) specification. Please make sure your commit messages are formatted correctly.

**Please mention the issue number in the commit message or the PR description.**
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) 2024 Nicepkg <https://github.com/nicepkg>

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.
Loading

0 comments on commit 4f70a95

Please sign in to comment.