Skip to content

Commit

Permalink
chore: setup project
Browse files Browse the repository at this point in the history
  • Loading branch information
shigma committed Apr 27, 2024
0 parents commit 253bd3f
Show file tree
Hide file tree
Showing 13 changed files with 1,076 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
insert_final_newline = true
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
8 changes: 8 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/external

temp
dist
lib
tests

*.js
10 changes: 10 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
root: true

env:
node: true

globals:
NodeJS: true

extends:
- '@cordisjs/eslint-config'
7 changes: 7 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
* text eol=lf

*.png -text
*.jpg -text
*.ico -text
*.gif -text
*.webp -text
32 changes: 32 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build

on:
push:
pull_request:

jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Check out
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
- name: Install
run: yarn
- name: Lint
run: yarn lint

build:
runs-on: ubuntu-latest

steps:
- name: Check out
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
- name: Install
run: yarn
- name: Build
run: yarn build
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
lib
dist

node_modules
npm-debug.log
yarn-debug.log
yarn-error.log
tsconfig.tsbuildinfo

.eslintcache
.DS_Store
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
893 changes: 893 additions & 0 deletions .yarn/releases/yarn-4.1.1.cjs

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.1.1.cjs
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) 2020-present Shigma

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.
51 changes: 51 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"name": "koishi-plugin-im",
"version": "0.0.0",
"description": "IM for Koishi",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
"files": [
"lib"
],
"contributors": [
"Shigma <[email protected]>"
],
"license": "MIT",
"homepage": "https://github.com/koishijs/koishi-plugin-im",
"repository": {
"type": "git",
"url": "https://github.com/koishijs/koishi-plugin-im.git"
},
"bugs": {
"url": "https://github.com/koishijs/koishi-plugin-im/issues"
},
"keywords": [
"bot",
"chatbot",
"koishi",
"plugin",
"im",
"chat",
"messenger",
"platform"
],
"scripts": {
"build": "atsc -b",
"lint": "eslint --ext=ts --cache"
},
"devDependencies": {
"@cordisjs/eslint-config": "^1.1.1",
"@koishijs/plugin-server": "^3.2.1",
"@types/node": "^20.11.30",
"atsc": "^2.0.1",
"esbuild": "^0.18.20",
"esbuild-register": "^3.5.0",
"eslint": "^8.57.0",
"koishi": "^4.17.5",
"typescript": "^5.4.3",
"yml-register": "^1.2.5"
},
"peerDependencies": {
"koishi": "^4.17.5"
}
}
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# koishi-plugin-im
Empty file added src/index.ts
Empty file.
24 changes: 24 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"compilerOptions": {
"baseUrl": ".",
"outDir": "lib",
"rootDir": "src",
"target": "es2022",
"module": "commonjs",
"declaration": true,
"composite": true,
"incremental": true,
"skipLibCheck": true,
"esModuleInterop": true,
"moduleResolution": "node",
"strictBindCallApply": true,
"jsx": "react-jsx",
"jsxImportSource": "@satorijs/element",
"types": [
"yml-register/types",
],
},
"include": [
"src",
],
}

0 comments on commit 253bd3f

Please sign in to comment.