Skip to content

Commit

Permalink
Enable CI and docs using GH Pages
Browse files Browse the repository at this point in the history
Also included is updating TS to 5.3, and fixing formatting for non-code files.
  • Loading branch information
tiennou committed Jan 13, 2024
1 parent c68ef3f commit 61ba921
Show file tree
Hide file tree
Showing 34 changed files with 5,221 additions and 2,213 deletions.
21 changes: 21 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
root=true

[*]
charset=utf-8
end_of_line=lf
insert_final_newline=false
indent_style=space
indent_size=4

[{*.json,*.yaml}]
indent_style=space
indent_size=4
end_of_line=lf
trim_trailing_whitespace=true

[{*.ts}]
indent_style=space
tab_width=4
end_of_line=lf
trim_trailing_whitespace=true
insert_final_newline=true
13 changes: 6 additions & 7 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
{
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "prettier"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier"],
"rules": {
"prettier/prettier": "warn",
"@typescript-eslint/no-unused-vars": "warn",
"@typescript-eslint/no-unused-vars": [
"warn",
{ "varsIgnorePattern": "^_", "argsIgnorePattern": "^_" }
],
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/no-explicit-any": "warn"
}
}
}
27 changes: 27 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Node.js CI

on:
push:
branches: ['main']
pull_request:
branches: ['main']

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run build --if-present
- run: npm test
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
dist/
dist/
docs/
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ To integrate Simple Allies into your Screeps bot, import the necessary component

For more details, refer to the source code:

- TypeScript source code: [src/](./src/)
- Built JavaScript code: [dist/](./dist/)
- TypeScript source code: [src/](./src/)
- Built JavaScript code: [dist/](./dist/)

Please note that the JavaScript code is generated from the TypeScript source code and should be functionally identical.

Expand Down
1 change: 1 addition & 0 deletions docs/.nojekyll
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false.
22 changes: 22 additions & 0 deletions docs/assets/highlight.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
:root {
--light-code-background: #FFFFFF;
--dark-code-background: #1E1E1E;
}

@media (prefers-color-scheme: light) { :root {
--code-background: var(--light-code-background);
} }

@media (prefers-color-scheme: dark) { :root {
--code-background: var(--dark-code-background);
} }

:root[data-theme='light'] {
--code-background: var(--light-code-background);
}

:root[data-theme='dark'] {
--code-background: var(--dark-code-background);
}

pre, code { background: var(--code-background); }
59 changes: 59 additions & 0 deletions docs/assets/main.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/assets/navigation.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions docs/assets/search.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 61ba921

Please sign in to comment.