Skip to content

Commit

Permalink
migrate to CRA (#10)
Browse files Browse the repository at this point in the history
* migrate to CRA

* fix coverage drop

* snap
  • Loading branch information
chrisdopuch authored Dec 25, 2018
1 parent 001308d commit c64b727
Show file tree
Hide file tree
Showing 17 changed files with 15,411 additions and 12,592 deletions.
1 change: 0 additions & 1 deletion __mocks__/fileMock.js

This file was deleted.

7 changes: 0 additions & 7 deletions images.d.ts

This file was deleted.

27,710 changes: 15,270 additions & 12,440 deletions package-lock.json

Large diffs are not rendered by default.

51 changes: 32 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,48 +5,61 @@
"license": "MIT",
"dependencies": {
"@material-ui/core": "^3.2.2",
"react": "^16.7.0-alpha.0",
"react-dom": "^16.7.0-alpha.0",
"react": "^16.7.0-alpha.2",
"react-dom": "^16.7.0-alpha.2",
"react-ga": "^2.5.3",
"react-grid-gallery": "^0.5.3",
"react-hookstore": "^1.0.8",
"react-scripts-ts": "3.1.0",
"react-router-dom": "^4.3.1",
"react-social-github": "^2.1.1",
"react-twitter-widgets": "^1.7.1"
"react-twitter-widgets": "^1.7.1",
"tslint-react": "^3.6.0"
},
"scripts": {
"start": "react-scripts-ts start",
"build": "react-scripts-ts build",
"test": "jest",
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"test:watch": "npm run test -- --watch",
"eject": "react-scripts-ts eject",
"eject": "react-scripts eject",
"lint": "tslint -p tsconfig.json",
"format": "prettier --write \"src/**/*.{ts,tsx}\" && npm run lint -- --fix",
"coveralls": "jest --coverage && cat ./coverage/lcov.info | coveralls",
"coveralls": "npm run test -- --coverage && cat ./coverage/lcov.info | coveralls",
"thumbnails": "thumb -w 300 src/images src/thumbnails"
},
"devDependencies": {
"@material-ui/icons": "^3.0.1",
"@types/enzyme": "^3.1.14",
"@types/jest": "^23.3.5",
"@types/node": "^10.12.0",
"@types/react": "^16.7.0-alpha.0",
"@types/react-dom": "^16.0.9",
"@types/react-ga": "^2.3.0",
"@types/jest": "^23.3.10",
"@types/node": "^10.12.18",
"@types/react": "^16.7.18",
"@types/react-dom": "^16.0.11",
"@types/react-grid-gallery": "file:types/react-grid-gallery",
"@types/react-hookstore": "file:types/react-hookstore",
"@types/react-router-dom": "^4.3.1",
"ajv": "^6.5.4",
"babel-core": "^7.0.0-bridge.0",
"coveralls": "^3.0.2",
"enzyme": "^3.7.0",
"enzyme-adapter-react-16": "^1.6.0",
"enzyme-to-json": "^3.3.4",
"enzyme-adapter-react-16": "^1.7.1",
"enzyme-to-json": "^3.3.5",
"jest": "^23.6.0",
"node-thumbnail": "^0.14.0",
"prettier": "^1.14.3",
"react-router-dom": "^4.3.1",
"react-scripts": "^2.1.2",
"ts-jest": "^23.10.4",
"typescript": "^3.1.3",
"webpack": "^3.12.0"
"tslint": "^5.12.0",
"tslint-config-prettier": "^1.17.0",
"typescript": "^3.2.2"
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
],
"jest": {
"snapshotSerializers": [
"enzyme-to-json/serializer"
]
}
}
8 changes: 7 additions & 1 deletion src/components/App.test.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createMuiTheme } from '@material-ui/core';
import { shallow } from 'enzyme';
import React from 'react';
import { App } from './App';
import { App, Projects } from './App';

