Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/loathers/kolmafia-scripts
https://github.com/loathers/kolmafia-scripts
Last synced: about 23 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/loathers/kolmafia-scripts
- Owner: loathers
- Created: 2021-02-03T18:47:33.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-11-16T11:38:08.000Z (about 3 years ago)
- Last Synced: 2024-10-24T17:54:27.026Z (3 months ago)
- Language: TypeScript
- Size: 72.3 KB
- Stars: 1
- Watchers: 8
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# kolmafia-scripts
`kolmafia-scripts` is designed to make building a KoLmafia script using JavaScript incredibly easy.
## Getting started
Just run `yarn add --dev kolmafia-scripts` and then set up your `package.json` like this:
```json
{
"name": "my-package-name",
"main": "RELEASE/scripts/my-package-name/my-package-name.js",
"mainSrc": "src/main.ts",
"scripts": {
"build": "kolmafia-scripts build",
"watch": "kolmafia-scripts watch"
},
"devDependencies": {
"kolmafia-scripts": "^0.0.3",
"kolmafia": "^1.4.0"
},
"peerDependencies": {
"kolmafia": "^1.4.0"
}
}
```| | |
|---------|---------------------------------------------------------------|
| main | should point to where you would like your compiled code to go |
| mainSrc | should point to the entrypoint to your uncompiled code |Note: Installing `kolmafia` here (as shown above) is optional but recommended, especially for `TypeScript`.
## Developing
To build your project run `yarn build`. You can also set it to automatically build as you make changes with `yarn watch`.
## TypeScript
If you want to use TypeScript, all you need to do is `yarn add --dev typescript` and then create a `tsconfig.json`. `kolmafia-scripts` ships with a base TypeScript configuration that you can use or extend by writing your `tsconfig.json` like this:
```json
{
"extends": "kolmafia-scripts/tsconfig.json"
}
```