Skip to content

Commit

Permalink
feat: init
Browse files Browse the repository at this point in the history
  • Loading branch information
theurgi committed Feb 13, 2023
0 parents commit 1dfe896
Show file tree
Hide file tree
Showing 11 changed files with 6,448 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Release
on:
push:
branches: [main]
jobs:
release:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 7
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install

- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: pnpm dlx semantic-release --branches main
25 changes: 25 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# build output
*.tgz
dist
target

# cache
.eslintcache

# coverage
.nyc_output
coverage

# dependencies
.pnpm-store/
node_modules/
package-lock.json
yarn.lock

# logs
*.log
logs
npm-debug.log*

# os
.DS_Store
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no -- commitlint --edit ${1}
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

pnpm lint-staged
16 changes: 16 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"schema": "https://json.schemastore.org/prettierrc",
"printWidth": 100,
"semi": false,
"singleQuote": true,
"tabWidth": 2,
"useTabs": true,
"overrides": [
{
"files": "*.{md,yml,yaml}",
"options": {
"useTabs": false
}
}
]
}
16 changes: 16 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"typescript.tsdk": "./node_modules/typescript/lib",

"eslint.validate": [
"astro",
"javascript",
"javascriptreact",
"json",
"json5",
"jsonc",
"svelte",
"typescript",
"typescriptreact",
"vue"
]
}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# help
60 changes: 60 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"name": "@theurgi/help",
"version": "0.0.0-semantic-release",
"publishConfig": {
"access": "public"
},
"description": "Generate formatted help text for Node.js CLIs",
"license": "MIT",
"repository": "https://github.com/theurgi/help",
"author": "theurgi",
"type": "module",
"files": [
"dist"
],
"main": "dist/main.js",
"module": "dist/main.js",
"types": "dist/main.d.ts",
"scripts": {
"prepare": "husky install",
"build": "rm -rf dist; tsup src/*.ts --dts --format=esm",
"format": "prettier --ignore-path .gitignore --write '**/*.{js,json,md,ts}'",
"lint": "eslint --cache --fix --ignore-path .gitignore .",
"type-check": "tsc --noEmit --skipLibCheck",
"prepack": "pnpm build && clean-pkg-json"
},
"lint-staged": {
"*.{js,ts}": "eslint .",
"*.{js,json,md,ts}": "prettier --write ."
},
"engines": {
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
},
"dependencies": {
"strip-ansi": "^7.0.1",
"table": "^6.8.1",
"term-size": "^3.0.2",
"word-wrap": "^1.2.3"
},
"devDependencies": {
"@commitlint/cli": "^17.4.2",
"@commitlint/config-conventional": "^17.4.2",
"@theurgi/eslint-config": "^1.1.0",
"@types/node": "^17.0.45",
"clean-pkg-json": "^1.2.0",
"eslint": "^8.34.0",
"husky": "^7.0.4",
"lint-staged": "^12.5.0",
"prettier": "^2.8.4",
"tsup": "^6.6.2",
"typescript": "^4.9.5"
},
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
},
"eslintConfig": {
"extends": "@theurgi/eslint-config/node"
}
}
Loading

0 comments on commit 1dfe896

Please sign in to comment.