@chrisivey01/builder 1.0.6 → 1.0.7
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.
- package/index.d.ts +4 -0
- package/index.js +3 -1
- package/package.json +5 -3
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -23,6 +23,7 @@ import { basename, resolve } from 'path';
|
|
|
23
23
|
* @property {string} [serverIP] - Server IP address for remote access. Checks SERVER_IP or HOST env vars if not provided
|
|
24
24
|
* @property {Record<string, BuildConfig>} [builds] - Build configurations for different targets
|
|
25
25
|
* @property {Record<string, string>} [define] - Additional esbuild define values
|
|
26
|
+
* @property {boolean} [sourceMaps] - Whether to generate source maps. Defaults to true
|
|
26
27
|
*/
|
|
27
28
|
|
|
28
29
|
/**
|
|
@@ -62,6 +63,7 @@ export async function build(options = {}) {
|
|
|
62
63
|
const resource_name = options.resourceName || basename(resolve(cwd));
|
|
63
64
|
const args = options.args || process.argv.slice(2);
|
|
64
65
|
const IS_WATCH = args.includes('--watch');
|
|
66
|
+
const SOURCE_MAPS = options.sourceMaps !== undefined ? options.sourceMaps : !args.includes('--no-sourcemaps');
|
|
65
67
|
const IS_REDM = args.includes('--redm');
|
|
66
68
|
const HAS_WEB_DIR = fs.existsSync(resolve(cwd, './web'));
|
|
67
69
|
const PORT = IS_REDM ? 4700 : 4689;
|
|
@@ -167,7 +169,7 @@ export async function build(options = {}) {
|
|
|
167
169
|
bundle: true,
|
|
168
170
|
entryPoints: [resolve(cwd, `./${name}/main.ts`)],
|
|
169
171
|
outfile: resolve(cwd, `dist/${name}.js`),
|
|
170
|
-
sourcemap:
|
|
172
|
+
sourcemap: SOURCE_MAPS,
|
|
171
173
|
logLevel: 'info',
|
|
172
174
|
define: {
|
|
173
175
|
GAME: IS_REDM ? '"REDM"' : '"FIVEM"',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chrisivey01/builder",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "Build tool for FiveM/RedM resources with watch mode and auto-restart",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -13,6 +13,9 @@
|
|
|
13
13
|
"index.d.ts",
|
|
14
14
|
"cli.js"
|
|
15
15
|
],
|
|
16
|
+
"scripts": {
|
|
17
|
+
"prepublishOnly": "tsc index.js --declaration --allowJs --emitDeclarationOnly"
|
|
18
|
+
},
|
|
16
19
|
"keywords": [
|
|
17
20
|
"fivem",
|
|
18
21
|
"redm",
|
|
@@ -30,6 +33,5 @@
|
|
|
30
33
|
},
|
|
31
34
|
"devDependencies": {
|
|
32
35
|
"typescript": "^5.9.3"
|
|
33
|
-
}
|
|
34
|
-
"scripts": {}
|
|
36
|
+
}
|
|
35
37
|
}
|