This commit is contained in:
Evert Prants 2024-04-25 17:32:39 +03:00
parent a7c1a6199f
commit d93b1ffaf1
Signed by: evert
GPG Key ID: 1688DA83D222D0B5
6 changed files with 27 additions and 9 deletions

4
.npmignore Normal file
View File

@ -0,0 +1,4 @@
inputs/
outputs/
src/
.prettierrc

1
bin/mson-three.js Normal file
View File

@ -0,0 +1 @@
require('../lib/cli');

12
package-lock.json generated
View File

@ -8,6 +8,12 @@
"name": "mson-three",
"version": "1.0.0",
"license": "ISC",
"dependencies": {
"three": "^0.161.0"
},
"bin": {
"mson-three": "bin/mson-three.js"
},
"devDependencies": {
"@types/node": "^20.11.19",
"@types/three": "^0.161.2",
@ -17,8 +23,7 @@
"optionalDependencies": {
"buffer": "^6.0.3",
"canvas": "^2.11.2",
"commander": "^12.0.0",
"three": "^0.161.0"
"commander": "^12.0.0"
}
},
"node_modules/@mapbox/node-pre-gyp": {
@ -799,8 +804,7 @@
"node_modules/three": {
"version": "0.161.0",
"resolved": "https://registry.npmjs.org/three/-/three-0.161.0.tgz",
"integrity": "sha512-LC28VFtjbOyEu5b93K0bNRLw1rQlMJ85lilKsYj6dgTu+7i17W+JCCEbvrpmNHF1F3NAUqDSWq50UD7w9H2xQw==",
"optional": true
"integrity": "sha512-LC28VFtjbOyEu5b93K0bNRLw1rQlMJ85lilKsYj6dgTu+7i17W+JCCEbvrpmNHF1F3NAUqDSWq50UD7w9H2xQw=="
},
"node_modules/tr46": {
"version": "0.0.3",

View File

@ -1,12 +1,20 @@
{
"name": "mson-three",
"version": "1.0.0",
"description": "",
"main": "index.js",
"description": "Mson to THREE.js utilities",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"exports": {
".": "./lib/index.js"
},
"bin": {
"mson-three": "./bin/mson-three.js"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "tsc",
"watch": "tsc -w"
"watch": "tsc -w",
"prepare": "npm run build"
},
"keywords": [],
"author": "",

View File

@ -51,7 +51,7 @@ const program = new Command();
program
.name('mson-three')
.description('Convert Mson models to THREE.js models (and others)')
.version('0.0.1');
.version('1.0.0');
program
.command('export')
@ -67,6 +67,7 @@ program
.option('-t, --target <path>', 'Path to place outputs into', 'outputs')
.action(async (models: string[], options: CliOptions) => {
console.log(` ... Reading Mson resources`);
await fillStoreFromFilesystem(
store,
resolve(process.cwd(), options.store || 'inputs'),

View File

@ -44,7 +44,7 @@
// "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
// "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
/* Emit */
// "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
"declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
// "declarationMap": true, /* Create sourcemaps for d.ts files. */
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
// "sourceMap": true, /* Create source map files for emitted JavaScript files. */