This repository has been archived by the owner on Dec 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 95b6d1e
Showing
32 changed files
with
2,330 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": 18, | ||
"sourceType": "module" | ||
}, | ||
"plugins": [ | ||
"@typescript-eslint", | ||
"eslint-plugin-tsdoc" | ||
], | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"prettier" | ||
], | ||
"root": true, | ||
"rules": { | ||
"@typescript-eslint/no-unused-vars": "error", | ||
"@typescript-eslint/consistent-type-definitions": ["error", "type"], | ||
"tsdoc/syntax": "warn" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: cd | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
env: | ||
HUSKY: 0 | ||
TAG_NAME: ${{ github.event.release.tag_name }} | ||
|
||
jobs: | ||
run-checks: | ||
if: ${{ !github.event.release.draft }} | ||
name: Run Checks | ||
uses: ./.github/workflows/ci.yml | ||
|
||
publish: | ||
if: ${{ !github.event.release.draft }} | ||
needs: | ||
- run-checks | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
id-token: write | ||
packages: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '20.x' | ||
registry-url: https://registry.npmjs.org/ | ||
|
||
- run: corepack enable | ||
- run: corepack prepare pnpm@latest --activate | ||
|
||
- name: Install | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Build | ||
run: pnpm build | ||
|
||
- run: pnpm publish --provenance --access public --no-git-checks | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.NPM_MOCHI_TOKEN}} | ||
NPM_TOKEN: ${{secrets.NPM_MOCHI_TOKEN}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: lint | ||
|
||
on: | ||
push: | ||
branches: | ||
- '*' | ||
pull_request: | ||
types: [review_requested] | ||
|
||
env: | ||
HUSKY: 0 | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '20.x' | ||
- run: corepack enable | ||
- run: corepack prepare pnpm@latest --activate | ||
- run: pnpm install --frozen-lockfile | ||
- run: pnpm lint -f github-annotations | ||
continue-on-error: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
dist/ | ||
node_modules/ | ||
|
||
.vscode/ | ||
|
||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
pnpm exec lint-staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"tabWidth": 2, | ||
"useTabs": false, | ||
"printWidth": 80, | ||
"semi": true, | ||
"trailingComma": "es5", | ||
"singleQuote": true, | ||
"endOfLine": "lf" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# @mochiapp/js | ||
> Javascript/Typescript bindings for [Mochi](https://github.com/Mochi-Team/mochi). | ||
## Installation | ||
Using pnpm: | ||
```bash | ||
pnpm add @mochiapp/js | ||
``` | ||
|
||
Using npm: | ||
```bash | ||
npm install @mochiapp/js | ||
``` | ||
|
||
Using yarn: | ||
```bash | ||
yarn add @mochiapp/js | ||
``` | ||
|
||
## Development / Contribution | ||
You must use [pnpm](https://pnpm.io/) when you're modifying this package. | ||
|
||
## License | ||
[MIT](LICENSE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"name": "@mochiapp/js", | ||
"version": "0.0.1", | ||
"description": "A typescript library used to build modules for Mochi.", | ||
"repository": "https://github.com/Mochi-Team/mochi-js", | ||
"author": "errorerrorerror", | ||
"license": "MIT", | ||
"private": false, | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.js", | ||
"files": [ | ||
"./dist" | ||
], | ||
"scripts": { | ||
"prepare": "husky install", | ||
"lint": "eslint", | ||
"lint:fix": "eslint --fix", | ||
"format": "prettier -w src", | ||
"format:check": "prettier --check src", | ||
"build": "rm -rf dist && tsc" | ||
}, | ||
"devDependencies": { | ||
"@typescript-eslint/eslint-plugin": "^6.10.0", | ||
"@typescript-eslint/parser": "^6.10.0", | ||
"eslint": "^8.53.0", | ||
"eslint-config-prettier": "^9.0.0", | ||
"eslint-plugin-tsdoc": "^0.2.17", | ||
"husky": "^8.0.0", | ||
"lint-staged": "^15.0.2", | ||
"prettier": "^3.0.3", | ||
"typedoc": "^0.25.3", | ||
"typedoc-plugin-markdown": "^3.17.1", | ||
"typescript": "^5.2.2" | ||
}, | ||
"lint-staged": { | ||
"*.ts": ["pnpm lint:fix", "pnpm format"] | ||
} | ||
} |
Oops, something went wrong.