Skip to content

Commit

Permalink
Change presets export, docs
Browse files Browse the repository at this point in the history
  • Loading branch information
xShadowBlade committed Jun 8, 2024
1 parent bea79fc commit aa61bec
Show file tree
Hide file tree
Showing 21 changed files with 100 additions and 4,803 deletions.
31 changes: 28 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,35 @@ When reporting issues, please include as much detail as possible, including step
7. Push to the branch: `git push origin feature/new-feature`
8. Submit a pull request to the `main` branch of the main repository.

### Codebase Overview

The project is structured as follows:

#### Files

- [`.eslintrc.json`](./.eslintrc.json): Contains the ESLint configuration for the project.
- [`tsconfig.json`](./tsconfig.json): Contains the TypeScript configuration for the project.
- [`tsconfig.eslint.json`](./tsconfig.eslint.json): Contains the TypeScript configuration for ESLint.
- [`typedoc.json`](./typedoc.json): Contains the TypeDoc configuration for generating documentation.
- [`package.json`](./package.json): Contains the project metadata and dependencies.

#### Directories

- [`/src/`](./src): Contains the source code for the library. It is written in TypeScript and compiled to JavaScript. See the [corresponding README](./src/README.md) for more details.
- [`/dist/`](./dist): Contains the compiled JavaScript files and TypeScript declaration files. Once you've made changes to the source code, you can compile it using `npm run build`.
- [`/bin/build/`](./bin/build): Contains the build scripts used to compile the TypeScript source code.
- [`/documentation/`](./documentation): Contains the documentation files for the project. The built documentation automatically generated from the source code using TypeDoc and built by GitHub actions.
- [`/test/`](./test): Contains the test files for the project. See the [corresponding README](./test/README.md) for more details.
- [`/examples/`](./examples): Contains example files and demos showcasing the usage of the library. It is not regularly updated and may be out of date.

### Code Style

Please follow the existing code style and conventions used throughout the project. Additionally, ensure that your code is well-documented and includes appropriate comments where necessary.
Please follow the existing code style and conventions used throughout the project. This project uses ESLint to enforce code quality and consistency. You can run ESLint using `npm run lint` or `npm run lint:fix` to automatically fix some issues.

> [!NOTE]
> Prettier is not currently used in this project, despite the presence of a `.prettierrc` file. This may change in the future.
Additionally, ensure that your code is well-documented and includes appropriate comments (including JSDoc comments for functions and classes).

### Testing

Expand All @@ -41,8 +67,7 @@ Please note that this project is governed by the [Contributor Covenant Code of C

## Credits

This project would not be possible without the contributions of its community members. Special thanks to [Patashu](https://github.com/Patashu) for making [break_eternity.js](https://github.com/Patashu/break_eternity.js)
and [MrRedShark77](https://github.com/MrRedShark77/) for the formats and inspiration.
This project would not be possible without the contributions of its community members. Special thanks to [Patashu](https://github.com/Patashu) for making [break_eternity.js](https://github.com/Patashu/break_eternity.js) and [MrRedShark77](https://github.com/MrRedShark77/) for the formats.

---

Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ eMath.js is a JavaScript library designed to provide tools for incremental game
<br>
<img src="https://img.shields.io/github/stars/xShadowBlade/emath.js?color=yellow&style=for-the-badge">
<a href="https://github.com/xShadowBlade/emath.js/issues" alt=""><img src="https://img.shields.io/github/issues/xShadowBlade/emath.js?style=for-the-badge"></a>
<br><img src="https://img.shields.io/github/v/release/xShadowBlade/emath.js?color=green&style=for-the-badge">
<br><img src="https://img.shields.io/github/v/release/xShadowBlade/emath.js?color=green&style=for-the-badge">
<br><img src="https://img.shields.io/badge/Made%20by%3A-xShadowBlade%232720-blue?style=social&logo=discord">
</div>

Expand Down Expand Up @@ -123,6 +123,8 @@ npm install emath.js

### Include using CDN

Include the following script in your HTML file. It will set the global variable `eMath` to the `window` object.

> Note: There is no development build for CDN, as it is used for nodejs.
> Replace `@latest` with the version you want to use. (e.g. `@8.3.0`), or use `@latest` for the latest version.
Expand All @@ -142,7 +144,9 @@ Also includes `"emath.js"` so you only need to include this script.

#### emath.js/presets

Also includes `"emath.js"` and `"emath.js/game"` so you only need to include this script.
Sets the global variable `eMathPresets` to the `window` object.

> Note: This does not include either `"emath.js"` or `"emath.js/game"`.
```html
<script src="https://cdn.jsdelivr.net/npm/emath.js@latest/dist/presets/eMath.presets.min.js"></script>
Expand Down
5 changes: 0 additions & 5 deletions bin/test.cmd

This file was deleted.

3 changes: 0 additions & 3 deletions bin/test.sh

This file was deleted.

2 changes: 1 addition & 1 deletion dist/game/eMath.game.js
Original file line number Diff line number Diff line change
Expand Up @@ -6790,7 +6790,7 @@ var DataManager = class {
const hasedData = (0, import_md5.default)(`${this.gameRef.config.name.id}/${JSON.stringify(gameDataString)}`);
let version;
try {
version = "9.0.0";
version = "9.0.1";
} catch (error) {
version = "8.3.0";
}
Expand Down
2 changes: 1 addition & 1 deletion dist/game/eMath.game.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/game/eMath.game.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6756,7 +6756,7 @@ var DataManager = class {
const hasedData = (0, import_md5.default)(`${this.gameRef.config.name.id}/${JSON.stringify(gameDataString)}`);
let version;
try {
version = "9.0.0";
version = "9.0.1";
} catch (error) {
version = "8.3.0";
}
Expand Down
Loading

0 comments on commit aa61bec

Please sign in to comment.