@littlecarlito/blorktools 0.52.0 → 0.52.2
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/bin/cli.js +5 -4
- package/package.json +2 -2
- package/vite.config.js +1 -0
package/bin/cli.js
CHANGED
|
@@ -7,7 +7,7 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
|
7
7
|
const packageRoot = path.resolve(__dirname, '..');
|
|
8
8
|
const SUBCOMMANDS = {
|
|
9
9
|
debugger: {
|
|
10
|
-
|
|
10
|
+
root: 'src/asset_debugger',
|
|
11
11
|
description: '3D asset debugger with drag-and-drop interface'
|
|
12
12
|
}
|
|
13
13
|
};
|
|
@@ -72,16 +72,17 @@ function parseArgs(args) {
|
|
|
72
72
|
|
|
73
73
|
async function main() {
|
|
74
74
|
const args = parseArgs(process.argv.slice(2));
|
|
75
|
-
const
|
|
75
|
+
const subcommand = args.command ? SUBCOMMANDS[args.command] : null;
|
|
76
|
+
const rootDir = subcommand ? path.join(packageRoot, subcommand.root) : path.join(packageRoot, 'src');
|
|
76
77
|
const viteConfig = await import(path.join(packageRoot, 'vite.config.js'));
|
|
77
78
|
const config = viteConfig.default;
|
|
78
79
|
config.server = {
|
|
79
80
|
...config.server,
|
|
80
81
|
port: args.port,
|
|
81
82
|
host: args.host,
|
|
82
|
-
open: args.open ?
|
|
83
|
+
open: args.open ? '/index.html' : false
|
|
83
84
|
};
|
|
84
|
-
config.root =
|
|
85
|
+
config.root = rootDir;
|
|
85
86
|
const server = await createServer(config);
|
|
86
87
|
await server.listen();
|
|
87
88
|
server.printUrls();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@littlecarlito/blorktools",
|
|
3
|
-
"version": "0.52.
|
|
3
|
+
"version": "0.52.2",
|
|
4
4
|
"description": "Development tools for 3D assets and debugging",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"access": "public"
|
|
46
46
|
},
|
|
47
47
|
"license": "SEE LICENSE IN LICENSE",
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "d317bcab9cd34ab37fb893963345b54582047c5d"
|
|
49
49
|
}
|