Skip to content

Commit

Permalink
Initial upload (#1)
Browse files Browse the repository at this point in the history
Still needs some cleaning up before we go public, but lets test out the
web pages for now.

---------

Co-authored-by: Daymon <[email protected]>
  • Loading branch information
daymxn and daymxn authored Aug 28, 2024
1 parent 99a4b67 commit 9af6297
Show file tree
Hide file tree
Showing 173 changed files with 34,395 additions and 1 deletion.
55 changes: 55 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"jsx": true,
"useJSXTextNode": true,
"ecmaVersion": 2018,
"sourceType": "module",
"project": ["./tsconfig.json", "./scripts/tsconfig.scripts.json"]
},
"ignorePatterns": ["/out", "*.js"],
"plugins": ["@typescript-eslint", "roblox-ts", "prettier", "headers"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:roblox-ts/recommended",
"plugin:prettier/recommended",
"plugin:react-hooks/recommended"
],
"overrides": [{
"files": [ "scripts/**/*" ],
"rules": {
"roblox-ts/no-regex": 0,
"roblox-ts/lua-truthiness": 0
}
}],
"rules": {
"headers/header-format": [
"error",
{
"source": "file",
"path": "scripts/license-header.txt",
"trailingNewlines": 2
}
],
"prettier/prettier": [
"warn",
{
"tabWidth": 2,
"endOfLine": "auto",
"useTabs": false,
"trailingComma": "es5",
"plugins": ["prettier-plugin-organize-imports"],
"overrides": [
{
"files": ["*.jsonc", ".eslintrc", "tsconfig*.json"],
"options": {
"trailingComma": "none"
}
}
]
}
]
}
}

2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto eol=lf
51 changes: 51 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Deploy to GitHub Pages

on:
push:
branches:
- main

defaults:
run:
working-directory: ./wiki

jobs:
build:
name: Build Docusaurus
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 18
cache: npm

- name: Install dependencies
run: npm ci
- name: Build website
run: npm run build

- name: Upload Build Artifact
uses: actions/upload-pages-artifact@v3
with:
path: build

deploy:
name: Deploy to GitHub Pages
needs: build

permissions:
pages: write
id-token: write

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
28 changes: 28 additions & 0 deletions .github/workflows/test-deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Test deployment

on:
pull_request:
branches:
- main

defaults:
run:
working-directory: ./wiki

jobs:
test-deploy:
name: Test deployment
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 18
cache: npm

- name: Install dependencies
run: npm ci
- name: Test build website
run: npm run build
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/node_modules
/out
*.tsbuildinfo
/docs
/dist
/temp
/scripts/out
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"printWidth": 120,
"tabWidth": 4,
"trailingComma": "all",
"useTabs": true,
"proseWrap": "always"
}
6 changes: 6 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"recommendations": [
"roblox-ts.vscode-roblox-ts",
"dbaeumer.vscode-eslint"
]
}
25 changes: 25 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"typescript.tsdk": "node_modules/typescript/lib",
"files.eol": "\n",
"[typescript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"editor.formatOnSave": true
},
"[typescriptreact]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"editor.formatOnSave": true
},
"eslint.run": "onType",
"eslint.format.enable": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"eslint.validate": [
"typescript",
"typescriptreact"
],
"testez-companion.timeout": 5,
"yaml.schemas": {
"https://json.schemastore.org/github-workflow.json": "file:///f%3A/Programming/Games/Roblox/rlog/.github/workflows/deploy.yaml"
}
}
79 changes: 79 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Contributing

Any and all contributions are entirely welcomed! Before you contribute though, there are
some things you should know.

> [!NOTE]
> Making public contributions to this repo means you accept the [LICENSE](LICENSE) agreement and you're contributing code that also respects the [LICENSE](LICENSE) agreement.
## Getting started

Make sure you've given both the [Wiki](https://rlog.daymxn.com/rlog/docs/category/guides) and the [API Reference](https://rlog.daymxn.com/rlog/docs/api) a read before moving forward, such that you understand the design behind **rLog**.

### Building

Use the `build` command to build the source files.

```sh
npm run build
```

Or `watch` to watch the source files.

```sh
npm run watch
```

### Running Tests

Start a watch for the test place.

```sh
npm run dev
```

Serve `test.project.json` with rojo and link with an empty base plate in roblox studio.

Finally, use the shortcut `ctrl` + `:` with the [Test EZ Companion](https://github.com/tacheometry/testez-companion) plugin
to run the tests.

### API Docs

API docs are built through the following tools:

`api-extractor` -> `api-documenter` -> post processing (`/scripts`) -> docusaurus (`/wiki`)

To host the `wiki` you'll need to scope to the `/wiki` directory and run the commands listed there.

For syncing the API, you can run the `api` command from the **rLog** root directory.

```sh
npm run api
```

This will automatically extract the api, generate the docs for it, perform post processing, and copy it
over to the wiki.

## Making changes

To make changes, clone the repo to your local disk.

`git clone [email protected]:daymxn/rlog.git`

Then, checkout to a new feature branch labeled in the following format.

`git checkout -b NAME-CATEGORY-FEATURE`

Where `NAME` is your *firstLast* name or your *github* username. `CATEGORY` is something like; feature or bugfix.
And `FEATURE` is the title of the new feature (or bug) you're contributing for.

After you've made changes to your local branch, and you want to submit, you can open a Pull Request (PR)
via the [GitHub web panel](https://github.com/daymxn/rlog/compare).

### Code Formatting

Code in this repo is formatted according to eslint and prettier. You can use the attached `.vscode` folder for automatically formatting on file save, or you can manually run either via the command line with the `format` or `lint` scripts:

```sh
npm run format
```
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -198,4 +198,4 @@
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
Loading

0 comments on commit 9af6297

Please sign in to comment.