From 31d07fdac80a2a546646b1eb232fa7dd6319ce83 Mon Sep 17 00:00:00 2001 From: August Skare Date: Mon, 19 Nov 2018 17:27:00 +0100 Subject: rename all files and directories to lowercase --- packages/dev-tools-pages/ts/pages/compiler.tsx | 170 +++++++++++++++++++++++++ 1 file changed, 170 insertions(+) create mode 100644 packages/dev-tools-pages/ts/pages/compiler.tsx (limited to 'packages/dev-tools-pages/ts/pages/compiler.tsx') diff --git a/packages/dev-tools-pages/ts/pages/compiler.tsx b/packages/dev-tools-pages/ts/pages/compiler.tsx new file mode 100644 index 000000000..ee533d566 --- /dev/null +++ b/packages/dev-tools-pages/ts/pages/compiler.tsx @@ -0,0 +1,170 @@ +import * as React from 'react'; +import { hydrate, render } from 'react-dom'; +import * as Loadable from 'react-loadable'; + +import { context } from 'ts/context/compiler'; + +import { Base } from 'ts/components/Base'; +import { Breakout } from 'ts/components/Breakout'; +import { Code } from 'ts/components/Code'; +import { Compiler as CompilerComponent } from 'ts/components/Compiler'; +import { Content } from 'ts/components/Content'; +import { ContentBlock } from 'ts/components/ContentBlock'; +import { Hero } from 'ts/components/Hero'; +import { InlineCode } from 'ts/components/InlineCode'; +import { Lead } from 'ts/components/Typography'; + +const Animation = Loadable({ + loader: () => System.import(/* webpackChunkName: 'compiler-animation' */ 'ts/components/Animations/Compiler'), + loading: () =>
, + delay: 1000, + render(loadable: { Animation: any }): React.ReactNode { + const Component = loadable.Animation; + return ; + }, +}); + +const Compiler: React.StatelessComponent<{}> = () => ( + + + + + + + + + + npm install @0x/sol-compiler --g + + + + + + cd /your_project_dir && sol-compiler + + + + +

+ Configure via a compiler.json file. +

+ + mkdir compiler.json + +

Example of settings:

+ + + {`{ + "contractsDir": "contracts", + "artifactsDir": "artifacts", + "contracts": "*", + "compilerSettings": { + "optimizer": { "enabled": false }, + "outputSelection": { + "*": { + "*": ["abi", "evm.bytecode.object"] + } + } + } +}`} + + +
+
+ + + + Sol compiler uses solidity standard JSON output format for the artifacts. This way, you can define + which parts of the artifact you need. + + + + +

+ Sol compiler uses solidity standard JSON output format for the artifacts. This way, you can define + which parts of the artifact you need. +

+ + + {`{ + "compilerSettings": { + "outputSelection": { + "*": { + "*": ["abi"] + } + } + } +}`} + + + + + {`{ + "compilerOutput": { + "abi": [...], + }, +}`} + + +
+ +

+ Sometimes you need to use some debuggers or other dev tools and you’ll need more info in the + artifact. +

+ + + {`{ + "compilerSettings": { + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode.object", + "evm.bytecode.sourceMap", + "evm.deployedBytecode.object", + "evm.deployedBytecode.sourceMap" + ] + } + } + } +}`} + + + + + + {`{ + "compilerOutput": { + "abi": [...], + "evm": { + "bytecode": { + "object": "0xdeadbeef", + "sourceMap": "26:480:..." + }, + "deployedBytecode": { + "object": "0xdeadbeef", + "sourceMap": "26:480:0..." + } + } + } + "sources": { + "Migrations.sol": { + "id": 0 + } + }, +}`} + + +
+
+ +); + +const root = document.getElementById('app'); + +if (root.hasChildNodes()) { + hydrate(, root); +} else { + render(, root); +} -- cgit From 117726c6d80dd20e8b9409cec23b0c062690b0df Mon Sep 17 00:00:00 2001 From: August Skare Date: Mon, 19 Nov 2018 17:35:22 +0100 Subject: fix imports after renaming --- packages/dev-tools-pages/ts/pages/compiler.tsx | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'packages/dev-tools-pages/ts/pages/compiler.tsx') diff --git a/packages/dev-tools-pages/ts/pages/compiler.tsx b/packages/dev-tools-pages/ts/pages/compiler.tsx index ee533d566..912589b51 100644 --- a/packages/dev-tools-pages/ts/pages/compiler.tsx +++ b/packages/dev-tools-pages/ts/pages/compiler.tsx @@ -4,18 +4,18 @@ import * as Loadable from 'react-loadable'; import { context } from 'ts/context/compiler'; -import { Base } from 'ts/components/Base'; -import { Breakout } from 'ts/components/Breakout'; -import { Code } from 'ts/components/Code'; -import { Compiler as CompilerComponent } from 'ts/components/Compiler'; -import { Content } from 'ts/components/Content'; -import { ContentBlock } from 'ts/components/ContentBlock'; -import { Hero } from 'ts/components/Hero'; -import { InlineCode } from 'ts/components/InlineCode'; -import { Lead } from 'ts/components/Typography'; +import { Base } from 'ts/components/base'; +import { Breakout } from 'ts/components/breakout'; +import { Code } from 'ts/components/code'; +import { Compiler as CompilerComponent } from 'ts/components/compiler'; +import { Content } from 'ts/components/content'; +import { ContentBlock } from 'ts/components/content-block'; +import { Hero } from 'ts/components/hero'; +import { InlineCode } from 'ts/components/inline-code'; +import { Lead } from 'ts/components/typography'; const Animation = Loadable({ - loader: () => System.import(/* webpackChunkName: 'compiler-animation' */ 'ts/components/Animations/Compiler'), + loader: () => System.import(/* webpackChunkName: 'compiler-animation' */ 'ts/components/animations/compiler'), loading: () =>
, delay: 1000, render(loadable: { Animation: any }): React.ReactNode { -- cgit From 339ec3e8ebac25fe7ee6eb26b89bfc9b9e00db26 Mon Sep 17 00:00:00 2001 From: August Skare Date: Tue, 20 Nov 2018 15:18:09 +0100 Subject: uniq export names for animations --- packages/dev-tools-pages/ts/pages/compiler.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'packages/dev-tools-pages/ts/pages/compiler.tsx') diff --git a/packages/dev-tools-pages/ts/pages/compiler.tsx b/packages/dev-tools-pages/ts/pages/compiler.tsx index 912589b51..93a667562 100644 --- a/packages/dev-tools-pages/ts/pages/compiler.tsx +++ b/packages/dev-tools-pages/ts/pages/compiler.tsx @@ -18,8 +18,8 @@ const Animation = Loadable({ loader: () => System.import(/* webpackChunkName: 'compiler-animation' */ 'ts/components/animations/compiler'), loading: () =>
, delay: 1000, - render(loadable: { Animation: any }): React.ReactNode { - const Component = loadable.Animation; + render(loadable: { CompilerAnimation: any }): React.ReactNode { + const Component = loadable.CompilerAnimation; return ; }, }); -- cgit