From 5588fe8de4c966b06ae534f3b3f23ee14a2f4085 Mon Sep 17 00:00:00 2001 From: 0mkar <0mkar@protonmail.com> Date: Fri, 18 Jan 2019 02:11:02 +0530 Subject: [PATCH 1/2] remove bin config from package.json --- remix-url-resolver/package.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/remix-url-resolver/package.json b/remix-url-resolver/package.json index 903dc283ff..9034fc21b1 100644 --- a/remix-url-resolver/package.json +++ b/remix-url-resolver/package.json @@ -3,9 +3,6 @@ "version": "0.0.1", "description": "Solidity import url resolver engine", "main": "./dist/index.js", - "bin": { - "remix-url-resolver": "./bin/remix-url-resolver" - }, "scripts": { "build": "tsc", "lint": "standard", From d63c0ceb629d4d1116828af576c726e708f19afa Mon Sep 17 00:00:00 2001 From: 0mkar <0mkar@protonmail.com> Date: Fri, 18 Jan 2019 02:17:19 +0530 Subject: [PATCH 2/2] Update readme --- remix-url-resolver/README.md | 6 +++--- remix-url-resolver/tests/test.ts | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/remix-url-resolver/README.md b/remix-url-resolver/README.md index 8025920925..b79524bb21 100644 --- a/remix-url-resolver/README.md +++ b/remix-url-resolver/README.md @@ -18,11 +18,11 @@ Returns `json` object with exact same path as `import` statement. `resolve(url, urlHandler)` function should be called from within `handleImportCb` function of `solc.compile(input, handleImportCb)`. ```ts -import { RemixResolve } from 'remix-url-resolver' +import { RemixURLResolver } from 'remix-url-resolver' -const remixResolve = new RemixResolve() +const urlResolver = new RemixURLResolver() const fileName: string = '../greeter.sol' -remixResolve.resolve(fileName, urlHandler) +urlResolver.resolve(fileName, urlHandler) .then((sources: object) => { console.log(sources) }) diff --git a/remix-url-resolver/tests/test.ts b/remix-url-resolver/tests/test.ts index 2387651355..7ece84baa6 100644 --- a/remix-url-resolver/tests/test.ts +++ b/remix-url-resolver/tests/test.ts @@ -7,7 +7,7 @@ describe('testRunner', () => { describe('# RemixResolve.resolve()', () => { describe('* test without AppManager', () => { describe('test example_1 [local imports]', () => { - const remixURLResolve = new RemixURLResolver() + const urlResolver = new RemixURLResolver() const fileName: string = '../remix-url-resolver/tests/example_1/greeter.sol' let results: object = {} @@ -31,7 +31,7 @@ describe('testRunner', () => { handle: (match: Array) => { return handleLocal(match[2], match[3]) } } ] - remixURLResolve.resolve(fileName, localFSHandler) + urlResolver.resolve(fileName, localFSHandler) .then((sources: object) => { results = sources done() @@ -55,12 +55,12 @@ describe('testRunner', () => { }) // Test github import describe('test getting github imports', () => { - const remixURLResolve = new RemixURLResolver() + const urlResolver = new RemixURLResolver() const fileName: string = 'github.com/ethereum/populus/docs/assets/Greeter.sol' let results: object = {} before(done => { - remixURLResolve.resolve(fileName) + urlResolver.resolve(fileName) .then((sources: object) => { results = sources done() @@ -84,12 +84,12 @@ describe('testRunner', () => { }) // Test https imports describe('test getting https imports', () => { - const remixURLResolve = new RemixURLResolver() + const urlResolver = new RemixURLResolver() const fileName: string = 'https://gist.githubusercontent.com/roneilr/7901633d7c2f52957d22/raw/d9b9d54760f6e4f4cfbac4b321bee6a6983a1048/greeter.sol' let results: object = {} before(done => { - remixURLResolve.resolve(fileName) + urlResolver.resolve(fileName) .then((sources: object) => { results = sources done() @@ -114,12 +114,12 @@ describe('testRunner', () => { // Test http imports describe('test getting http imports', () => { - const remixURLResolve = new RemixURLResolver() + const urlResolver = new RemixURLResolver() const fileName: string = 'http://gist.githubusercontent.com/roneilr/7901633d7c2f52957d22/raw/d9b9d54760f6e4f4cfbac4b321bee6a6983a1048/greeter.sol' let results: object = {} before(done => { - remixURLResolve.resolve(fileName) + urlResolver.resolve(fileName) .then((sources: object) => { results = sources done()