aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/md/docs/sol-compiler/2
diff options
context:
space:
mode:
Diffstat (limited to 'packages/website/md/docs/sol-compiler/2')
-rw-r--r--packages/website/md/docs/sol-compiler/2/installation.md23
-rw-r--r--packages/website/md/docs/sol-compiler/2/usage.md24
2 files changed, 47 insertions, 0 deletions
diff --git a/packages/website/md/docs/sol-compiler/2/installation.md b/packages/website/md/docs/sol-compiler/2/installation.md
new file mode 100644
index 000000000..7e7b690fe
--- /dev/null
+++ b/packages/website/md/docs/sol-compiler/2/installation.md
@@ -0,0 +1,23 @@
+#### CLI Installation
+
+```bash
+yarn global add @0x/sol-compiler
+```
+
+#### API Installation
+
+```bash
+yarn add @0x/sol-compiler
+```
+
+**Import**
+
+```typescript
+import { Compiler } from '@0x/sol-compiler';
+```
+
+or
+
+```javascript
+var Compiler = require('@0x/sol-compiler').Compiler;
+```
diff --git a/packages/website/md/docs/sol-compiler/2/usage.md b/packages/website/md/docs/sol-compiler/2/usage.md
new file mode 100644
index 000000000..68e5a988f
--- /dev/null
+++ b/packages/website/md/docs/sol-compiler/2/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 '@0x/sol-compiler';
+
+const compiler = new Compiler();
+
+(async () => {
+ await compiler.compileAllAsync();
+})().catch(console.log);
+```