From c4ae91c7c5aaa2d6e278448667bf828162be93bc Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 18 Oct 2018 17:31:38 +0100 Subject: Update doc ref markdown sections --- .../website/md/docs/sol-compiler/1/installation.md | 23 +++++++++++++++++++++ .../website/md/docs/sol-compiler/1/introduction.md | 8 ++++++++ packages/website/md/docs/sol-compiler/1/usage.md | 24 ++++++++++++++++++++++ .../website/md/docs/sol-compiler/2/installation.md | 23 +++++++++++++++++++++ packages/website/md/docs/sol-compiler/2/usage.md | 24 ++++++++++++++++++++++ .../website/md/docs/sol-compiler/installation.md | 23 --------------------- .../website/md/docs/sol-compiler/introduction.md | 8 -------- packages/website/md/docs/sol-compiler/usage.md | 24 ---------------------- 8 files changed, 102 insertions(+), 55 deletions(-) create mode 100644 packages/website/md/docs/sol-compiler/1/installation.md create mode 100644 packages/website/md/docs/sol-compiler/1/introduction.md create mode 100644 packages/website/md/docs/sol-compiler/1/usage.md create mode 100644 packages/website/md/docs/sol-compiler/2/installation.md create mode 100644 packages/website/md/docs/sol-compiler/2/usage.md delete mode 100644 packages/website/md/docs/sol-compiler/installation.md delete mode 100644 packages/website/md/docs/sol-compiler/introduction.md delete mode 100644 packages/website/md/docs/sol-compiler/usage.md (limited to 'packages/website/md/docs/sol-compiler') 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); +``` 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); +``` diff --git a/packages/website/md/docs/sol-compiler/installation.md b/packages/website/md/docs/sol-compiler/installation.md deleted file mode 100644 index 9c8561d9b..000000000 --- a/packages/website/md/docs/sol-compiler/installation.md +++ /dev/null @@ -1,23 +0,0 @@ -#### 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/introduction.md b/packages/website/md/docs/sol-compiler/introduction.md deleted file mode 100644 index fcd80f47b..000000000 --- a/packages/website/md/docs/sol-compiler/introduction.md +++ /dev/null @@ -1,8 +0,0 @@ -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/usage.md b/packages/website/md/docs/sol-compiler/usage.md deleted file mode 100644 index 79c9b32ba..000000000 --- a/packages/website/md/docs/sol-compiler/usage.md +++ /dev/null @@ -1,24 +0,0 @@ -#### 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); -``` -- cgit v1.2.3