Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from alesanro/npm-folders
Allow to search through parent node_modules folders
- Loading branch information
Showing
7 changed files
with
212 additions
and
30 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
pragma solidity 0.5.6; | ||
|
||
import "@0xcert/ethereum-erc721/src/contracts/ownership/ownable.sol"; | ||
|
||
contract ImportFromParentNodeModules is Ownable { | ||
} |
68 changes: 68 additions & 0 deletions
68
test/contracts/straightened/ImportFromParentNodeModules.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
pragma solidity 0.5.6; | ||
|
||
/** | ||
* @dev The contract has an owner address, and provides basic authorization control whitch | ||
* simplifies the implementation of user permissions. This contract is based on the source code at: | ||
* https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/ownership/Ownable.sol | ||
*/ | ||
contract Ownable | ||
{ | ||
|
||
/** | ||
* @dev Error constants. | ||
*/ | ||
string public constant NOT_OWNER = "018001"; | ||
string public constant ZERO_ADDRESS = "018002"; | ||
|
||
/** | ||
* @dev Current owner address. | ||
*/ | ||
address public owner; | ||
|
||
/** | ||
* @dev An event which is triggered when the owner is changed. | ||
* @param previousOwner The address of the previous owner. | ||
* @param newOwner The address of the new owner. | ||
*/ | ||
event OwnershipTransferred( | ||
address indexed previousOwner, | ||
address indexed newOwner | ||
); | ||
|
||
/** | ||
* @dev The constructor sets the original `owner` of the contract to the sender account. | ||
*/ | ||
constructor() | ||
public | ||
{ | ||
owner = msg.sender; | ||
} | ||
|
||
/** | ||
* @dev Throws if called by any account other than the owner. | ||
*/ | ||
modifier onlyOwner() | ||
{ | ||
require(msg.sender == owner, NOT_OWNER); | ||
_; | ||
} | ||
|
||
/** | ||
* @dev Allows the current owner to transfer control of the contract to a newOwner. | ||
* @param _newOwner The address to transfer ownership to. | ||
*/ | ||
function transferOwnership( | ||
address _newOwner | ||
) | ||
public | ||
onlyOwner | ||
{ | ||
require(_newOwner != address(0), ZERO_ADDRESS); | ||
emit OwnershipTransferred(owner, _newOwner); | ||
owner = _newOwner; | ||
} | ||
|
||
} | ||
|
||
contract ImportFromParentNodeModules is Ownable { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.