aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/md/docs/sol-compiler/1
diff options
context:
space:
mode:
authorKadinsky <kandinsky454@protonmail.ch>2018-10-19 04:15:31 +0800
committerGitHub <noreply@github.com>2018-10-19 04:15:31 +0800
commit65d85ca5008fe0c307506b388d6ace858122f8ad (patch)
treef8d4b0aa654eab3f26bdbfe40dea6fb7e105e864 /packages/website/md/docs/sol-compiler/1
parent857eb95ac0f8299fe517321cb805a836232222bc (diff)
parentc2038eae5bc02fc24edcb369381b0d9699aed0aa (diff)
downloaddexon-sol-tools-65d85ca5008fe0c307506b388d6ace858122f8ad.tar
dexon-sol-tools-65d85ca5008fe0c307506b388d6ace858122f8ad.tar.gz
dexon-sol-tools-65d85ca5008fe0c307506b388d6ace858122f8ad.tar.bz2
dexon-sol-tools-65d85ca5008fe0c307506b388d6ace858122f8ad.tar.lz
dexon-sol-tools-65d85ca5008fe0c307506b388d6ace858122f8ad.tar.xz
dexon-sol-tools-65d85ca5008fe0c307506b388d6ace858122f8ad.tar.zst
dexon-sol-tools-65d85ca5008fe0c307506b388d6ace858122f8ad.zip
Merge pull request #1158 from 0xProject/docSectionFixes
Update Doc Ref Markdown Sections
Diffstat (limited to 'packages/website/md/docs/sol-compiler/1')
-rw-r--r--packages/website/md/docs/sol-compiler/1/installation.md23
-rw-r--r--packages/website/md/docs/sol-compiler/1/introduction.md8
-rw-r--r--packages/website/md/docs/sol-compiler/1/usage.md24
3 files changed, 55 insertions, 0 deletions
diff --git a/packages/website/md/docs/sol-compiler/1/installation.md b/packages/website/md/docs/sol-compiler/1/installation.md
new file mode 100644
index 000000000..9c8561d9b
--- /dev/null
+++ b/packages/website/md/docs/sol-compiler/1/installation.md
@@ -0,0 +1,23 @@
+#### CLI Installation
+
+```bash
+yarn global add @0xproject/sol-compiler
+```
+
+#### API Installation
+
+```bash
+yarn add @0xproject/sol-compiler
+```
+
+**Import**
+
+```typescript
+import { Compiler } from '@0xproject/sol-compiler';
+```
+
+or
+
+```javascript
+var Compiler = require('@0xproject/sol-compiler').Compiler;
+```
diff --git a/packages/website/md/docs/sol-compiler/1/introduction.md b/packages/website/md/docs/sol-compiler/1/introduction.md
new file mode 100644
index 000000000..fcd80f47b
--- /dev/null
+++ b/packages/website/md/docs/sol-compiler/1/introduction.md
@@ -0,0 +1,8 @@
+Welcome to the [sol-compiler](https://github.com/0xProject/0x-monorepo/tree/development/packages/sol-compiler) documentation! Sol-compiler is a wrapper around [solc-js](https://www.npmjs.com/package/solc) that adds:
+
+* Smart re-compilation: Only recompiles when smart contracts have changed
+* Ability to compile an entire project instead of only individual `.sol` files
+* Compilation using the Solidity version specified at the top of each individual `.sol` file
+* Proper parsing of Solidity version ranges
+* Support for the standard [input description](https://solidity.readthedocs.io/en/develop/using-the-compiler.html#input-description) for what information you'd like added to the resulting `artifacts` file (i.e 100% configurable artifacts content).
+* Storage of constructor args, source maps and paths to all dependency source files.
diff --git a/packages/website/md/docs/sol-compiler/1/usage.md b/packages/website/md/docs/sol-compiler/1/usage.md
new file mode 100644
index 000000000..79c9b32ba
--- /dev/null
+++ b/packages/website/md/docs/sol-compiler/1/usage.md
@@ -0,0 +1,24 @@
+#### CLI Usage
+
+```bash
+$ sol-compiler
+Options:
+ --version Show version number [boolean]
+ --contracts-dir path of contracts directory to compile [string]
+ --artifacts-dir path to write contracts artifacts to [string]
+ --contracts comma separated list of contracts to compile
+ [string] [default: "*"]
+ --help Show help [boolean]
+```
+
+#### API Usage
+
+```typescript
+import { Compiler } from '@0xproject/sol-compiler';
+
+const compiler = new Compiler();
+
+(async () => {
+ await compiler.compileAllAsync();
+})().catch(console.log);
+```