You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@gimloader/build

Package Overview
Dependencies
Maintainers
0
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gimloader/build - npm Package Compare versions

Comparing version

to
1.0.0

dist/build/addHeaders.d.ts

19

package.json
{
"name": "@gimloader/build",
"version": "0.2.6",
"version": "1.0.0",
"description": "A package to help build complex plugins for Gimloader",
"main": "dist/src/index.js",
"main": "dist/index.js",
"type": "module",
"files": [

@@ -13,4 +14,4 @@ "dist"

"bin": {
"gimloader": "dist/src/cli.js",
"gl": "dist/src/cli.js"
"gimloader": "dist/cli.js",
"gl": "dist/cli.js"
},

@@ -26,17 +27,13 @@ "repository": {

"license": "MIT",
"types": "./dist/src/index.d.ts",
"types": "./dist/index.d.ts",
"dependencies": {
"@inquirer/prompts": "^5.1.2",
"chokidar": "^3.6.0",
"chokidar": "^4.0.3",
"esbuild": "^0.23.1",
"express": "^4.19.2",
"rollup": "^4.18.1",
"yargs": "^17.7.2"
},
"devDependencies": {
"@types/express": "^4.17.21",
"@types/node": "^20.14.10",
"@types/yargs": "^17.0.32",
"@types/yargs": "^17.0.33",
"typescript": "^5.5.3"
}
}
# @gimloader/build
This is a package that provides a set of tools to help build more complex [Gimloader](https://github.com/TheLazySquid/Gimloader) plugins / libraries.
This is a package that provides a preconfigured bundler to help build more complex [Gimloader](https://github.com/TheLazySquid/Gimloader) plugins and libraries.
## Installation
## Setup
```bash
npm i -g @gimloader/build
```
To get started, run `npm create @gimloader` in the directory you wish to create the plugin / library in. You can also install it globally by running `npm i -g @gimloader/build`, which you may want for commands such as servefile.
## Usage
## Config
### Setup
Config is housed in the file GL.config.js in the root folder.
To get started, make an empty folder and run the following command in the terminal:
```bash
gl init
```
From there you will be given some options to choose from. This command will generate the file `GL.config.js`, which houses the configuration for the build tools. You can pick between [esbuild](https://esbuild.github.io/) and [Rollup](https://rollupjs.org/) for bundlers.
##### Mandatory Fields

@@ -32,11 +22,3 @@ - `input`: The input file that will be compiled.

- `downloadUrl`: The download URL for the plugin / library, used by Gimloader for updates.
- `bundler`: This decides which bundler is used. Set to esbuild to use esbuild, otherwise Rollup is used.
- `reloadRequired`: Set to true if the plugin / library needs a reload to take effect, or set to "ingame" if it only needs a reload when in-game.
##### Optional Fields (Rollup)
- `plugins`: An array of Rollup plugins to use.
- `rollupOptions`: Options to pass to Rollup.
- `outputOptions`: Options to pass to Rollup's output.
##### Optional Fields (Esbuild)
- `plugins`: An array of Esbuild plugins to use

@@ -54,10 +36,10 @@ - `esbuildOptions`: Options to pass to esbuild

Running `gl build` will compile the plugin / library and output it to `build/[plugin name].js`.
Running `npx gl build` will compile the plugin / library and output it to `build/[plugin name].js`.
### Hot Reload
Running `gl serve` will start a local server to host the plugin / library. If the "Poll for plugins/libraries being served locally" setting is enabled on Gimloader, it will automatically detect changes to the plugin / library and reload it. By default, the plugin will be built whenever you save its files, but passing --manual will change it to only build when pressing enter in the terminal.
Running `npx gl serve` will start a local server to host the plugin / library. If the "Poll for plugins/libraries being served locally" setting is enabled on Gimloader, it will automatically detect changes to the plugin / library and reload it. By default, the plugin will be built whenever you save its files, but passing --manual will change it to only build when pressing enter in the terminal.
### Serving a single file
You can run `gl servefile <file>` to serve a single javscript file, which will automatically reload when the file is changed. Similarly to `gl serve`, passing --manual will change it to only update when pressing enter in the terminal.
You can run `npx gl servefile <file>` to serve a single javscript file, which will automatically reload when the file is changed. Similarly to `gl serve`, passing --manual will change it to only update when pressing enter in the terminal.