Skip to content

Commit

Permalink
Merge branch 'master' into feat7
Browse files Browse the repository at this point in the history
  • Loading branch information
MaikoTan authored Feb 17, 2024
2 parents ec6316f + 7bbbf40 commit 637ac40
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 45 deletions.
14 changes: 0 additions & 14 deletions .github/workflows/auto-approve.yml

This file was deleted.

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

on:
push:
pull_request:

jobs:
build:
uses: AwesomeHamster/workflows/.github/workflows/build.yml@master
permissions:
pull-requests: write
issues: write
with:
lint: true
test: true
yarn-no-immutable: true
approve: true
secrets: inherit
18 changes: 11 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@ on:

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: AwesomeHamster/actions-publish@master
with:
token: ${{ secrets.NPM_TOKEN }}
test: yarn test
uses: AwesomeHamster/workflows/.github/workflows/publish.yml@master
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
with:
yarn-no-immutable: true
test-before-publish: true
secrets:
npm-token: ${{ secrets.NPM_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
20 changes: 0 additions & 20 deletions .github/workflows/test.yml

This file was deleted.

8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@
"url": "git+https://github.com/AwesomeHamster/koishi-plugin-hitokoto.git"
},
"scripts": {
"build": "tsc",
"dev": "constructeur build --minify false && tsc --emitDeclarationOnly",
"build": "yarn build:tsup --minify",
"dev": "yarn build:tsup",
"build:tsup": "tsup",
"clean": "rimraf dist/*",
"test": "mocha -r esbuild-register -r yml-register --extension .spec.ts ./__tests__",
"lint": "eslint src/**/*.ts && yarn prettier --check",
Expand Down Expand Up @@ -82,14 +83,17 @@
"@typescript-eslint/parser": "^6.13.1",
"chai": "^4.3.10",
"esbuild": "^0.19.8",
"esbuild-plugin-yaml": "^0.0.1",
"esbuild-register": "^3.5.0",
"eslint": "^8.54.0",
"eslint-import-resolver-typescript": "^3.6.1",
"fs-extra": "^11.2.0",
"js-yaml": "^4.1.0",
"koishi": "^4.11.0",
"mocha": "^10.2.0",
"prettier": "^3.1.0",
"rimraf": "^5.0.5",
"tsup": "^8.0.1",
"typescript": "^5.3.2",
"yml-register": "^1.1.0"
}
Expand Down
2 changes: 0 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
"extends": "@hamster-bot/tsconfig",
"compilerOptions": {
"target": "es2022",
"composite": true,
"incremental": true,
"rootDir": "src",
"module": "CommonJS",
"outDir": "lib",
Expand Down
12 changes: 12 additions & 0 deletions tsup.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import yaml from 'esbuild-plugin-yaml'
import { defineConfig } from 'tsup'

export default defineConfig({
entry: ['src/index.ts'],
dts: true,
format: ['cjs'],
clean: true,
outDir: 'lib',
esbuildPlugins: [yaml.yamlPlugin()],
esbuildOptions(options, context) {},
})

0 comments on commit 637ac40

Please sign in to comment.