Skip to content

Commit 3eafa64

Browse files
authored
Merge pull request #44 from NexusMutual/feat/esmodule-support
Feature: esmodule support
2 parents e9e93ab + 4dc73ed commit 3eafa64

File tree

187 files changed

+47
-234
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

187 files changed

+47
-234
lines changed

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
{
22
"name": "@nexusmutual/sdk",
3-
"version": "1.0.0",
3+
"version": "0.0.1",
44
"description": "Nexus Mutual SDK",
55
"scripts": {
66
"build": "node scripts/build.js",
77
"server": "node scripts/server.js"
88
},
9+
"typings": "./dist/index.d.ts",
910
"exports": {
1011
".": [
1112
"./dist/index.js"
1213
],
13-
"./abis": "./dist/contracts/abis.js",
14+
"./abis": "./dist/contracts/abis/index.js",
1415
"./abis/*": "./dist/contracts/abis/*.json",
1516
"./addresses": "./dist/contracts/addresses.json",
1617
"./products": "./dist/products/products.json",
1718
"./product-types": "./dist/products/product-types.json",
18-
"./logos": "./dist/products/product-logos.json",
19-
"./logos/*": "./dist/products/logos/*"
19+
"./logos": "./dist/products/product-logos.json"
2020
},
2121
"repository": {
2222
"type": "git",

scripts/build.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ const main = async () => {
126126

127127
console.log('Generating abi exports');
128128
const abisPath = path.join(__dirname, '../dist/contracts/abis');
129-
const abiExportsFile = path.join(__dirname, '../dist/contracts/abis.js');
129+
const abiExportsFile = path.join(__dirname, '../dist/contracts/abis/index.js');
130130

131131
const abis = fs
132132
.readdirSync(abisPath)

src/index.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export { default as abis } from '@nexusmutual/sdk/dist/contracts/abis';
2+
export { default as addresses } from '@nexusmutual/sdk/dist/contracts/addresses.json';
3+
export { default as productTypes } from '@nexusmutual/sdk/dist/products/product-types.json';
4+
export { default as products } from '@nexusmutual/sdk/dist/products/products.json';
5+
export { default as logos } from '@nexusmutual/sdk/dist/products/product-logos.json';

src/products/logos/0x.png

-1.07 KB
Binary file not shown.

src/products/logos/1inch.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/products/logos/aave-adai.png

-11.7 KB
Binary file not shown.

src/products/logos/aave.png

-2.05 KB
Binary file not shown.

src/products/logos/aavev2.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/products/logos/aavev3.png

-217 KB
Binary file not shown.

src/products/logos/abracadabra.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)