From ee42b8eebb214511a5125b68619aaa9a87d4f501 Mon Sep 17 00:00:00 2001 From: Sara Vieira Date: Sat, 24 Nov 2018 15:10:11 +0100 Subject: [PATCH] add build --- .travis.yml | 7 +++++++ package.json | 6 +----- src/components/loading.js | 4 +++- src/index.js | 40 +++++---------------------------------- src/utils/global.js | 34 +++++++++++++++++++++++++++++++++ 5 files changed, 50 insertions(+), 41 deletions(-) create mode 100644 .travis.yml create mode 100644 src/utils/global.js diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..02074e2 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,7 @@ +language: node_js +cache: + directories: + - node_modules + yarn: true +node_js: + - 9 diff --git a/package.json b/package.json index f14f757..c10ddef 100644 --- a/package.json +++ b/package.json @@ -19,11 +19,7 @@ } }, "eslintConfig": { - "extends": ["eslint-config-synacor", "prettier"], - "rules": { - "react/display-name": "off", - "react/no-did-mount-set-state": "off" - } + "extends": ["eslint-config-synacor", "prettier"] }, "eslintIgnore": ["build/*"], "devDependencies": { diff --git a/src/components/loading.js b/src/components/loading.js index 159a64f..861fb02 100644 --- a/src/components/loading.js +++ b/src/components/loading.js @@ -37,9 +37,11 @@ const Pulsate = styled.div` } ` -export default () => ( +const Loading = () => (
) + +export default Loading diff --git a/src/index.js b/src/index.js index 7b08a69..eb888f6 100644 --- a/src/index.js +++ b/src/index.js @@ -1,40 +1,8 @@ import App from './components/app' -import styled, { injectGlobal } from 'react-emotion' +import styled from 'react-emotion' import { ThemeProvider } from 'emotion-theming' import { Grid } from 'react-emotion-flexboxgrid' - -injectGlobal` - @import url('https://fonts.googleapis.com/css?family=Roboto'); - html, body { - height: 100%; - width: 100%; - overflow-x: hidden; - padding: 0; - margin: 0; - background: #FAFAFA; - font-family: 'Roboto', arial, sans-serif; - font-weight: 600; - color: #e8eaf6; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - } - - * { - box-sizing: border-box; - } - - #app { - height: 100%; - width: 100%; - opacity: 1; - backface-visibility: hidden; - } - - ul { - padding: 0; - margin: 0; - } -` +import './utils/global' const theme = { primary: '#4a0072', @@ -52,7 +20,7 @@ const System = styled(Grid)` height: 100%; ` -export default () => ( +const Main = () => ( @@ -61,3 +29,5 @@ export default () => ( ) + +export default Main diff --git a/src/utils/global.js b/src/utils/global.js new file mode 100644 index 0000000..6c3fbbc --- /dev/null +++ b/src/utils/global.js @@ -0,0 +1,34 @@ +import { injectGlobal } from 'react-emotion' + +export default injectGlobal` + @import url('https://fonts.googleapis.com/css?family=Roboto'); + html, body { + height: 100%; + width: 100%; + overflow-x: hidden; + padding: 0; + margin: 0; + background: #FAFAFA; + font-family: 'Roboto', arial, sans-serif; + font-weight: 600; + color: #e8eaf6; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + } + + * { + box-sizing: border-box; + } + + #app { + height: 100%; + width: 100%; + opacity: 1; + backface-visibility: hidden; + } + + ul { + padding: 0; + margin: 0; + } +`