From 8b521cefbb42d85e756fdf90853b76e9582caecf Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Wed, 2 Dec 2020 20:06:15 +0530 Subject: [PATCH] build for all libs working fine --- libs/remix-lib/package.json | 4 ++-- libs/remix-lib/src/index.ts | 4 +--- libs/remix-lib/tsconfig.lib.json | 2 +- tsconfig.json | 2 +- workspace.json | 2 +- 5 files changed, 6 insertions(+), 8 deletions(-) diff --git a/libs/remix-lib/package.json b/libs/remix-lib/package.json index 121c7d6abe..c37fb4b64c 100644 --- a/libs/remix-lib/package.json +++ b/libs/remix-lib/package.json @@ -12,7 +12,7 @@ "email": "liana@ethdev.com" } ], - "main": "index.js", + "main": "src/index.js", "dependencies": { "async": "^2.1.2", "ethereumjs-block": "^2.2.2", @@ -36,7 +36,7 @@ "tape": "^4.6.0" }, "scripts": { - "test": "./../../node_modules/.bin/tape ./test/tests.js" + "test": "./../../node_modules/.bin/ts-node --require tsconfig-paths/register ./../../node_modules/.bin/tape ./test/tests.ts" }, "publishConfig": { "access": "public" diff --git a/libs/remix-lib/src/index.ts b/libs/remix-lib/src/index.ts index de4358dc27..5b1108ff70 100644 --- a/libs/remix-lib/src/index.ts +++ b/libs/remix-lib/src/index.ts @@ -16,9 +16,7 @@ import { ExecutionContext } from './execution/execution-context' import * as typeConversion from './execution/typeConversion' import { UniversalDApp } from './universalDapp' -if (typeof (module) !== 'undefined' && typeof (module.exports) !== 'undefined') { - module.exports = modules() -} +export = modules() function modules () { return { diff --git a/libs/remix-lib/tsconfig.lib.json b/libs/remix-lib/tsconfig.lib.json index 4b98e6be37..8bd00f9004 100644 --- a/libs/remix-lib/tsconfig.lib.json +++ b/libs/remix-lib/tsconfig.lib.json @@ -5,7 +5,7 @@ "outDir": "../../dist/out-tsc", "declaration": true, "rootDir": "./", - "types": ["node"] + "types": ["node", "tape"] }, "exclude": [ "**/*.spec.js", diff --git a/tsconfig.json b/tsconfig.json index bd6bcb045d..9d02a53d77 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -19,7 +19,7 @@ "@remix-project/remix-analyzer": ["dist/libs/remix-analyzer/index.js"], "@remix-project/remix-astwalker": ["dist/libs/remix-astwalker/index.js"], "@remix-project/remix-debug": ["dist/libs/remix-debug/index.js"], - "@remix-project/remix-lib": ["dist/libs/remix-lib/index.js"], + "@remix-project/remix-lib": ["dist/libs/remix-lib/src/index.js"], "@remix-project/remix-simulator": ["dist/libs/remix-simulator/src/index.js"], "@remix-project/remix-solidity": ["dist/libs/remix-solidity/index.js"], "@remix-project/remix-tests": ["dist/libs/remix-tests/src/index.js"], diff --git a/workspace.json b/workspace.json index ad333f6927..f8fb4de1c9 100644 --- a/workspace.json +++ b/workspace.json @@ -251,7 +251,7 @@ "outputPath": "dist/libs/remix-lib", "tsConfig": "libs/remix-lib/tsconfig.lib.json", "packageJson": "libs/remix-lib/package.json", - "main": "libs/remix-lib/src/index.js", + "main": "libs/remix-lib/src/index.ts", "assets": ["libs/remix-lib/*.md"] } }