Skip to content
This repository has been archived by the owner on Mar 3, 2021. It is now read-only.

Add module declaration #1117

Merged
merged 2 commits into from
Jan 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions remix-url-resolver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Returns `json` object with exact same path as `import` statement.
```json
{
content: 'pragma solidity ^0.5.0;\nimport "./mortal.sol";\n\ncontract Greeter is Mortal {\n /* Define variable greeting of the type string */\n string greeting;\n\n /* This runs when the contract is executed */\n constructor(string memory _greeting) public {\n greeting = _greeting;\n }\n\n /* Main function */\n function greet() public view returns (string memory) {\n return greeting;\n }\n}\n',
cleanURL: '../greeter.sol',
type: 'local'
cleanURL: '../greeter.sol',
type: 'local'
}
```

Expand All @@ -30,3 +30,8 @@ urlResolver.resolve(fileName, urlHandler)
throw e
})
```

#### References

* [TypeScript Publishing](http://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html)
* [DefinitelyTyped 'Create a new package' guide](https://github.com/DefinitelyTyped/DefinitelyTyped#create-a-new-package)
3 changes: 2 additions & 1 deletion remix-url-resolver/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"name": "remix-url-resolver",
"version": "0.0.2",
"description": "Solidity import url resolver engine",
"main": "./dist/index.js",
"main": "dist",
"types": "dist/index.d.ts",
"scripts": {
"build": "tsc",
"lint": "standard",
Expand Down
2 changes: 1 addition & 1 deletion remix-url-resolver/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"baseUrl": "./src",
"outDir": "./dist",
"sourceMap": true,
"declaration": false,
"declaration": true,
"module": "commonjs",
"strict": true,
"noImplicitAny": false,
Expand Down