const appTheme = createMuiTheme({
breakpoints: {
Expand Down Expand Up @@ -36,4 +36,10 @@ describe('App', () => {

expect(wrapper).toMatchSnapshot();
});

it('renders Projects', () => {
const wrapper = shallow(<Projects />);

expect(wrapper).toMatchSnapshot();
});
});
2 changes: 1 addition & 1 deletion src/components/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import Gallery from './pages/Gallery';
import Home from './pages/Home';
import TitleBar from './TitleBar';

const Projects = () => (
export const Projects = () => (
<Typography variant="h2" component="h3">
Projects
</Typography>
Expand Down
65 changes: 37 additions & 28 deletions src/components/__snapshots__/App.test.tsx.snap
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`App renders Projects 1`] = `
<WithStyles(Typography)
component="h3"
variant="h2"
>
Projects
</WithStyles(Typography)>
`;

exports[`App renders default props 1`] = `
<Fragment>
<WithStyles(CssBaseline) />
<MuiThemeProvider
<MuiThemeProviderOld
theme={
Object {
"breakpoints": Object {
Expand Down Expand Up @@ -127,30 +136,30 @@ exports[`App renders default props 1`] = `
"props": Object {},
"shadows": Array [
"none",
"0px 1px 3px 0px rgba(0, 0, 0, 0.2),0px 1px 1px 0px rgba(0, 0, 0, 0.14),0px 2px 1px -1px rgba(0, 0, 0, 0.12)",
"0px 1px 5px 0px rgba(0, 0, 0, 0.2),0px 2px 2px 0px rgba(0, 0, 0, 0.14),0px 3px 1px -2px rgba(0, 0, 0, 0.12)",
"0px 1px 8px 0px rgba(0, 0, 0, 0.2),0px 3px 4px 0px rgba(0, 0, 0, 0.14),0px 3px 3px -2px rgba(0, 0, 0, 0.12)",
"0px 2px 4px -1px rgba(0, 0, 0, 0.2),0px 4px 5px 0px rgba(0, 0, 0, 0.14),0px 1px 10px 0px rgba(0, 0, 0, 0.12)",
"0px 3px 5px -1px rgba(0, 0, 0, 0.2),0px 5px 8px 0px rgba(0, 0, 0, 0.14),0px 1px 14px 0px rgba(0, 0, 0, 0.12)",
"0px 3px 5px -1px rgba(0, 0, 0, 0.2),0px 6px 10px 0px rgba(0, 0, 0, 0.14),0px 1px 18px 0px rgba(0, 0, 0, 0.12)",
"0px 4px 5px -2px rgba(0, 0, 0, 0.2),0px 7px 10px 1px rgba(0, 0, 0, 0.14),0px 2px 16px 1px rgba(0, 0, 0, 0.12)",
"0px 5px 5px -3px rgba(0, 0, 0, 0.2),0px 8px 10px 1px rgba(0, 0, 0, 0.14),0px 3px 14px 2px rgba(0, 0, 0, 0.12)",
"0px 5px 6px -3px rgba(0, 0, 0, 0.2),0px 9px 12px 1px rgba(0, 0, 0, 0.14),0px 3px 16px 2px rgba(0, 0, 0, 0.12)",
"0px 6px 6px -3px rgba(0, 0, 0, 0.2),0px 10px 14px 1px rgba(0, 0, 0, 0.14),0px 4px 18px 3px rgba(0, 0, 0, 0.12)",
"0px 6px 7px -4px rgba(0, 0, 0, 0.2),0px 11px 15px 1px rgba(0, 0, 0, 0.14),0px 4px 20px 3px rgba(0, 0, 0, 0.12)",
"0px 7px 8px -4px rgba(0, 0, 0, 0.2),0px 12px 17px 2px rgba(0, 0, 0, 0.14),0px 5px 22px 4px rgba(0, 0, 0, 0.12)",
"0px 7px 8px -4px rgba(0, 0, 0, 0.2),0px 13px 19px 2px rgba(0, 0, 0, 0.14),0px 5px 24px 4px rgba(0, 0, 0, 0.12)",
"0px 7px 9px -4px rgba(0, 0, 0, 0.2),0px 14px 21px 2px rgba(0, 0, 0, 0.14),0px 5px 26px 4px rgba(0, 0, 0, 0.12)",
"0px 8px 9px -5px rgba(0, 0, 0, 0.2),0px 15px 22px 2px rgba(0, 0, 0, 0.14),0px 6px 28px 5px rgba(0, 0, 0, 0.12)",
"0px 8px 10px -5px rgba(0, 0, 0, 0.2),0px 16px 24px 2px rgba(0, 0, 0, 0.14),0px 6px 30px 5px rgba(0, 0, 0, 0.12)",
"0px 8px 11px -5px rgba(0, 0, 0, 0.2),0px 17px 26px 2px rgba(0, 0, 0, 0.14),0px 6px 32px 5px rgba(0, 0, 0, 0.12)",
"0px 9px 11px -5px rgba(0, 0, 0, 0.2),0px 18px 28px 2px rgba(0, 0, 0, 0.14),0px 7px 34px 6px rgba(0, 0, 0, 0.12)",
"0px 9px 12px -6px rgba(0, 0, 0, 0.2),0px 19px 29px 2px rgba(0, 0, 0, 0.14),0px 7px 36px 6px rgba(0, 0, 0, 0.12)",
"0px 10px 13px -6px rgba(0, 0, 0, 0.2),0px 20px 31px 3px rgba(0, 0, 0, 0.14),0px 8px 38px 7px rgba(0, 0, 0, 0.12)",
"0px 10px 13px -6px rgba(0, 0, 0, 0.2),0px 21px 33px 3px rgba(0, 0, 0, 0.14),0px 8px 40px 7px rgba(0, 0, 0, 0.12)",
"0px 10px 14px -6px rgba(0, 0, 0, 0.2),0px 22px 35px 3px rgba(0, 0, 0, 0.14),0px 8px 42px 7px rgba(0, 0, 0, 0.12)",
"0px 11px 14px -7px rgba(0, 0, 0, 0.2),0px 23px 36px 3px rgba(0, 0, 0, 0.14),0px 9px 44px 8px rgba(0, 0, 0, 0.12)",
"0px 11px 15px -7px rgba(0, 0, 0, 0.2),0px 24px 38px 3px rgba(0, 0, 0, 0.14),0px 9px 46px 8px rgba(0, 0, 0, 0.12)",
"0px 1px 3px 0px rgba(0,0,0,0.2),0px 1px 1px 0px rgba(0,0,0,0.14),0px 2px 1px -1px rgba(0,0,0,0.12)",
"0px 1px 5px 0px rgba(0,0,0,0.2),0px 2px 2px 0px rgba(0,0,0,0.14),0px 3px 1px -2px rgba(0,0,0,0.12)",
"0px 1px 8px 0px rgba(0,0,0,0.2),0px 3px 4px 0px rgba(0,0,0,0.14),0px 3px 3px -2px rgba(0,0,0,0.12)",
"0px 2px 4px -1px rgba(0,0,0,0.2),0px 4px 5px 0px rgba(0,0,0,0.14),0px 1px 10px 0px rgba(0,0,0,0.12)",
"0px 3px 5px -1px rgba(0,0,0,0.2),0px 5px 8px 0px rgba(0,0,0,0.14),0px 1px 14px 0px rgba(0,0,0,0.12)",
"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)",
"0px 4px 5px -2px rgba(0,0,0,0.2),0px 7px 10px 1px rgba(0,0,0,0.14),0px 2px 16px 1px rgba(0,0,0,0.12)",
"0px 5px 5px -3px rgba(0,0,0,0.2),0px 8px 10px 1px rgba(0,0,0,0.14),0px 3px 14px 2px rgba(0,0,0,0.12)",
"0px 5px 6px -3px rgba(0,0,0,0.2),0px 9px 12px 1px rgba(0,0,0,0.14),0px 3px 16px 2px rgba(0,0,0,0.12)",
"0px 6px 6px -3px rgba(0,0,0,0.2),0px 10px 14px 1px rgba(0,0,0,0.14),0px 4px 18px 3px rgba(0,0,0,0.12)",
"0px 6px 7px -4px rgba(0,0,0,0.2),0px 11px 15px 1px rgba(0,0,0,0.14),0px 4px 20px 3px rgba(0,0,0,0.12)",
"0px 7px 8px -4px rgba(0,0,0,0.2),0px 12px 17px 2px rgba(0,0,0,0.14),0px 5px 22px 4px rgba(0,0,0,0.12)",
"0px 7px 8px -4px rgba(0,0,0,0.2),0px 13px 19px 2px rgba(0,0,0,0.14),0px 5px 24px 4px rgba(0,0,0,0.12)",
"0px 7px 9px -4px rgba(0,0,0,0.2),0px 14px 21px 2px rgba(0,0,0,0.14),0px 5px 26px 4px rgba(0,0,0,0.12)",
"0px 8px 9px -5px rgba(0,0,0,0.2),0px 15px 22px 2px rgba(0,0,0,0.14),0px 6px 28px 5px rgba(0,0,0,0.12)",
"0px 8px 10px -5px rgba(0,0,0,0.2),0px 16px 24px 2px rgba(0,0,0,0.14),0px 6px 30px 5px rgba(0,0,0,0.12)",
"0px 8px 11px -5px rgba(0,0,0,0.2),0px 17px 26px 2px rgba(0,0,0,0.14),0px 6px 32px 5px rgba(0,0,0,0.12)",
"0px 9px 11px -5px rgba(0,0,0,0.2),0px 18px 28px 2px rgba(0,0,0,0.14),0px 7px 34px 6px rgba(0,0,0,0.12)",
"0px 9px 12px -6px rgba(0,0,0,0.2),0px 19px 29px 2px rgba(0,0,0,0.14),0px 7px 36px 6px rgba(0,0,0,0.12)",
"0px 10px 13px -6px rgba(0,0,0,0.2),0px 20px 31px 3px rgba(0,0,0,0.14),0px 8px 38px 7px rgba(0,0,0,0.12)",
"0px 10px 13px -6px rgba(0,0,0,0.2),0px 21px 33px 3px rgba(0,0,0,0.14),0px 8px 40px 7px rgba(0,0,0,0.12)",
"0px 10px 14px -6px rgba(0,0,0,0.2),0px 22px 35px 3px rgba(0,0,0,0.14),0px 8px 42px 7px rgba(0,0,0,0.12)",
"0px 11px 14px -7px rgba(0,0,0,0.2),0px 23px 36px 3px rgba(0,0,0,0.14),0px 9px 44px 8px rgba(0,0,0,0.12)",
"0px 11px 15px -7px rgba(0,0,0,0.2),0px 24px 38px 3px rgba(0,0,0,0.14),0px 9px 46px 8px rgba(0,0,0,0.12)",
],
"shape": Object {
"borderRadius": 4,
Expand Down Expand Up @@ -395,10 +404,10 @@ exports[`App renders default props 1`] = `
<div
className="root"
>
<WithStyles(Component)
<WithStyles(TitleBar)
title="test"
/>
<WithStyles(Component)
<WithStyles(NavDrawer)
items={
Array [
Object {
Expand Down Expand Up @@ -465,6 +474,6 @@ exports[`App renders default props 1`] = `
</main>
</div>
</BrowserRouter>
</MuiThemeProvider>
</MuiThemeProviderOld>
</Fragment>
`;
8 changes: 4 additions & 4 deletions src/components/__snapshots__/NavDrawer.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ exports[`NavDrawer snapshots renders default props 1`] = `
open={true}
variant="temporary"
>
<WithStyles(Component)
<WithStyles(DrawerContent)
items={Array []}
/>
</WithStyles(Drawer)>
Expand All @@ -60,7 +60,7 @@ exports[`NavDrawer snapshots renders default props 1`] = `
open={true}
variant="permanent"
>
<WithStyles(Component)
<WithStyles(DrawerContent)
items={Array []}
/>
</WithStyles(Drawer)>
Expand Down Expand Up @@ -101,7 +101,7 @@ exports[`NavDrawer snapshots renders with items 1`] = `
open={true}
variant="temporary"
>
<WithStyles(Component)
<WithStyles(DrawerContent)
items={
Array [
Object {
Expand Down Expand Up @@ -145,7 +145,7 @@ exports[`NavDrawer snapshots renders with items 1`] = `
open={true}
variant="permanent"
>
<WithStyles(Component)
<WithStyles(DrawerContent)
items={
Array [
Object {
Expand Down
4 changes: 2 additions & 2 deletions src/components/pages/About.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Divider from '@material-ui/core/Divider';
import Grid from '@material-ui/core/Grid';
import Hidden from '@material-ui/core/Hidden';
import List from '@material-ui/core/List';
import ListItem from '@material-ui/core/ListItem';
import ListItem, { ListItemProps } from '@material-ui/core/ListItem';
import ListItemAvatar from '@material-ui/core/ListItemAvatar';
import ListItemText from '@material-ui/core/ListItemText';
import Paper from '@material-ui/core/Paper';
Expand Down Expand Up @@ -56,7 +56,7 @@ interface IQuickFact {
primary: string;
secondary: string;
tertiary?: string;
component?: ComponentClass<any> | string;
component?: React.ReactType<ListItemProps>;
componentProps?: object;
}

Expand Down
12 changes: 6 additions & 6 deletions src/components/pages/__snapshots__/About.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ exports[`About Main Component should render with default props 1`] = `
className="root"
elevation={1}
>
<Component
<Header
classes={
Object {
"avatar": "avatar",
Expand Down Expand Up @@ -62,7 +62,7 @@ exports[`About Main Component should render with default props 1`] = `
item={true}
xs={6}
>
<Component
<ProfilePicture
classes={
Object {
"avatar": "avatar",
Expand All @@ -82,7 +82,7 @@ exports[`About Main Component should render with default props 1`] = `
item={true}
xs={6}
>
<Component
<QuickFacts
classes={
Object {
"avatar": "avatar",
Expand Down Expand Up @@ -113,7 +113,7 @@ exports[`About Main Component should render with default props 1`] = `
xsDown={false}
xsUp={false}
>
<Component
<ProfilePicture
classes={
Object {
"avatar": "avatar",
Expand All @@ -128,7 +128,7 @@ exports[`About Main Component should render with default props 1`] = `
location={Object {}}
match={Object {}}
/>
<Component
<QuickFacts
classes={
Object {
"avatar": "avatar",
Expand All @@ -155,7 +155,7 @@ exports[`About ProfilePicture should render with default props 1`] = `
<WithStyles(Avatar)
alt="Chris Dopuch"
className="avatar"
src="test-file-stub"
src="me-singing.jpg"
/>
</div>
`;
Expand Down
Loading

0 comments on commit c64b727

Please sign in to comment.