From 16fa0fdda1751d675aa4fc0abf1c77ae4ff95550 Mon Sep 17 00:00:00 2001 From: fragosti Date: Fri, 2 Nov 2018 17:12:33 -0700 Subject: feat: break up deploy into deploy-dogfood and deploy-staging --- packages/instant/.discharge.json | 13 ------------- packages/instant/.dogfood.discharge.json | 13 +++++++++++++ packages/instant/.staging.discharge.json | 13 +++++++++++++ packages/instant/README.md | 10 +++++++++- packages/instant/package.json | 5 +++-- 5 files changed, 38 insertions(+), 16 deletions(-) delete mode 100644 packages/instant/.discharge.json create mode 100644 packages/instant/.dogfood.discharge.json create mode 100644 packages/instant/.staging.discharge.json (limited to 'packages') diff --git a/packages/instant/.discharge.json b/packages/instant/.discharge.json deleted file mode 100644 index 9ade97d01..000000000 --- a/packages/instant/.discharge.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "domain": "0x-instant-dogfood", - "build_command": "yarn build:umd:prod", - "upload_directory": "public", - "index_key": "index.html", - "error_key": "index.html", - "trailing_slashes": true, - "cache": 3600, - "aws_profile": "default", - "aws_region": "us-east-1", - "cdn": false, - "dns_configured": true -} diff --git a/packages/instant/.dogfood.discharge.json b/packages/instant/.dogfood.discharge.json new file mode 100644 index 000000000..9ade97d01 --- /dev/null +++ b/packages/instant/.dogfood.discharge.json @@ -0,0 +1,13 @@ +{ + "domain": "0x-instant-dogfood", + "build_command": "yarn build:umd:prod", + "upload_directory": "public", + "index_key": "index.html", + "error_key": "index.html", + "trailing_slashes": true, + "cache": 3600, + "aws_profile": "default", + "aws_region": "us-east-1", + "cdn": false, + "dns_configured": true +} diff --git a/packages/instant/.staging.discharge.json b/packages/instant/.staging.discharge.json new file mode 100644 index 000000000..e36d256de --- /dev/null +++ b/packages/instant/.staging.discharge.json @@ -0,0 +1,13 @@ +{ + "domain": "0x-instant-staging", + "build_command": "yarn build:umd:prod", + "upload_directory": "public", + "index_key": "index.html", + "error_key": "index.html", + "trailing_slashes": true, + "cache": 3600, + "aws_profile": "default", + "aws_region": "us-east-1", + "cdn": false, + "dns_configured": true +} diff --git a/packages/instant/README.md b/packages/instant/README.md index 07b01ac95..0638c1824 100644 --- a/packages/instant/README.md +++ b/packages/instant/README.md @@ -53,7 +53,15 @@ You can deploy a work-in-progress version of 0x Instant at http://0x-instant-dog To build and deploy the site run ``` -yarn deploy +yarn deploy-dogfood +``` + +We also have a staging bucket that is to be updated less frequently can be used to share instant externally: http://0x-instant-staging.s3-website-us-east-1.amazonaws.com/ + +To build and deploy to this bucket, rub + +``` +yarn deploy-staging ``` **NOTE: On deploying the site, it will say the site is available at a non-existent URL. Please ignore and use the (now updated) URL above.** diff --git a/packages/instant/package.json b/packages/instant/package.json index 81d2e4c7b..a7fc09805 100644 --- a/packages/instant/package.json +++ b/packages/instant/package.json @@ -22,7 +22,8 @@ "rebuild_and_test": "run-s clean build test", "test:circleci": "yarn test:coverage", "clean": "shx rm -rf lib coverage scripts", - "deploy": "discharge deploy", + "deploy-dogfood": "discharge deploy -c .dogfood.discharge.json", + "deploy-staging": "discharge deploy -c .staging.discharge.json", "manual:postpublish": "yarn build; node ./scripts/postpublish.js" }, "config": { @@ -65,7 +66,7 @@ }, "devDependencies": { "@0x/tslint-config": "^1.0.9", - "@static/discharge": "^1.2.2", + "@static/discharge": "https://github.com/0xProject/discharge.git", "@types/enzyme": "^3.1.14", "@types/enzyme-adapter-react-16": "^1.0.3", "@types/jest": "^23.3.5", -- cgit v1.2.3 From 245fa954246e32c973a92e7474aacf74ab8940d8 Mon Sep 17 00:00:00 2001 From: fragosti Date: Fri, 2 Nov 2018 17:16:49 -0700 Subject: fix: typo in README --- packages/instant/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages') diff --git a/packages/instant/README.md b/packages/instant/README.md index 0638c1824..3fd6efbea 100644 --- a/packages/instant/README.md +++ b/packages/instant/README.md @@ -58,7 +58,7 @@ yarn deploy-dogfood We also have a staging bucket that is to be updated less frequently can be used to share instant externally: http://0x-instant-staging.s3-website-us-east-1.amazonaws.com/ -To build and deploy to this bucket, rub +To build and deploy to this bucket, run ``` yarn deploy-staging -- cgit v1.2.3 From bb9c21fb14a87b4d9eeed8b45815d22bee8be203 Mon Sep 17 00:00:00 2001 From: fragosti Date: Fri, 2 Nov 2018 17:26:04 -0700 Subject: chore: prettier and linter --- packages/instant/.staging.discharge.json | 22 +++++++++++----------- packages/instant/src/redux/reducer.ts | 1 - 2 files changed, 11 insertions(+), 12 deletions(-) (limited to 'packages') diff --git a/packages/instant/.staging.discharge.json b/packages/instant/.staging.discharge.json index e36d256de..1026b9986 100644 --- a/packages/instant/.staging.discharge.json +++ b/packages/instant/.staging.discharge.json @@ -1,13 +1,13 @@ { - "domain": "0x-instant-staging", - "build_command": "yarn build:umd:prod", - "upload_directory": "public", - "index_key": "index.html", - "error_key": "index.html", - "trailing_slashes": true, - "cache": 3600, - "aws_profile": "default", - "aws_region": "us-east-1", - "cdn": false, - "dns_configured": true + "domain": "0x-instant-staging", + "build_command": "yarn build:umd:prod", + "upload_directory": "public", + "index_key": "index.html", + "error_key": "index.html", + "trailing_slashes": true, + "cache": 3600, + "aws_profile": "default", + "aws_region": "us-east-1", + "cdn": false, + "dns_configured": true } diff --git a/packages/instant/src/redux/reducer.ts b/packages/instant/src/redux/reducer.ts index 8c1902bb8..bc435d069 100644 --- a/packages/instant/src/redux/reducer.ts +++ b/packages/instant/src/redux/reducer.ts @@ -15,7 +15,6 @@ import { OrderProcessState, OrderState, } from '../types'; -import { assetUtils } from '../util/asset'; import { Action, ActionTypes } from './actions'; -- cgit v1.2.3 From eb46570a38c0c2b698ec1fe23806c2ff4c8e7bfa Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Mon, 5 Nov 2018 09:42:22 -0800 Subject: chore(instant): import UI components directly --- packages/instant/src/components/amount_placeholder.tsx | 2 +- packages/instant/src/components/buy_button.tsx | 3 ++- packages/instant/src/components/buy_order_progress.tsx | 2 +- packages/instant/src/components/buy_order_state_buttons.tsx | 5 ++++- packages/instant/src/components/erc20_asset_amount_input.tsx | 6 +++++- packages/instant/src/components/erc20_token_selector.tsx | 6 +++++- packages/instant/src/components/instant_heading.tsx | 6 +++++- packages/instant/src/components/order_details.tsx | 5 ++++- packages/instant/src/components/placing_order_button.tsx | 5 ++++- packages/instant/src/components/scaling_input.tsx | 2 +- packages/instant/src/components/search_input.tsx | 5 ++++- packages/instant/src/components/secondary_button.tsx | 3 ++- packages/instant/src/components/sliding_error.tsx | 4 +++- packages/instant/src/components/sliding_panel.tsx | 6 +++++- packages/instant/src/components/ui/index.ts | 9 --------- packages/instant/src/components/zero_ex_instant_container.tsx | 3 ++- packages/instant/src/components/zero_ex_instant_overlay.tsx | 2 +- 17 files changed, 49 insertions(+), 25 deletions(-) delete mode 100644 packages/instant/src/components/ui/index.ts (limited to 'packages') diff --git a/packages/instant/src/components/amount_placeholder.tsx b/packages/instant/src/components/amount_placeholder.tsx index 6ef8f0ac3..29ce8fafb 100644 --- a/packages/instant/src/components/amount_placeholder.tsx +++ b/packages/instant/src/components/amount_placeholder.tsx @@ -4,7 +4,7 @@ import { ColorOption } from '../style/theme'; import { Pulse } from './animations/pulse'; -import { Text } from './ui'; +import { Text } from './ui/text'; interface PlainPlaceholder { color: ColorOption; diff --git a/packages/instant/src/components/buy_button.tsx b/packages/instant/src/components/buy_button.tsx index 9d9a8540c..e6d50de96 100644 --- a/packages/instant/src/components/buy_button.tsx +++ b/packages/instant/src/components/buy_button.tsx @@ -12,7 +12,8 @@ import { balanceUtil } from '../util/balance'; import { gasPriceEstimator } from '../util/gas_price_estimator'; import { util } from '../util/util'; -import { Button, Text } from './ui'; +import { Button } from './ui/button'; +import { Text } from './ui/text'; export interface BuyButtonProps { buyQuote?: BuyQuote; diff --git a/packages/instant/src/components/buy_order_progress.tsx b/packages/instant/src/components/buy_order_progress.tsx index e259e5606..7fe4e77e9 100644 --- a/packages/instant/src/components/buy_order_progress.tsx +++ b/packages/instant/src/components/buy_order_progress.tsx @@ -3,7 +3,7 @@ import * as React from 'react'; import { TimedProgressBar } from '../components/timed_progress_bar'; import { TimeCounter } from '../components/time_counter'; -import { Container } from '../components/ui'; +import { Container } from '../components/ui/container'; import { OrderProcessState, OrderState } from '../types'; export interface BuyOrderProgressProps { diff --git a/packages/instant/src/components/buy_order_state_buttons.tsx b/packages/instant/src/components/buy_order_state_buttons.tsx index 5c074a67a..0d54d3187 100644 --- a/packages/instant/src/components/buy_order_state_buttons.tsx +++ b/packages/instant/src/components/buy_order_state_buttons.tsx @@ -7,7 +7,10 @@ import { AffiliateInfo, OrderProcessState, ZeroExInstantError } from '../types'; import { BuyButton } from './buy_button'; import { PlacingOrderButton } from './placing_order_button'; import { SecondaryButton } from './secondary_button'; -import { Button, Flex, Text } from './ui'; + +import { Button } from './ui/button'; +import { Flex } from './ui/flex'; +import { Text } from './ui/text'; export interface BuyOrderStateButtonProps { buyQuote?: BuyQuote; diff --git a/packages/instant/src/components/erc20_asset_amount_input.tsx b/packages/instant/src/components/erc20_asset_amount_input.tsx index 6ad0e92e7..f21c21b87 100644 --- a/packages/instant/src/components/erc20_asset_amount_input.tsx +++ b/packages/instant/src/components/erc20_asset_amount_input.tsx @@ -8,7 +8,11 @@ import { assetUtils } from '../util/asset'; import { util } from '../util/util'; import { ScalingAmountInput } from './scaling_amount_input'; -import { Container, Flex, Icon, Text } from './ui'; + +import { Container } from './ui/container'; +import { Flex } from './ui/flex'; +import { Icon } from './ui/icon'; +import { Text } from './ui/text'; // Asset amounts only apply to ERC20 assets export interface ERC20AssetAmountInputProps { diff --git a/packages/instant/src/components/erc20_token_selector.tsx b/packages/instant/src/components/erc20_token_selector.tsx index 481778495..41b0b44b0 100644 --- a/packages/instant/src/components/erc20_token_selector.tsx +++ b/packages/instant/src/components/erc20_token_selector.tsx @@ -6,7 +6,11 @@ import { ERC20Asset } from '../types'; import { assetUtils } from '../util/asset'; import { SearchInput } from './search_input'; -import { Circle, Container, Flex, Text } from './ui'; + +import { Circle } from './ui/circle'; +import { Container } from './ui/container'; +import { Flex } from './ui/flex'; +import { Text } from './ui/text'; export interface ERC20TokenSelectorProps { tokens: ERC20Asset[]; diff --git a/packages/instant/src/components/instant_heading.tsx b/packages/instant/src/components/instant_heading.tsx index 80d7a3ee2..6d87bc292 100644 --- a/packages/instant/src/components/instant_heading.tsx +++ b/packages/instant/src/components/instant_heading.tsx @@ -8,7 +8,11 @@ import { AsyncProcessState, ERC20Asset, OrderProcessState, OrderState } from '.. import { format } from '../util/format'; import { AmountPlaceholder } from './amount_placeholder'; -import { Container, Flex, Icon, Spinner, Text } from './ui'; +import { Container } from './ui/container'; +import { Flex } from './ui/flex'; +import { Icon } from './ui/icon'; +import { Spinner } from './ui/spinner'; +import { Text } from './ui/text'; export interface InstantHeadingProps { selectedAssetAmount?: BigNumber; diff --git a/packages/instant/src/components/order_details.tsx b/packages/instant/src/components/order_details.tsx index 704009d89..f1029d70c 100644 --- a/packages/instant/src/components/order_details.tsx +++ b/packages/instant/src/components/order_details.tsx @@ -8,7 +8,10 @@ import { ColorOption } from '../style/theme'; import { format } from '../util/format'; import { AmountPlaceholder } from './amount_placeholder'; -import { Container, Flex, Text } from './ui'; + +import { Container } from './ui/container'; +import { Flex } from './ui/flex'; +import { Text } from './ui/text'; export interface OrderDetailsProps { buyQuoteInfo?: BuyQuoteInfo; diff --git a/packages/instant/src/components/placing_order_button.tsx b/packages/instant/src/components/placing_order_button.tsx index e5a6371e6..4232e6c22 100644 --- a/packages/instant/src/components/placing_order_button.tsx +++ b/packages/instant/src/components/placing_order_button.tsx @@ -2,7 +2,10 @@ import * as React from 'react'; import { ColorOption } from '../style/theme'; -import { Button, Container, Spinner, Text } from './ui'; +import { Button } from './ui/button'; +import { Container } from './ui/container'; +import { Spinner } from './ui/spinner'; +import { Text } from './ui/text'; export const PlacingOrderButton: React.StatelessComponent<{}> = props => (