Add prettier to pre-commit and run it
This commit is contained in:
19
.github/CONTRIBUTING.md
vendored
19
.github/CONTRIBUTING.md
vendored
@@ -2,17 +2,18 @@ Cookie Monster is written to modify Cookie Clicker as little as possible. This m
|
||||
|
||||
The following is a short description of the various `src` directories and their contents:
|
||||
|
||||
JS | Description
|
||||
-- | -
|
||||
Cache | Functions related to creating and storing data cache
|
||||
Config | Functions related to manipulating CM configuration
|
||||
Data | Hard coded values
|
||||
Disp | Functions related to displaying CM's UI
|
||||
InitSaveLoad | Functions related to registering the CM object with the Game's Modding API
|
||||
Main | Functions related to the main loop and initializing CM
|
||||
Sim | Functions related to simulate something
|
||||
| JS | Description |
|
||||
| ------------ | -------------------------------------------------------------------------- |
|
||||
| Cache | Functions related to creating and storing data cache |
|
||||
| Config | Functions related to manipulating CM configuration |
|
||||
| Data | Hard coded values |
|
||||
| Disp | Functions related to displaying CM's UI |
|
||||
| InitSaveLoad | Functions related to registering the CM object with the Game's Modding API |
|
||||
| Main | Functions related to the main loop and initializing CM |
|
||||
| Sim | Functions related to simulate something |
|
||||
|
||||
These are some additional guidelines:
|
||||
|
||||
- Try to use DOM as much as possible instead of using string manipulation to modify HTML.
|
||||
- Please be descriptive of your commits. If the commit is related to an issue or PR, please add the issue/PR number to the commit message.
|
||||
- PR's should target the `dev` branch
|
||||
|
||||
6
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
6
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
@@ -16,8 +16,7 @@ body:
|
||||
id: what-happened
|
||||
attributes:
|
||||
label: Bug description
|
||||
description:
|
||||
What is the bug about?
|
||||
description: What is the bug about?
|
||||
placeholder: |
|
||||
# Please describe the bug and what you would have expected the mod to do
|
||||
validations:
|
||||
@@ -26,8 +25,7 @@ body:
|
||||
id: reproduce
|
||||
attributes:
|
||||
label: To reproduce
|
||||
description:
|
||||
How can you reproduce the bug?
|
||||
description: How can you reproduce the bug?
|
||||
placeholder: |
|
||||
The steps needed to reproduce the behavior:
|
||||
1.
|
||||
|
||||
3
.github/ISSUE_TEMPLATE/feature-request.yml
vendored
3
.github/ISSUE_TEMPLATE/feature-request.yml
vendored
@@ -16,8 +16,7 @@ body:
|
||||
id: what-is-wanted
|
||||
attributes:
|
||||
label: Feature description
|
||||
description:
|
||||
Describe the function you'd like to see added to CookieMonster
|
||||
description: Describe the function you'd like to see added to CookieMonster
|
||||
placeholder: |
|
||||
# A clear and concise description of what you want to happen.
|
||||
validations:
|
||||
|
||||
6
.github/dependabot.yml
vendored
6
.github/dependabot.yml
vendored
@@ -5,7 +5,7 @@
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/" # Location of package manifests
|
||||
- package-ecosystem: 'npm'
|
||||
directory: '/' # Location of package manifests
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
interval: 'weekly'
|
||||
|
||||
58
.github/workflows/CI.yml
vendored
58
.github/workflows/CI.yml
vendored
@@ -12,32 +12,32 @@ jobs:
|
||||
env:
|
||||
GITHUB_REGISTERY_PAT: ${{ secrets.GITHUB_TOKEN }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 12
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
- name: Run ESLint
|
||||
run: npx eslint src
|
||||
- name: Run Mocha tests
|
||||
run: npx mocha
|
||||
- name: Check if CookieMonsterDev.js is built correctly
|
||||
run: |
|
||||
npx webpack -o ./tmp --env minimize
|
||||
if cmp <(head -n 2 dist/CookieMonsterDev.js) <(head -n 2 tmp/CookieMonsterDev.js); then
|
||||
echo '### SUCCESS: CookieMonsterDev is built correctly! ###'
|
||||
else
|
||||
echo '### WARNING: CookieMonsterDev.js does not seem to be correct. Make sure to run "npm run build-dev" after saving all your changes! ###'
|
||||
exit 1
|
||||
fi
|
||||
- name: Check if CookieMonster.js is built correctly
|
||||
if: github.ref == 'refs/heads/master'
|
||||
run: |
|
||||
npx webpack -o ./tmp --env minimize --env finalfile
|
||||
if cmp <(head -n 2 dist/CookieMonster.js) <(head -n 2 tmp/CookieMonster.js); then
|
||||
echo '### SUCCESS: CookieMonster is built correctly! ###'
|
||||
else
|
||||
echo '### WARNING: CookieMonster.js does not seem to be correct. Make sure to run "npm run build-final" after saving all your changes! ###'
|
||||
exit 1
|
||||
fi
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 12
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
- name: Run ESLint
|
||||
run: npx eslint src
|
||||
- name: Run Mocha tests
|
||||
run: npx mocha
|
||||
- name: Check if CookieMonsterDev.js is built correctly
|
||||
run: |
|
||||
npx webpack -o ./tmp --env minimize
|
||||
if cmp <(head -n 2 dist/CookieMonsterDev.js) <(head -n 2 tmp/CookieMonsterDev.js); then
|
||||
echo '### SUCCESS: CookieMonsterDev is built correctly! ###'
|
||||
else
|
||||
echo '### WARNING: CookieMonsterDev.js does not seem to be correct. Make sure to run "npm run build-dev" after saving all your changes! ###'
|
||||
exit 1
|
||||
fi
|
||||
- name: Check if CookieMonster.js is built correctly
|
||||
if: github.ref == 'refs/heads/master'
|
||||
run: |
|
||||
npx webpack -o ./tmp --env minimize --env finalfile
|
||||
if cmp <(head -n 2 dist/CookieMonster.js) <(head -n 2 tmp/CookieMonster.js); then
|
||||
echo '### SUCCESS: CookieMonster is built correctly! ###'
|
||||
else
|
||||
echo '### WARNING: CookieMonster.js does not seem to be correct. Make sure to run "npm run build-final" after saving all your changes! ###'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
2
.github/workflows/publish-dev.yml
vendored
2
.github/workflows/publish-dev.yml
vendored
@@ -2,7 +2,7 @@ name: Publish
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "dev"
|
||||
- 'dev'
|
||||
jobs:
|
||||
publish-dev:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
Reference in New Issue
Block a user