Skip to content
This repository has been archived by the owner on Jun 15, 2023. It is now read-only.

Remove gulp from the project #263

Open
wants to merge 27 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
root = true

[*]
charset = utf-8
end_of_line = lf
charset = utf-8
20 changes: 16 additions & 4 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,14 @@
}
],
"prettier/prettier": "error",
"@typescript-eslint/explicit-function-return-type": ["error"],
"@typescript-eslint/consistent-type-imports": ["error"]
"@typescript-eslint/explicit-function-return-type": "error",
"@typescript-eslint/consistent-type-imports": "error",
"import/order": [
"error",
{
"groups": ["builtin", "index", "sibling", "parent", "internal", "external", "object", "type"]
}
]
},
"overrides": [
{
Expand All @@ -39,9 +45,15 @@
}
},
{
"files": ["rollup.*.ts", "gulpfile.ts", "gulp/**/*.ts", "config/**/*.ts"],
"files": ["rollup.*.ts", "config/**/*.ts", "script/**/*.ts"],
"rules": {
"import/no-extraneous-dependencies": "off"
}
},
{
"files": ["script/**/*.ts"],
"rules": {
"import/no-extraneous-dependencies": 0
"no-console": "off"
}
},
{
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
matrix:
os-type: ['ubuntu-latest', 'windows-latest', 'macos-latest']
node-version: [18.x]
node-version: [18.12.1]

runs-on: ${{ matrix.os-type }}

Expand All @@ -29,8 +29,11 @@ jobs:
- name: Install dependencies
run: npm ci

- name: Run lint
run: npm run lint

- name: Run build
run: npm run build --if-present
run: npm run build

- name: Run tests
run: npm test
run: npm run test:ci
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.vscode/

# API declaration file
lib/openrct2.d.ts

Expand Down
6 changes: 5 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

if [ -t 2 ]; then
exec >/dev/tty 2>&1
fi

export FORCE_COLOR=1

echo "Running husky pre-commit hook..."

npm run lint
npm run lint -- --fix

echo "All good, commiting!"
3 changes: 2 additions & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"singleQuote": true,
"quoteProps": "consistent",
"printWidth": 120
"printWidth": 120,
"endOfLine": "auto"
}
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ This template repository comes with:
- [Rollup](https://rollupjs.org)
- [ESLint](https://eslint.org/)
- [Jest](https://jestjs.io/)
- [gulp](https://gulpjs.com/)

## Installation

Expand All @@ -42,12 +41,17 @@ This template repository comes with:

```json
{
"OPENRCT2_PATH": "PATH_TO_OPENRCT2"
"OPENRCT2_FOLDER_PATH": "PATH_TO_OPENRCT2",
"OPENRCT2_MS_DOS_EXECUTABLE_PATH": "PATH_TO_MS_DOS_OPERCT2_EXECUTABLE"
}
```

- replace `PATH_TO_OPENRCT2` with correct path to OpenRCT2 folder on your PC (usually `C:\Users\<USER>\Documents\OpenRCT2` or `C:\Program Files\OpenRCT2`)
- make sure to use either escaped backslashes (`\\`) or forward slashes (`/`) in the path you're pasting
- replace:
- **(required)** `PATH_TO_OPENRCT2` with correct path to OpenRCT2 folder on your PC (usually `C:\Users\<USER>\Documents\OpenRCT2` or `C:\Program Files\OpenRCT2`)
- _(optional)_ `OPENRCT2_MS_DOS_EXECUTABLE_PATH` with correct path to `openrct2.com` MS-DOS executable, located inside OpenRCT2 `bin` folder
- useful only for Windows users, **remove this variable from the config otherwise**
- if you populate this variable, upon running `npm start`, the script will launch Rollup in watch mode and OpenRCT2 (yes, it will launch the actual game), piping their outputs to the same terminal
- make sure to use either escaped backslashes (`\\`) or forward slashes (`/`) in all the paths you're pasting to JSON config file

6. Run `nvm use && npm install && npm run init`

Expand Down
1 change: 1 addition & 0 deletions config/dev.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
2 changes: 1 addition & 1 deletion config/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import config from 'config';
import EnvConfig from './Env';
import config from 'config';

export default new EnvConfig({ ...config, NODE_ENV: process.env.NODE_ENV });
1 change: 1 addition & 0 deletions config/prod.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
16 changes: 0 additions & 16 deletions gulp/build/build.ts

This file was deleted.

16 changes: 0 additions & 16 deletions gulp/build/buildWatch.ts

This file was deleted.

2 changes: 0 additions & 2 deletions gulp/build/index.ts

This file was deleted.

4 changes: 0 additions & 4 deletions gulp/index.ts

This file was deleted.

2 changes: 0 additions & 2 deletions gulp/init/index.ts

This file was deleted.

148 changes: 0 additions & 148 deletions gulp/init/init.ts

This file was deleted.

2 changes: 0 additions & 2 deletions gulp/lint/index.ts

This file was deleted.

12 changes: 0 additions & 12 deletions gulp/lint/lint.ts

This file was deleted.

12 changes: 0 additions & 12 deletions gulp/lint/lintFix.ts

This file was deleted.

3 changes: 0 additions & 3 deletions gulp/test/index.ts

This file was deleted.

5 changes: 0 additions & 5 deletions gulp/test/test.ts

This file was deleted.

5 changes: 0 additions & 5 deletions gulp/test/testCoverage.ts

This file was deleted.

5 changes: 0 additions & 5 deletions gulp/test/testWatch.ts

This file was deleted.

6 changes: 0 additions & 6 deletions gulpfile.ts

This file was deleted.

1 change: 1 addition & 0 deletions jest.config.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"reporters": ["jest-progress-bar-reporter"],
"projects": [
{
"preset": "ts-jest",
Expand Down
Loading