@chrisivey01/builder 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +32 -32
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @pma/build
1
+ # @chrisivey01/builder
2
2
 
3
3
  A build tool for FiveM/RedM resources with watch mode and auto-restart support.
4
4
 
@@ -14,11 +14,11 @@ A build tool for FiveM/RedM resources with watch mode and auto-restart support.
14
14
  ## Installation
15
15
 
16
16
  ```bash
17
- pnpm add -D @pma/build
17
+ pnpm add -D @chrisivey01/builder
18
18
  # or
19
- npm install --save-dev @pma/build
19
+ npm install --save-dev @chrisivey01/builder
20
20
  # or
21
- yarn add -D @pma/build
21
+ yarn add -D @chrisivey01/builder
22
22
  ```
23
23
 
24
24
  ## Usage
@@ -29,12 +29,12 @@ Add to your `package.json` scripts:
29
29
 
30
30
  ```json
31
31
  {
32
- "scripts": {
33
- "build": "pma-build",
34
- "watch": "pma-build --watch",
35
- "build:redm": "pma-build --redm",
36
- "watch:redm": "pma-build --watch --redm"
37
- }
32
+ "scripts": {
33
+ "build": "build",
34
+ "watch": "build --watch",
35
+ "build:redm": "build --redm",
36
+ "watch:redm": "build --watch --redm"
37
+ }
38
38
  }
39
39
  ```
40
40
 
@@ -50,18 +50,18 @@ pnpm watch:redm # Watch mode for RedM
50
50
  ### Programmatic API
51
51
 
52
52
  ```javascript
53
- import { build } from '@pma/build';
53
+ import { build } from "@chrisivey01/builder";
54
54
 
55
55
  await build({
56
- resourceName: 'my-resource',
57
- restartEndpoint: 'http://127.0.0.1:4689/rr',
58
- restartTimeout: 2000,
59
- debounceDelay: 500,
60
- webDevPort: 5173,
61
- builds: {
62
- client: { platform: 'browser', target: 'es2021', format: 'iife' },
63
- server: { platform: 'node', target: 'node16', format: 'cjs' }
64
- }
56
+ resourceName: "my-resource",
57
+ restartEndpoint: "http://127.0.0.1:4689/rr",
58
+ restartTimeout: 2000,
59
+ debounceDelay: 500,
60
+ webDevPort: 5173,
61
+ builds: {
62
+ client: { platform: "browser", target: "es2021", format: "iife" },
63
+ server: { platform: "node", target: "node16", format: "cjs" },
64
+ },
65
65
  });
66
66
  ```
67
67
 
@@ -71,14 +71,14 @@ Create a `build.config.js` in your project root:
71
71
 
72
72
  ```javascript
73
73
  export default {
74
- restartEndpoint: 'http://127.0.0.1:4689/rr',
75
- restartTimeout: 2000,
76
- debounceDelay: 500,
77
- webDevPort: 5173,
78
- builds: {
79
- client: { platform: 'browser', target: 'es2021', format: 'iife' },
80
- server: { platform: 'node', target: 'node16', format: 'cjs' }
81
- }
74
+ restartEndpoint: "http://127.0.0.1:4689/rr",
75
+ restartTimeout: 2000,
76
+ debounceDelay: 500,
77
+ webDevPort: 5173,
78
+ builds: {
79
+ client: { platform: "browser", target: "es2021", format: "iife" },
80
+ server: { platform: "node", target: "node16", format: "cjs" },
81
+ },
82
82
  };
83
83
  ```
84
84
 
@@ -88,10 +88,10 @@ The build tool automatically injects a `GAME` constant into your code:
88
88
 
89
89
  ```typescript
90
90
  // Available globally in your code
91
- if (GAME === 'REDM') {
92
- console.log('Running on RedM');
91
+ if (GAME === "REDM") {
92
+ console.log("Running on RedM");
93
93
  } else {
94
- console.log('Running on FiveM');
94
+ console.log("Running on FiveM");
95
95
  }
96
96
  ```
97
97
 
@@ -99,7 +99,7 @@ Add this to your `types/game.d.ts`:
99
99
 
100
100
  ```typescript
101
101
  declare global {
102
- const GAME: "REDM" | "FIVEM";
102
+ const GAME: "REDM" | "FIVEM";
103
103
  }
104
104
 
105
105
  export {};
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@chrisivey01/builder",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Build tool for FiveM/RedM resources with watch mode and auto-restart",
5
5
  "type": "module",
6
6
  "main": "index.js",
7
7
  "bin": {
8
- "pma-build": "./cli.js"
8
+ "build": "./cli.js"
9
9
  },
10
10
  "keywords": [
11
11
  "fivem",