Skip to content

Commit 5f45e51

Browse files
committed
chore: initialize project structure and configs
0 parents  commit 5f45e51

31 files changed

Lines changed: 9426 additions & 0 deletions

.eslintrc.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"root": true,
3+
"extends": [
4+
"eslint:recommended",
5+
"plugin:@typescript-eslint/recommended"
6+
],
7+
"parser": "@typescript-eslint/parser",
8+
"parserOptions": {
9+
"ecmaVersion": "latest",
10+
"sourceType": "module",
11+
"project": "./tsconfig.json"
12+
},
13+
"plugins": [
14+
"@typescript-eslint",
15+
"minecraft-linting"
16+
],
17+
"overrides": [
18+
{
19+
"files": [
20+
"*.ts"
21+
]
22+
}
23+
],
24+
"rules": {
25+
"minecraft-linting/avoid-unnecessary-command": "error",
26+
"prefer-const": "warn",
27+
"@typescript-eslint/no-explicit-any": "off",
28+
"eslint-disable no-unused-labels": "off",
29+
"no-unused-vars": "off",
30+
"@typescript-eslint/no-unused-vars": "warn"
31+
}
32+
}
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
workflow_dispatch:
8+
9+
jobs:
10+
do-tests:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: '22'
21+
22+
- name: Install dependencies
23+
run: npm install
24+
25+
- name: Run tests
26+
run: npm run test
27+
28+
generate-docs:
29+
runs-on: ubuntu-latest
30+
needs: do-tests
31+
32+
steps:
33+
- name: Checkout repository
34+
uses: actions/checkout@v4
35+
36+
- name: Setup Node.js
37+
uses: actions/setup-node@v4
38+
with:
39+
node-version: '22'
40+
41+
- name: Install dependencies
42+
run: npm install
43+
44+
- name: Run docs script
45+
run: npm run docs
46+
47+
- name: Upload artifacts
48+
uses: actions/upload-artifact@v4
49+
with:
50+
name: generated-docs
51+
path: docs/
52+
53+
publish-package:
54+
runs-on: ubuntu-latest
55+
needs: do-tests
56+
permissions:
57+
contents: read
58+
packages: write
59+
60+
steps:
61+
- name: Checkout repository
62+
uses: actions/checkout@v4
63+
64+
- name: Setup Node.js
65+
uses: actions/setup-node@v4
66+
with:
67+
node-version: '22'
68+
registry-url: 'https://registry.npmjs.org'
69+
70+
- name: Install dependencies
71+
run: npm install
72+
73+
- name: Publish to NPM Package Registry
74+
run: |
75+
if [[ $(git describe --tags --abbrev=0) =~ "beta" ]]; then
76+
echo "Publishing beta"
77+
git describe --tags --abbrev=0
78+
npm publish --tag beta --access public
79+
else
80+
echo "Publishing stable"
81+
git describe --tags --abbrev=0
82+
npm publish --access public
83+
fi
84+
env:
85+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- '**'
7+
pull_request:
8+
branches:
9+
- '**'
10+
11+
jobs:
12+
do-tests:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: '22'
23+
24+
- name: Install dependencies
25+
run: npm install
26+
27+
- name: Run tests
28+
run: npm run test

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/dist
2+
/node_modules
3+
/build
4+
/docs

.idea/.gitignore

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/SpaceAPI.iml

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/encodings.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.npmignore

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
*~
2+
*.swp
3+
*.log
4+
*.tmp
5+
*.pyc
6+
*.svn
7+
*.sublime-project
8+
*.sublime-workspace
9+
coverage.html
10+
.DS_Store
11+
.editorconfig
12+
.project
13+
.gitignore
14+
.jshintrc
15+
.nodemonignore
16+
.travis.yml
17+
gruntfile.js
18+
.settings/
19+
.sass-cache/
20+
.bower-*/
21+
.idea/
22+
.svn/
23+
node_modules/
24+
tmp/
25+
test/
26+
build/
27+
docs/
28+
.github/
29+
src/
30+
typedoc.json
31+
tsconfig.json
32+
.eslintrc.json
33+
jest.config.js
34+
*.ts
35+
jest.config.js
36+
package-lock.json

0 commit comments

Comments
 (0)