Skip to content

Commit

Permalink
Update to create-react-app v2.1.0 (#375)
Browse files Browse the repository at this point in the history
* Update to create-react-app v2.1.0

* Remove IGroupRenderProps

* Update inline html report
  • Loading branch information
bootstraponline authored Oct 31, 2018
1 parent f404140 commit 43b2f54
Show file tree
Hide file tree
Showing 21 changed files with 21,338 additions and 5,211 deletions.
25 changes: 22 additions & 3 deletions junit_html_report/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
node_modules/
build/
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
*.log
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
2,171 changes: 9 additions & 2,162 deletions junit_html_report/README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion junit_html_report/inline.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ inline.html({
},
function(err, result) {
if (err) { console.log(err); }
var kotlinResource = '../kotlin_poc/src/main/resources/inline.html';
var kotlinResource = '../test_runner/src/main/resources/inline.html';
fs.writeFileSync(kotlinResource, result);
});
15,131 changes: 15,131 additions & 0 deletions junit_html_report/package-lock.json

Large diffs are not rendered by default.

45 changes: 24 additions & 21 deletions junit_html_report/package.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,32 @@
{
"name": "tmp_react_ts",
"name": "junit_html_report",
"version": "0.1.0",
"private": true,
"dependencies": {
"office-ui-fabric-react": "^5.57.0",
"react": "^16.2.0",
"react-dom": "^16.2.0",
"react-scripts-ts": "2.13.0"
},
"scripts": {
"start": "react-scripts-ts start",
"build": "react-scripts-ts build",
"test": "react-scripts-ts test --env=jsdom",
"eject": "react-scripts-ts eject"
"office-ui-fabric-react": "^6.97.0",
"react": "^16.6.0",
"react-dom": "^16.6.0",
"react-scripts": "2.1.0",
"typescript": "^3.1.4"
},
"devDependencies": {
"@types/jest": "^22.1.4",
"@types/node": "^9.4.6",
"@types/prop-types": "^15.5.2",
"@types/react": "^16.0.39",
"@types/react-dom": "^16.0.4",
"office-ui-fabric-react-tslint": "file:packages/office-ui-fabric-react-tslint",
"tslint": "^5.9.1",
"tslint-microsoft-contrib": "^5.0.3",
"typescript": "^2.7.2",
"@types/react": "^16.4.18",
"@types/react-dom": "^16.0.9",
"web-resource-inliner": "^4.2.1"
}
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
]
}

This file was deleted.

This file was deleted.

177 changes: 0 additions & 177 deletions junit_html_report/packages/office-ui-fabric-react-tslint/tslint.json

This file was deleted.

4 changes: 2 additions & 2 deletions junit_html_report/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="#000000">
<!--
manifest.json provides metadata used when your web app is added to the
homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/
homescreen on Android. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Expand Down
2 changes: 1 addition & 1 deletion junit_html_report/public/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"type": "image/x-icon"
}
],
"start_url": "./index.html",
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
Expand Down
19 changes: 10 additions & 9 deletions junit_html_report/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,9 @@ class App extends React.Component {
selectionMode={SelectionMode.none}
selection={this._selection}
groups={_groups}
groupProps={
{
onRenderHeader: this._onRenderHeader
}
}
groupProps={{
onRenderHeader: this._onRenderHeader
}}
/>
</div>
);
Expand All @@ -67,7 +65,8 @@ class App extends React.Component {
if (props.onToggleCollapse !== undefined) { props.onToggleCollapse(group); }
}

private _onRenderHeader(props: IGroupDividerProps): JSX.Element {
private _onRenderHeader(props?: IGroupDividerProps): JSX.Element {
if (props === undefined) return <GroupHeader />;
props.onGroupHeaderClick = this._onGroupHeaderClick.bind(null, props);

return <GroupHeader { ...props } />;
Expand All @@ -79,16 +78,18 @@ class App extends React.Component {
return { root: style};
}

private _onRenderCell(nestingDepth: number, item: IItem, itemIndex: number): JSX.Element {
private _onRenderCell(nestingDepth?: number, item?: IItem, itemIndex?: number): React.ReactNode {
var emptyItem: IItem = { "key": "empty", "name": "empty", "link": "empty"}
var itemObj = item || emptyItem
return (
<div data-selection-index={itemIndex}>
<span className='GroupedList-name'>
<Link
href={item.link}
href={itemObj.link}
getStyles={this._linkStyles}
target='_blank'
>
{item.name}
{itemObj.name}
</Link>
</span>
</div>
Expand Down
4 changes: 4 additions & 0 deletions junit_html_report/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@ body {
padding: 0;
font-family: sans-serif;
}

.GroupedList-name {
padding-bottom: 40px;
}
6 changes: 4 additions & 2 deletions junit_html_report/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import App from './App';
import registerServiceWorker from './registerServiceWorker';
import * as serviceWorker from './serviceWorker';
import './index.css';

ReactDOM.render(
<App />,
document.getElementById('root') as HTMLElement
);
registerServiceWorker();

// http://bit.ly/CRA-PWA
serviceWorker.register();
1 change: 1 addition & 0 deletions junit_html_report/src/react-app-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference types="react-scripts" />
Loading

0 comments on commit 43b2f54

Please sign in to comment.