Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aniket-engg/sol-straightener
Straighten/Flatten Solidity file from js file
https://github.com/aniket-engg/sol-straightener
solidity solidity-contracts solidity-flattener solidity-merger solidity-straightener
Last synced: 20 days ago
JSON representation
Straighten/Flatten Solidity file from js file
- Host: GitHub
- URL: https://github.com/aniket-engg/sol-straightener
- Owner: Aniket-Engg
- License: mit
- Created: 2019-05-01T11:04:01.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-30T17:36:05.000Z (almost 2 years ago)
- Last Synced: 2024-10-07T16:41:49.680Z (about 1 month ago)
- Topics: solidity, solidity-contracts, solidity-flattener, solidity-merger, solidity-straightener
- Language: JavaScript
- Homepage:
- Size: 446 KB
- Stars: 4
- Watchers: 2
- Forks: 4
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![npm version](https://badge.fury.io/js/sol-straightener.svg)](https://www.npmjs.com/package/sol-straightener)
[![Build status](https://travis-ci.com/Aniket-Engg/sol-straightener.svg?branch=master)](https://travis-ci.com/Aniket-Engg/sol-straightener)
[![Coverage Status](https://coveralls.io/repos/github/Aniket-Engg/sol-straightener/badge.svg?branch=master)](https://coveralls.io/github/Aniket-Engg/sol-straightener?branch=master)
[![dependencies Status](https://david-dm.org/aniket-engg/sol-straightener/status.svg)](https://david-dm.org/aniket-engg/sol-straightener)
[![devDependencies Status](https://david-dm.org/aniket-engg/sol-straightener/dev-status.svg)](https://david-dm.org/aniket-engg/sol-straightener?type=dev)
[![npm](https://img.shields.io/npm/dt/sol-straightener.svg)](https://www.npmjs.com/package/sol-straightener)
[![GitHub](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/Aniket-Engg/sol-straightener)# sol-straightener
sol-straightener is an NPM package to straighten the Solidity smart contracts for various purposes. It fetches the content of each imported file and returns the straightened version. It works inside a file.## Install
```
npm install --save sol-straightener
```
## How to use
```
const Straightener = require('sol-straightener');
let result = await Straightener.straighten();
```
An import straightened file contents will be returned which can be used for further processing or writing a file.## Support
Currently it handles `import` of files from:
* relative directories, e.g; `import "./lib/SafeMath.sol";`
* All parent `node_modules` directories, e.g; `import "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol";`
* Github, e.g; `import "github.com/oraclize/ethereum-api/oraclizeAPI_0.5.sol";`## Contribution
[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/Aniket-Engg/sol-straightener/issues)Contribution in any form is most welcome.
## License
[MIT](https://github.com/Aniket-Engg/sol-straightener/blob/master/LICENSE)