From ee7ea75e839536dd9b573d8e0c12c486f3bb9508 Mon Sep 17 00:00:00 2001 From: qianbin Date: Wed, 12 Jun 2019 10:50:02 +0800 Subject: [PATCH] allow to be imported --- README.md | 8 +++++++- index.js | 1 + package.json | 3 ++- 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 index.js diff --git a/README.md b/README.md index e575f2b..d392800 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,13 @@ if(!window.connex) { npm install @vechain/connex --save-dev ``` -Add `@vechain/connex` to `compilerOptions.types` in `tsconfig.json` then you are good to go! +Place following line in any .ts file of your project +```typescript +import '@vechain/connex' +``` +or + +add `@vechain/connex` to `compilerOptions.types` in `tsconfig.json` then you are good to go! #### Vanilla JS diff --git a/index.js b/index.js new file mode 100644 index 0000000..1c8a0e7 --- /dev/null +++ b/index.js @@ -0,0 +1 @@ +; \ No newline at end of file diff --git a/package.json b/package.json index dfe42ba..a559f52 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,8 @@ "name": "@vechain/connex", "version": "1.2.3", "description": "Standard interface to connect DApp with VeChain and user", - "main": "", + "main": "index.js", + "types": "index.d.ts", "scripts": {}, "repository": { "type": "git",