Skip to content

Commit

Permalink
Merge pull request #787 from DanielNoord/newrepo
Browse files Browse the repository at this point in the history
New repository
  • Loading branch information
DanielNoord committed May 2, 2021
2 parents 76c6d58 + 21b8a16 commit 6ff15db
Show file tree
Hide file tree
Showing 11 changed files with 51 additions and 36 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,21 @@ jobs:
run: npx eslint src
- name: Run Mocha tests
run: npx mocha
- name: Check if CookieMonster.js is built correctly
- name: Check if CookieMonsterDev.js is built correctly
run: |
npx webpack -o ./tmp --env production
if cmp <(head -n 2 dist/CookieMonster.js) <(head -n 2 tmp/CookieMonster.js); then
echo '### SUCCESS: CookieMonster is correctly built! ###'
if cmp <(head -n 2 dist/CookieMonsterDev.js) <(head -n 2 tmp/CookieMonsterDev.js); then
echo '### SUCCESS: CookieMonsterDev is correctly built! ###'
else
echo '### WARNING: CookieMonster.js does not seem to be correct. Make sure to run "npm run build" after saving all your changes! ###'
echo '### WARNING: CookieMonsterDev.js does not seem to be correct. Make sure to run "npm run build" after saving all your changes! ###'
exit 1
fi
if cmp <(head -n 2 CookieMonster.js) <(head -n 2 tmp/CookieMonster.js); then
- name: Check if CookieMonster.js is built correctly
if: github.ref == 'refs/heads/master'
run: |
if cmp <(head -n 2 dist/CookieMonsterDev.js) <(head -n 2 dist/CookieMonster.js); then
echo '### SUCCESS: CookieMonster is correctly built! ###'
else
echo '### WARNING: CookieMonster.js does not seem to be correct. Make sure to run "npm run build" after saving all your changes! ###'
echo '### WARNING: CookieMonster.js does not seem to be correct. Make sure to copy CookieMonsterDev.js into CookieMonster.js before merging to master! ###'
exit 1
fi
fi
2 changes: 1 addition & 1 deletion CookieMonster.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const readyCheck = setInterval(() => {
const Game = unsafeWindow.Game;

if (typeof Game !== 'undefined' && typeof Game.ready !== 'undefined' && Game.ready) {
Game.LoadMod('https://aktanusa.github.io/CookieMonster/CookieMonster.js');
Game.LoadMod('https://cookiemonsterteam.github.io/CookieMonster/dist/CookieMonster.js');
clearInterval(readyCheck);
}
}, 1000);
2 changes: 1 addition & 1 deletion .github/LICENSE.md → LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2014 Aktanusa
Copyright (c) 2021 CookieMonsterTeam

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
6 changes: 4 additions & 2 deletions dist/CookieMonster.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/CookieMonster.js.map

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions CookieMonster.js → dist/CookieMonsterDev.js

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions dist/CookieMonsterDev.js.LICENSE copy.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* jscolor - JavaScript Color Picker
*
* @link http://jscolor.com
* @license For open source use: GPLv3
* For commercial use: JSColor Commercial License
* @author Jan Odvarko - East Desire
*
* See usage examples at http://jscolor.com/examples/
*/
1 change: 1 addition & 0 deletions dist/CookieMonsterDev.js.map

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,11 @@
"Orteil"
],
"scripts": {
"copy-file": "cp dist/CookieMonster.js CookieMonster.js",
"eslint-src": "eslint src test",
"build": "run-s eslint-src pack-prod remove-comment copy-file test",
"build": "run-s eslint-src pack-prod test",
"build-test": "run-s pack-dev",
"pack-prod": "webpack --env production",
"pack-dev": "webpack",
"remove-comment": "sed -i '' -e '/\\/\\/# sourceMappingURL.*/d' dist/CookieMonster.js",
"test": "mocha"
},
"repository": {
Expand Down
28 changes: 10 additions & 18 deletions src/Data/Moddata.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/** Data related directly to Cookie Monster */

export const VersionMajor = '2.031';
export const VersionMinor = '7';
export const VersionMinor = '8';

/** Information about Cookie Monster to be displayed in the info section */
export const ModDescription = `<div class="listing">
<a href="https://github.com/Aktanusa/CookieMonster" target="blank">Cookie Monster</a>
<a href="https://github.com/CookieMonsterTeam/CookieMonster" target="blank">Cookie Monster</a>
offers a wide range of tools and statistics to enhance your game experience.
It is not a cheat interface – although it does offer helpers for golden cookies and such, everything can be toggled off at will to only leave how much information you want.</br>
Progess on new updates and all previous release notes can be found on the GitHub page linked above!</br>
Expand All @@ -15,25 +15,17 @@ export const ModDescription = `<div class="listing">

/** Latest releasenotes of Cookie Monster to be displayed in the info section */
export const LatestReleaseNotes = `<div class="listing">
These are the release notes for the latest update (v 2.031.7).</br>
<b>We have moved Cookie Monster to a new location!</b></br>
Please update the link you are using to load Cookie Monster to https://cookiemonsterteam.github.io/CookieMonster/dist/CookieMonster.js and let everybody know this is the new place to find Cookie Monster!</br>
These are the release notes for the latest update (v 2.031.8).</br>
</br>
This update implements the following functions:</br>
- Updated the ordering and description of all settings of Cookie Monster</br>
- Colours of Flash notifications can now be set by the user</br>
- You can now select a number of settings to be your 'favourite'. They will be displayed at the top of all other settings in a new section. This functionality is toggleable and you can find it in the miscellaneous section</br>
- The statistics page now shows cookies earned by clicking for a selected time period</br>
- The statistics page can now show missing normal achievements, this can be toggled in the settings</br>
- The tooltip of buildings now shows how many buildings need to be bought before a new achievement is reached and the cost and PP of this</br>
- New setting to force the upgrades sections to always show all available upgrades, stopping them from collapsing and expanding</br>
</br>
This update fixes the following bugs:</br>
- Fixed some typo's</br>
- No longer show the wrinkler pop buttons when wrinklers can't spawn</br>
- Fixed incorrect calculation of plant maturity for relevant tooltips</br>
- Fixed edit prompts not working in settings</br>
- Fixed red and purple being switched around for PP colour coding</br>
- Fixed incorrect notation of numbers in Dragon tooltip and interface</br>
- Fixed incorrect calculation of changing Dragon aura cost</br>
- Fixed incorrect calculation of changing Pantheon gods effect</br>
- Fixed fluctuating PP values when god Cyclius was selected</br>
- Fixed black flickering when Golden Cookies or buffs start</br>
- Settings menu now correctly updates after changing a setting</br>
- Fixed incorrect calculation of dates in rare cases</br>
- Remove golden cookie timers when you ascend</br>
</div>
`;
10 changes: 9 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const path = require('path');
const webpack = require('webpack');

module.exports = function (env) {
return {
Expand All @@ -21,8 +22,15 @@ module.exports = function (env) {
],
},
output: {
filename: 'CookieMonster.js',
filename: 'CookieMonsterDev.js',
path: path.resolve(__dirname, 'dist'),
},
plugins: [
new webpack.SourceMapDevToolPlugin({
filename: 'CookieMonsterDev.js.map',
publicPath: 'https://cookiemonsterteam.github.io/CookieMonster/dist/',
fileContext: 'public',
}),
],
};
};

0 comments on commit 6ff15db

Please sign in to comment.