-
Notifications
You must be signed in to change notification settings - Fork 42
/
package.json
231 lines (231 loc) 路 8.81 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
{
"name": "cubing",
"version": "0.16.7",
"description": "A collection of Javascript cubing libraries.",
"author": "The js.cubing.net team",
"type": "module",
"types": "dist/types/index.d.ts",
"license": "GPL-3.0-or-later",
"repository": "github:cubing/cubing.js",
"dependencies": {
"@types/three": "^0.126.1",
"@types/web-bluetooth": "0.0.4",
"three": "^0.126.1"
},
"devDependencies": {
"@babel/core": "^7.12.3",
"@babel/plugin-proposal-class-properties": "^7.12.1",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.12.1",
"@babel/plugin-proposal-optional-chaining": "^7.12.1",
"@babel/plugin-proposal-private-methods": "^7.12.1",
"@babel/plugin-transform-runtime": "^7.12.1",
"@babel/preset-env": "^7.11.5",
"@babel/preset-typescript": "^7.12.1",
"@babel/runtime": "^7.12.5",
"@parcel/transformer-image": "^2.0.0-nightly.2267",
"@types/jest": "^24.9.1",
"@typescript-eslint/eslint-plugin": "^4.17.0",
"@typescript-eslint/parser": "^4.17.0",
"babel-jest": "^24.9.0",
"babylonjs": "^4.2.0",
"baretest": "^2.0.0",
"esbuild": "^0.9.3",
"eslint": "^7.21.0",
"eslint-config-mdcs": "^5.0.0",
"eslint-config-prettier": "^8.1.0",
"eslint-plugin-html": "^6.1.0",
"eslint-plugin-prettier": "^3.3.1",
"jest": "^26.4.2",
"jszip": "^3.5.0",
"parcel": "^2.0.0-nightly.643",
"pegjs": "^0.11.0-master.f69239d",
"prettier": "^2.2.1",
"puppeteer": "^8.0.0",
"ts-jest": "^26.3.0",
"typescript": "^4.2.3",
"yargs": "^16.2.0"
},
"scripts": {
"build": "npm run clean && npm run build-esm && npm run build-cjs && npm run build-bundle-global && npm run build-types && npm run build-bin",
"build-esm": "npx esbuild --target=es2015 --bundle --external:three --splitting --format=esm --sourcemap --outdir=dist/esm src/cubing/index.ts src/cubing/alg/index.ts src/cubing/bluetooth/index.ts src/cubing/kpuzzle/index.ts src/cubing/protocol/index.ts src/cubing/puzzle-geometry/index.ts src/cubing/puzzles/index.ts src/cubing/stream/index.ts src/cubing/twisty/index.ts && cp -R src/dist-static/esm/* dist/esm",
"build-cjs": "npx esbuild --target=es2015 --bundle --external:three --format=cjs --outfile=dist/cjs/index.js src/cubing/index.ts && cp -R src/dist-static/cjs/* dist/cjs",
"build-bundle-global": "npx esbuild --target=es2015 --bundle --format=cjs --minify --outdir=dist/bundle-global src/cubing/cubing.bundle-global.ts",
"build-types": "npx tsc src/cubing/*.ts src/cubing/**/*.ts --declaration --emitDeclarationOnly --outDir dist/types --target es2015 --module es2020 --moduleResolution node --lib esnext,dom --resolveJsonModule --allowJs --allowSyntheticDefaultImports # TODO: unify with tsconfig.json",
"build-bin": "npx esbuild --target=es2015 --bundle --external:three --format=esm --outfile=dist/bin/puzzle-geometry-bin.js src/bin/puzzle-geometry-bin.ts",
"build-experimental-splitting-build": "node src/make/build.js",
"generate-js": "npm run generate-js-parsers && npm run generate-js-svg",
"generate-js-parsers": "npx pegjs src/cubing/alg/parser/parser-pegjs.pegjs && npx pegjs src/cubing/kpuzzle/parser/parser-pegjs.pegjs",
"generate-js-svg": "echo \"TODO: Generating JS for SVGs is not implemented yet.\"",
"dev": "npm run clean && npx parcel serve --no-autoinstall src/demo/index.html --port 3333 --open --dist-dir /tmp/cubing-js-parcel # cleaning is a workaround for one set of Parcel bugs, /tmp dir is a workaround dir for other Parcel bugs",
"clean": "rm -rf dist .cache .parcel-cache .rpt2_cache /tmp/cubing-js-parcel",
"test": "npm run test-jest && npm run lint && npm run build-experimental-splitting-build",
"test-jest": "npx jest --collectCoverage",
"test-node-require": "node src/dist-test/require.cjs",
"test-node-import": "node src/dist-test/import.mjs",
"format": "npx eslint --fix --ext=js,ts .; npx prettier --write src */index.d.ts",
"setup": "npm install",
"lint": "npx eslint --ext=js,ts .",
"prepack": "npm run clean && npm run build && npm run test-node-require && npm run test-node-import",
"parcel-build-for-twizzle-net": "parcel build --no-scope-hoist --no-optimize --target twizzle-net --public-url ./ --dist-dir dist/twizzle.net/explore src/demo/twizzle/index.html",
"parcel-build-for-vr-cubing-net": "parcel build --no-scope-hoist --no-optimize --target vr-cubing-net --public-url ./ --dist-dir dist/experiments.cubing.net/vr src/demo/vr/index.html",
"parcel-build-for-experiments-cubing-net": "parcel build --no-scope-hoist --no-optimize --target experiments-cubing-net --public-url /cubing.js/ --dist-dir dist/experiments.cubing.net/cubing.js src/demo/index.html",
"parcel-build-for-twizzle-diaries": "parcel build --no-scope-hoist --target twizzle-diaries --public-url /twizzle-diaries/ --dist-dir dist/experiments.cubing.net src/demo/twizzle-diaries/index.html"
},
"targets": {
"twizzle-net": {},
"vr-cubing-net": {},
"experiments-cubing-net": {},
"twizzle-diaries": {}
},
"keywords": [
"cubing",
"speedcubing",
"puzzle",
"visualization",
"kpuzzle",
"cuble",
"bluetooth",
"rubik",
"rubik's"
],
"eslintConfig": {
"root": true,
"parserOptions": {
"project": "./tsconfig.json"
},
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint"
],
"rules": {
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-unused-vars-experimental": "error",
"@typescript-eslint/no-non-null-assertion": "off",
"eqeqeq": "error",
"quote-props": [
"error",
"consistent-as-needed"
],
"lines-between-class-members": [
"error",
"always",
{
"exceptAfterSingleLine": true
}
]
},
"ignorePatterns": [
"/coverage",
"/dist",
"/dist-test",
"/src/vendor/modules/three/examples/jsm/libs/stats.module.d.ts",
"/src/vendor/modules/three/examples/jsm/libs/stats.module.js",
"parser-pegjs.js"
],
"env": {
"commonjs": true,
"browser": true,
"node": true
}
},
"prettier": {
"semi": true,
"trailingComma": "all",
"tabWidth": 2,
"quoteProps": "consistent"
},
"exports": {
".": {
"require": "./dist/cjs/index.js",
"import": "./index.js",
"types": "./types/types/index.d.ts"
},
"./alg": {
"require": "./dist/cjs/alg/index.js",
"import": "./dist/esm/alg/index.js",
"types": "./dist/types/alg/index.d.ts"
},
"./bluetooth": {
"require": "./dist/cjs/bluetooth/index.js",
"import": "./dist/esm/bluetooth/index.js",
"types": "./dist/types/bluetooth/index.d.ts"
},
"./kpuzzle": {
"require": "./dist/cjs/kpuzzle/index.js",
"import": "./dist/esm/kpuzzle/index.js",
"types": "./dist/types/kpuzzle/index.d.ts"
},
"./notation": {
"require": "./dist/cjs/notation/index.js",
"import": "./dist/esm/notation/index.js",
"types": "./dist/types/notation/index.d.ts"
},
"./protocol": {
"require": "./dist/cjs/protocol/index.js",
"import": "./dist/esm/protocol/index.js",
"types": "./dist/types/protocol/index.d.ts"
},
"./puzzle-geometry": {
"require": "./dist/cjs/puzzle-geometry/index.js",
"import": "./dist/esm/puzzle-geometry/index.js",
"types": "./dist/esm/types/puzzle-geometry/index.d.ts"
},
"./puzzles": {
"require": "./dist/cjs/puzzles/index.js",
"import": "./dist/esm/puzzles/index.js",
"types": "./dist/esm/types-geometry/index.d.ts"
},
"./stream": {
"require": "./dist/cjs/stream/index.js",
"import": "./dist/esm/stream/index.js",
"types": "./dist/types/stream/index.d.ts"
},
"./twisty": {
"require": "./dist/cjs/twisty/index.js",
"import": "./dist/esm/twisty/index.js",
"types": "./dist/types/twisty/index.d.ts"
}
},
"babel": {
"presets": [
[
"@babel/preset-env",
{
"targets": {
"node": "current"
}
}
],
"@babel/preset-typescript"
],
"plugins": [
"@babel/plugin-transform-runtime",
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-private-methods",
"@babel/plugin-proposal-optional-chaining",
"@babel/plugin-proposal-nullish-coalescing-operator"
]
},
"jest": {
"roots": [
"<rootDir>/src"
],
"transformIgnorePatterns": [
"node_modules/(?!(three/))"
]
},
"files": [
"/LICENSE.md",
"/README.md",
"/package.json",
"/package-lock.json",
"/dist/**/*",
"/src/cubing/**/*",
"/docs/**/*",
"/*/package.json",
"/*/index.d.ts"
]
}