From d9de03a3863c7f7dae91f7687f2be9fa4481ce1e Mon Sep 17 00:00:00 2001 From: Aniket-Engg Date: Wed, 11 May 2022 19:05:12 +0530 Subject: [PATCH] build using nx --- libs/remix-ws-templates/tsconfig.json | 2 +- libs/remix-ws-templates/tsconfig.lib.json | 5 +++-- libs/remix-ws-templates/types/index.d.ts | 4 ++++ package.json | 1 - tsconfig.base.json | 2 +- workspace.json | 22 ++++++++++++++++++++++ 6 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 libs/remix-ws-templates/types/index.d.ts diff --git a/libs/remix-ws-templates/tsconfig.json b/libs/remix-ws-templates/tsconfig.json index eb1415fa71..be70d22834 100644 --- a/libs/remix-ws-templates/tsconfig.json +++ b/libs/remix-ws-templates/tsconfig.json @@ -3,5 +3,5 @@ "compilerOptions": { "types": ["node"], }, - "include": ["**/*.ts"] + "include": ["**/*.ts", "**/*.sol"] } \ No newline at end of file diff --git a/libs/remix-ws-templates/tsconfig.lib.json b/libs/remix-ws-templates/tsconfig.lib.json index ca57f301c9..fa525223fe 100644 --- a/libs/remix-ws-templates/tsconfig.lib.json +++ b/libs/remix-ws-templates/tsconfig.lib.json @@ -9,7 +9,8 @@ }, "exclude": [ "**/*.spec.ts", - "tests/" + "tests/", + "templates/" ], - "include": ["**/*.ts"] + "include": ["**/*.ts", "**/*.sol"] } diff --git a/libs/remix-ws-templates/types/index.d.ts b/libs/remix-ws-templates/types/index.d.ts new file mode 100644 index 0000000000..ad12deddd8 --- /dev/null +++ b/libs/remix-ws-templates/types/index.d.ts @@ -0,0 +1,4 @@ +declare var remix:any +declare var ethers:any +declare var web3:any +declare var web3Provider:any \ No newline at end of file diff --git a/package.json b/package.json index 1c8488d9bd..fb127e9f7f 100644 --- a/package.json +++ b/package.json @@ -198,7 +198,6 @@ "react-draggable": "^4.4.4", "react-tabs": "^3.2.2", "regenerator-runtime": "0.13.7", - "remix-ws-templates": "file:libs/remix-ws-templates", "selenium": "^2.20.0", "signale": "^1.4.0", "string-similarity": "^4.0.4", diff --git a/tsconfig.base.json b/tsconfig.base.json index fb649a61b5..6751f6778e 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -86,7 +86,7 @@ "libs/remix-ui/permission-handler/src/index.ts" ], "@remix-project/remix-ws-templates": [ - "libs/remix-ws-templates/src/index.ts" + "dist/libs/remix-ws-templates/src/index.ts" ] } }, diff --git a/workspace.json b/workspace.json index 45726ee4b7..7ead3dd32b 100644 --- a/workspace.json +++ b/workspace.json @@ -1229,6 +1229,28 @@ "tsConfig": ["libs/remix-ws-templates/tsconfig.lib.json"], "exclude": ["**/node_modules/**"] } + }, + "build": { + "builder": "@nrwl/node:package", + "options": { + "outputPath": "dist/libs/remix-ws-templates", + "tsConfig": "libs/remix-ws-templates/tsconfig.lib.json", + "packageJson": "libs/remix-ws-templates/package.json", + "main": "libs/remix-ws-templates/src/index.ts", + "assets": [ + { + "glob": "templates/**/*", + "ignore": ["templates/**/*/index.ts"], + "input": "libs/remix-ws-templates/src/", + "output": "src/" + }, + { + "glob": "*.md", + "input": "libs/remix-ws-templates/", + "output": "/" + } + ] + } } } }