Explorar el Código

Merge branch 'master' of https://github.com/molstar/molstar

Alexander Rose hace 5 años
padre
commit
a89f21dafd
Se han modificado 4 ficheros con 238 adiciones y 520 borrados
  1. 224 517
      package-lock.json
  2. 3 1
      package.json
  3. 2 2
      src/servers/volume/server/web-api.ts
  4. 9 0
      webpack.config.production.js

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 224 - 517
package-lock.json


+ 3 - 1
package.json

@@ -15,9 +15,11 @@
     "lint-fix": "eslint ./**/*.{ts,tsx} --fix",
     "test": "npm run lint && jest",
     "build": "npm run build-tsc && npm run build-extra && npm run build-webpack",
+    "build-viewer": "npm run build-tsc && npm run build-extra && npm run build-webpack-viewer",
     "build-tsc": "tsc --incremental && tsc --build src/servers --incremental",
     "build-extra": "cpx \"src/**/*.{scss,html,ico}\" lib/",
-    "build-webpack": "webpack --mode production",
+    "build-webpack": "webpack --mode production --config ./webpack.config.production.js",
+    "build-webpack-viewer": "webpack --mode production --config ./webpack.config.viewer.js",
     "watch": "concurrently -c \"green,green,gray,gray\" --names \"tsc,srv,ext,wpc\" --kill-others \"npm:watch-tsc\" \"npm:watch-servers\" \"npm:watch-extra\" \"npm:watch-webpack\"",
     "watch-viewer": "concurrently -c \"green,gray,gray\" --names \"tsc,ext,wpc\" --kill-others \"npm:watch-tsc\" \"npm:watch-extra\" \"npm:watch-webpack-viewer\"",
     "watch-viewer-debug": "concurrently -c \"green,gray,gray\" --names \"tsc,ext,wpc\" --kill-others \"npm:watch-tsc\" \"npm:watch-extra\" \"npm:watch-webpack-viewer-debug\"",

+ 2 - 2
src/servers/volume/server/web-api.ts

@@ -154,7 +154,7 @@ function getQueryParams(req: express.Request, isCell: boolean): Data.QueryParams
     const b = [+req.params.b1, +req.params.b2, +req.params.b3];
 
     const detail = Math.min(Math.max(0, (+req.query.detail) | 0), LimitsConfig.maxOutputSizeInVoxelCountByPrecisionLevel.length - 1);
-    const isCartesian = (req.query.space || '').toLowerCase() !== 'fractional';
+    const isCartesian = (req.query.space as string || '').toLowerCase() !== 'fractional';
 
     const box: Data.QueryParamsBox = isCell
         ? { kind: 'Cell' }
@@ -162,7 +162,7 @@ function getQueryParams(req: express.Request, isCell: boolean): Data.QueryParams
             ? { kind: 'Cartesian', a: Coords.cartesian(a[0], a[1], a[2]), b: Coords.cartesian(b[0], b[1], b[2]) }
             : { kind: 'Fractional', a: Coords.fractional(a[0], a[1], a[2]), b: Coords.fractional(b[0], b[1], b[2]) });
 
-    const asBinary = (req.query.encoding || '').toLowerCase() !== 'cif';
+    const asBinary = (req.query.encoding as string || '').toLowerCase() !== 'cif';
     const sourceFilename = req.app.locals.mapFile(req.params.source, req.params.id)!;
 
     return {

+ 9 - 0
webpack.config.production.js

@@ -0,0 +1,9 @@
+const { createApp, createExample } = require('./webpack.config.common.js');
+
+const apps = ['viewer'];
+const examples = ['proteopedia-wrapper', 'basic-wrapper', 'lighting'];
+
+module.exports = [
+    ...apps.map(createApp),
+    ...examples.map(createExample)
+]

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio