1+ {
2+ "name" : " web-ifc" ,
3+ "version" : " 0.0.19" ,
4+ "description" : " ifc loading on the web" ,
5+ "main" : " web-ifc-api.js" ,
6+ "watch" : {
7+ "build-viewer" : {
8+ "patterns" : [
9+ " ./examples/viewer"
10+ ],
11+ "extensions" : " ts"
12+ },
13+ "build-web-ifc-api-mjs" : {
14+ "patterns" : [
15+ " ./src"
16+ ],
17+ "extensions" : " ts"
18+ }
19+ },
20+ "scripts" : {
21+ "gen-schema" : " cd src/schema && node gen.js" ,
22+ "setup-env" : " emsdk_env" ,
23+ "init-repo" : " git clone https://github.com/g-truc/glm ./src/wasm/deps/glm && git clone https://github.com/mapbox/earcut.hpp ./src/wasm/deps/earcut && git clone https://github.com/executionunit/csgjs-cpp ./src/wasm/deps/scgjs-cpp && npm run gen-schema" ,
24+ "build-release" : " npm run build-wasm-release && npm run build-api && npm run add-wasm-path" ,
25+ "build-debug" : " npm run build-wasm-debug && npm run build-api && npm run add-wasm-path" ,
26+ "release_publish" : " npm run build-release && cd dist && npm publish" ,
27+
28+ "build-wasm-debug" : " em++ --bind -O3 -g4 -std=c++17 --source-map-base http://localhost:5000/web-ifc-js/wasm-lib/ -flto -fno-exceptions ./src/wasm/web-ifc-api.cpp -s ALLOW_MEMORY_GROWTH=1 -s ASSERTIONS=1 -s FORCE_FILESYSTEM=1 -s EXPORT_NAME=WebIFCWasm -s MODULARIZE=1 -s EXTRA_EXPORTED_RUNTIME_METHODS=[\" FS\" ] -O3 -o dist/web-ifc.js" ,
29+ "build-wasm-release" : " em++ --bind -O3 -std=c++17 -flto -fno-exceptions ./src/wasm/web-ifc-api.cpp -s ALLOW_MEMORY_GROWTH=1 -s FORCE_FILESYSTEM=1 -s EXPORT_NAME=WebIFCWasm -s MODULARIZE=1 -s EXTRA_EXPORTED_RUNTIME_METHODS=[\" FS\" ] -O3 -o dist/web-ifc.js" ,
30+
31+ "build-api" : " cpy src/*.ts dist && npm run build-ts-api && npm run build-web-ifc-api-mjs && npm run build-web-ifc-api-node && npm run copy-to-dist" ,
32+ "build-ts-api" : " tsc --emitDeclarationOnly && cpy dist/web-ifc-api.d.ts dist && cpy dist/web-ifc-api.d.ts dist --rename=web-ifc-api-node.d.ts" ,
33+ "build-web-ifc-api-mjs" : " esbuild dist/web-ifc-api.ts --bundle --format=esm --external:path --external:fs --outfile=./dist/web-ifc-api.js" ,
34+ "build-web-ifc-api-node" : " esbuild dist/web-ifc-api.ts --bundle --platform=node --outfile=./dist/web-ifc-api-node.js" ,
35+ "copy-to-dist" : " cpy README.md dist && cpy package.json dist && cpy src/ifc2x4.ts dist" ,
36+
37+ "build-viewer" : " npm run bundle-viewer && npm run copy-wasm-viewer" ,
38+ "bundle-viewer" : " esbuild ./examples/viewer/web-ifc-viewer.ts --bundle --platform=node --outfile=./examples/viewer/web-ifc-viewer.js" ,
39+ "copy-wasm-viewer" : " cpy dist/web-ifc.wasm examples/viewer" ,
40+ "add-wasm-path" : " node src/utils/add-wasm-path.js" ,
41+ "serve-viewer" : " serve examples/viewer" ,
42+ "dev" : " concurrently --kill-others \" npm-watch\" \" npm run serve-viewer\" "
43+ },
44+ "author" : " tomvandig" ,
45+ "files" : [
46+ " web-ifc.wasm" ,
47+ " web-ifc-api-node.js" ,
48+ " web-ifc-api-node.d.ts" ,
49+ " web-ifc-api.js" ,
50+ " web-ifc-api.d.ts" ,
51+ " ifc2x4.d.ts" ,
52+ " ifc2x4_helper.d.ts"
53+ ],
54+ "devDependencies" : {
55+ "@types/three" : " ^0.125.3" ,
56+ "three" : " ^0.126.0" ,
57+ "concurrently" : " ^6.0.0" ,
58+ "cpy-cli" : " ^3.1.1" ,
59+ "esbuild" : " ^0.8.49" ,
60+ "npm-watch" : " ^0.7.0" ,
61+ "serve" : " ^11.3.2" ,
62+ "typescript" : " ^4.1.5"
63+ },
64+
65+ "browser" : {
66+ "crypto" : false ,
67+ "path" : false ,
68+ "fs" : false
69+ }
70+ }
0 commit comments