diff --git a/package.json b/package.json index 046381b..c2cae0f 100644 --- a/package.json +++ b/package.json @@ -23,8 +23,41 @@ "type": "git", "url": "git@github.com:Caleydo/tourdino.git" }, - "main": "dist/index.js", - "types": "dist/index.d.ts", + "main": "src/index.ts", + "types": "src/index.ts", + "exports": { + ".": { + "types": [ + "./dist/index.d.ts", + "./src/index.ts" + ], + "import": [ + "./dist/index.js", + "./src/index.ts" + ], + "default": [ + "./dist/index.js", + "./src/index.ts" + ] + }, + "./phovea_registry": [ + "./dist/phovea_registry.js", + "./src/phovea_registry.ts" + ], + "./dist/phovea_registry": [ + "./dist/phovea_registry.js", + "./src/phovea_registry.ts" + ], + "./src/scss/*": [ + "./dist/scss/*", + "./src/scss/*" + ], + "./dist/scss/*": [ + "./dist/scss/*", + "./src/scss/*" + ], + "./package.json": "./package.json" + }, "files": [ "src", "dist" @@ -48,7 +81,6 @@ "docs": "visyn_scripts docs", "lint:fix": "visyn_scripts lint --fix", "lint": "visyn_scripts lint", - "prepack": "npm run build", "start": "visyn_scripts start --env workspace_mode=single", "storybook:build": "NODE_OPTIONS=--max_old_space_size=4096 build-storybook", "storybook": "NODE_OPTIONS=--max_old_space_size=4096 start-storybook -p 6006", diff --git a/src/base/BaseUtils.ts b/src/base/BaseUtils.ts index 0d72508..8918de4 100644 --- a/src/base/BaseUtils.ts +++ b/src/base/BaseUtils.ts @@ -137,13 +137,13 @@ export class BaseUtils { while (integers.length !== n) { // skipped if n = max+1 --> all integers between 0 and max - integers.splice(getRandomInt(0, integers.length), 1); // definetly one hit per iteration + integers.splice(BaseUtils.getRandomInt(0, integers.length), 1); // definetly one hit per iteration } return integers; } const integers = []; while (integers.length < n) { - const integer = getRandomInt(0, max); + const integer = BaseUtils.getRandomInt(0, max); if (integers.indexOf(integer) === -1) { // not every iteration might add an element integers.push(integer);