forked from ThatOpen/engine_web-ifc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
60 lines (57 loc) · 2.8 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
{
"name": "web-ifc",
"version": "0.0.17",
"description": "ifc loading on the web",
"main": "web-ifc-api.js",
"watch": {
"build-viewer": {
"patterns": [
"./examples/viewer"
],
"extensions": "ts"
},
"build-web-ifc-api-mjs": {
"patterns": [
"./src"
],
"extensions": "ts"
}
},
"scripts": {
"gen-schema": "cd src/schema && node gen.js",
"setup-env": "emsdk_env",
"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",
"build-release": "npm run build-wasm-release && npm run build-api",
"build-debug": "npm run build-wasm-debug && npm run build-api",
"release_publish": "npm run build-release && cd dist && npm publish",
"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 -O3 -o dist/web-ifc.js",
"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 -O3 -o dist/web-ifc.js",
"build-api": "cpy src/web-ifc-api.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",
"build-ts-api": "tsc --emitDeclarationOnly && cpy dist/web-ifc-api.d.ts dist --rename=web-ifc-api-node.d.ts",
"build-web-ifc-api-mjs": "esbuild dist/web-ifc-api.ts --bundle --format=esm --external:path --external:fs --outfile=./dist/web-ifc-api.js",
"build-web-ifc-api-node": "esbuild dist/web-ifc-api.ts --bundle --platform=node --outfile=./dist/web-ifc-api-node.js",
"copy-to-dist": "cpy README.md dist && cpy package.json dist && cpy src/ifc2x4.ts dist",
"build-viewer": "npm run bundle-viewer && npm run copy-wasm-viewer",
"bundle-viewer": "esbuild ./examples/viewer/web-ifc-viewer.ts --bundle --platform=node --outfile=./examples/viewer/web-ifc-viewer.js",
"copy-wasm-viewer": "cpy dist/web-ifc.wasm examples/viewer",
"serve-viewer": "serve examples/viewer",
"dev": "concurrently --kill-others \"npm-watch\" \"npm run serve-viewer\""
},
"author": "tomvandig",
"files": [
"web-ifc.wasm",
"web-ifc-api-node.js",
"web-ifc-api.js",
"web-ifc-api.d.ts"
],
"devDependencies": {
"@types/three": "^0.125.3",
"three": "^0.126.0",
"concurrently": "^6.0.0",
"cpy-cli": "^3.1.1",
"esbuild": "^0.8.49",
"npm-watch": "^0.7.0",
"serve": "^11.3.2",
"typescript": "^4.1.5"
}
}