From 4a526c92bbbf2e454326d0d06a8efa61376778b3 Mon Sep 17 00:00:00 2001 From: Griffithtp Date: Thu, 8 Aug 2019 21:58:15 +0100 Subject: [PATCH 1/7] refactor: add reusable styles properties --- src/components/Author/styles.ts | 3 ++- src/components/Developers/styles.ts | 3 ++- src/components/Dist/styles.ts | 3 ++- src/components/Engines/styles.ts | 3 ++- src/components/Header/styles.ts | 2 +- src/components/Layout/Layout.tsx | 3 ++- src/components/Package/styles.ts | 4 ++-- 7 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/components/Author/styles.ts b/src/components/Author/styles.ts index 9fec8fc..b6b8d6c 100644 --- a/src/components/Author/styles.ts +++ b/src/components/Author/styles.ts @@ -1,10 +1,11 @@ import styled from 'react-emotion'; import ListItem from '@material-ui/core/ListItem'; import Typography from '@material-ui/core/Typography'; +import { fontWeight } from '../../utils/styles/sizes'; export const Heading = styled(Typography)({ '&&': { - fontWeight: 700, + fontWeight: fontWeight.bold, textTransform: 'capitalize', }, }); diff --git a/src/components/Developers/styles.ts b/src/components/Developers/styles.ts index e4dc92b..aa2fc23 100644 --- a/src/components/Developers/styles.ts +++ b/src/components/Developers/styles.ts @@ -2,6 +2,7 @@ import styled from 'react-emotion'; import Typography from '@material-ui/core/Typography'; import { default as MuiFab } from '@material-ui/core/Fab'; import colors from '../../utils/styles/colors'; +import { fontWeight } from '../../utils/styles/sizes'; export const Details = styled('span')({ display: 'flex', @@ -20,7 +21,7 @@ export const Content = styled('div')({ export const Heading = styled(Typography)({ '&&': { - fontWeight: 700, + fontWeight: fontWeight.bold, marginBottom: '10px', textTransform: 'capitalize', }, diff --git a/src/components/Dist/styles.ts b/src/components/Dist/styles.ts index 4100799..1ca45c5 100644 --- a/src/components/Dist/styles.ts +++ b/src/components/Dist/styles.ts @@ -5,10 +5,11 @@ import ListItem from '@material-ui/core/ListItem'; import Typography from '@material-ui/core/Typography'; import colors from '../../utils/styles/colors'; +import { fontWeight } from '../../utils/styles/sizes'; export const Heading = styled(Typography)({ '&&': { - fontWeight: 700, + fontWeight: fontWeight.bold, textTransform: 'capitalize', }, }); diff --git a/src/components/Engines/styles.ts b/src/components/Engines/styles.ts index 69b3d24..e9c3104 100644 --- a/src/components/Engines/styles.ts +++ b/src/components/Engines/styles.ts @@ -1,10 +1,11 @@ import styled from 'react-emotion'; import ListItem from '@material-ui/core/ListItem'; import Typography from '@material-ui/core/Typography'; +import { fontWeight } from '../../utils/styles/sizes'; export const Heading = styled(Typography)({ '&&': { - fontWeight: 700, + fontWeight: fontWeight.bold, textTransform: 'capitalize', }, }); diff --git a/src/components/Header/styles.ts b/src/components/Header/styles.ts index 3c4ad73..ad7d9c1 100644 --- a/src/components/Header/styles.ts +++ b/src/components/Header/styles.ts @@ -49,7 +49,7 @@ export const InnerMobileNavBar = styled('div')({ backgroundColor: colors.greyLight, color: colors.white, width: '100%', - padding: '0px 5px', + padding: '0 5px', margin: '0 10px 0 0', }, }); diff --git a/src/components/Layout/Layout.tsx b/src/components/Layout/Layout.tsx index f8f9296..968e78f 100644 --- a/src/components/Layout/Layout.tsx +++ b/src/components/Layout/Layout.tsx @@ -1,8 +1,9 @@ import styled, { css } from 'react-emotion'; +import colors from '../../utils/styles/colors'; export const Content = styled('div')({ '&&': { - backgroundColor: '#ffffff', + backgroundColor: colors.white, flex: 1, display: 'flex', position: 'relative', diff --git a/src/components/Package/styles.ts b/src/components/Package/styles.ts index 7650835..482af45 100644 --- a/src/components/Package/styles.ts +++ b/src/components/Package/styles.ts @@ -36,7 +36,7 @@ export const OverviewItem = styled('span')` export const Icon = styled(Ico)({ '&&': { - margin: '2px 10px 0px 0', + margin: '2px 10px 0 0', fill: colors.greyLight2, }, }); @@ -44,7 +44,7 @@ export const Icon = styled(Ico)({ export const Published = styled('span')({ '&&': { color: colors.greyLight2, - margin: '0px 5px 0px 0px', + margin: '0 5px 0 0', }, }); From d44cc7f6629f5de91165caff0e82d8197a5974f2 Mon Sep 17 00:00:00 2001 From: Griffithtp Date: Thu, 8 Aug 2019 22:08:37 +0100 Subject: [PATCH 2/7] refactor: update all reusable fontWeights --- src/components/Dependencies/styles.ts | 3 ++- src/components/Install/styles.ts | 3 ++- src/components/Package/styles.ts | 3 ++- src/components/Repository/styles.ts | 3 ++- src/components/UpLinks/styles.ts | 3 ++- src/components/Versions/styles.ts | 3 ++- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/components/Dependencies/styles.ts b/src/components/Dependencies/styles.ts index 545494c..547039d 100644 --- a/src/components/Dependencies/styles.ts +++ b/src/components/Dependencies/styles.ts @@ -2,6 +2,7 @@ import styled from 'react-emotion'; import Card from '@material-ui/core/Card'; import Typography from '@material-ui/core/Typography'; import Chip from '@material-ui/core/Chip'; +import { fontWeight } from '../../utils/styles/sizes'; export const CardWrap = styled(Card)({ '&&': { @@ -11,7 +12,7 @@ export const CardWrap = styled(Card)({ export const Heading = styled(Typography)({ '&&': { - fontWeight: 700, + fontWeight: fontWeight.bold, textTransform: 'capitalize', }, }); diff --git a/src/components/Install/styles.ts b/src/components/Install/styles.ts index d76d538..635294e 100644 --- a/src/components/Install/styles.ts +++ b/src/components/Install/styles.ts @@ -2,10 +2,11 @@ import Avatar from '@material-ui/core/Avatar'; import ListItem from '@material-ui/core/ListItem'; import Typography from '@material-ui/core/Typography'; import styled from 'react-emotion'; +import { fontWeight } from '../../utils/styles/sizes'; export const Heading = styled(Typography)({ '&&': { - fontWeight: 700, + fontWeight: fontWeight.bold, textTransform: 'capitalize', }, }); diff --git a/src/components/Package/styles.ts b/src/components/Package/styles.ts index 482af45..44a1707 100644 --- a/src/components/Package/styles.ts +++ b/src/components/Package/styles.ts @@ -13,6 +13,7 @@ import { breakpoints } from '../../utils/styles/media'; import Ico from '../Icon'; import Label from '../Label'; import colors from '../../utils/styles/colors'; +import { fontWeight } from '../../utils/styles/sizes'; export const OverviewItem = styled('span')` && { @@ -52,7 +53,7 @@ export const Published = styled('span')({ export const Text = styled(Label)({ '&&': { fontSize: '12px', - fontWeight: 500, + fontWeight: fontWeight.semiBold, color: colors.greyLight2, }, }); diff --git a/src/components/Repository/styles.ts b/src/components/Repository/styles.ts index 6fa73fd..4a55ccb 100644 --- a/src/components/Repository/styles.ts +++ b/src/components/Repository/styles.ts @@ -5,10 +5,11 @@ import Typography from '@material-ui/core/Typography'; import Github from '../../icons/GitHub'; import colors from '../../utils/styles/colors'; +import { fontWeight } from '../../utils/styles/sizes'; export const Heading = styled(Typography)({ '&&': { - fontWeight: 700, + fontWeight: fontWeight.bold, textTransform: 'capitalize', }, }); diff --git a/src/components/UpLinks/styles.ts b/src/components/UpLinks/styles.ts index 1dd65c9..01909fe 100644 --- a/src/components/UpLinks/styles.ts +++ b/src/components/UpLinks/styles.ts @@ -1,10 +1,11 @@ import styled from 'react-emotion'; import Typography from '@material-ui/core/Typography'; import { default as MuiListItemText } from '@material-ui/core/ListItemText'; +import { fontWeight } from '../../utils/styles/sizes'; export const Heading = styled(Typography)({ '&&': { - fontWeight: 700, + fontWeight: fontWeight.bold, }, }); diff --git a/src/components/Versions/styles.ts b/src/components/Versions/styles.ts index 1dd65c9..01909fe 100644 --- a/src/components/Versions/styles.ts +++ b/src/components/Versions/styles.ts @@ -1,10 +1,11 @@ import styled from 'react-emotion'; import Typography from '@material-ui/core/Typography'; import { default as MuiListItemText } from '@material-ui/core/ListItemText'; +import { fontWeight } from '../../utils/styles/sizes'; export const Heading = styled(Typography)({ '&&': { - fontWeight: 700, + fontWeight: fontWeight.bold, }, }); From 3746a0466f208b89ce787465ac29681153baf0eb Mon Sep 17 00:00:00 2001 From: "Juan Picado @jotadeveloper" Date: Sat, 10 Aug 2019 13:54:27 +0200 Subject: [PATCH 3/7] chore: trying github ci --- .github/workflows/nodejs.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/nodejs.yml diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml new file mode 100644 index 0000000..fdc794c --- /dev/null +++ b/.github/workflows/nodejs.yml @@ -0,0 +1,19 @@ +name: Node CI + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@master + - name: Use Node.js 10.x + uses: actions/setup-node@v1 + with: + version: 10.x + - name: npm install, build, and test + run: | + npm install + npm test From 2e9703346cf2005fe209fdb811ab0aa61118fb18 Mon Sep 17 00:00:00 2001 From: "Juan Picado @jotadeveloper" Date: Sat, 10 Aug 2019 21:19:03 +0200 Subject: [PATCH 4/7] Update nodejs.yml --- .github/workflows/nodejs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index fdc794c..18021f0 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -16,4 +16,4 @@ jobs: - name: npm install, build, and test run: | npm install - npm test + npm build From ade58caf412f5f5c332b648b4611c52d10815bf2 Mon Sep 17 00:00:00 2001 From: "Juan Picado @jotadeveloper" Date: Sat, 10 Aug 2019 21:25:03 +0200 Subject: [PATCH 5/7] Update nodejs.yml --- .github/workflows/nodejs.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 18021f0..d29a4b2 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -13,7 +13,10 @@ jobs: uses: actions/setup-node@v1 with: version: 10.x - - name: npm install, build, and test + - name: Use Yarn 1.17.2 run: | - npm install - npm build + npm install -g yarn@1.17.2 + - name: yarn build + run: | + yarn install + yarn build From 9b55b75f8a68a64b419b81b9b6572f3fd358b88b Mon Sep 17 00:00:00 2001 From: "Juan Picado @jotadeveloper" Date: Sat, 10 Aug 2019 21:29:56 +0200 Subject: [PATCH 6/7] Update nodejs.yml --- .github/workflows/nodejs.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index d29a4b2..4d4c994 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -20,3 +20,25 @@ jobs: run: | yarn install yarn build + test: + name: Test on node ${{ matrix.node_version }} and ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + node_version: [8, 10, 12] + os: [ubuntu-latest, windows-latest, macOS-latest] + + steps: + - uses: actions/checkout@v1 + - name: Use Node.js ${{ matrix.node_version }} + uses: actions/setup-node@v1 + with: + version: ${{ matrix.node_version }} + + - name: Use Yarn 1.17.2 + run: | + npm install -g yarn@1.17.2 + - name: yarn build + run: | + yarn install + yarn build From 62b6edc821675b71375ad320863450ded0f2a466 Mon Sep 17 00:00:00 2001 From: "Juan Picado @jotadeveloper" Date: Sat, 10 Aug 2019 21:38:21 +0200 Subject: [PATCH 7/7] Update nodejs.yml --- .github/workflows/nodejs.yml | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 4d4c994..21164cb 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -3,24 +3,7 @@ name: Node CI on: [push] jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@master - - name: Use Node.js 10.x - uses: actions/setup-node@v1 - with: - version: 10.x - - name: Use Yarn 1.17.2 - run: | - npm install -g yarn@1.17.2 - - name: yarn build - run: | - yarn install - yarn build - test: + ci: name: Test on node ${{ matrix.node_version }} and ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: @@ -41,4 +24,5 @@ jobs: - name: yarn build run: | yarn install + yarn lint yarn build