Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

Update aspnet-webpack-react to React 15 #256

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,4 @@ npm-debug.log
# repo have to be excluded here.
/templates/*/node_modules/
/templates/*/wwwroot/dist/
.vscode/
4 changes: 3 additions & 1 deletion samples/react/ReactGrid/ReactApp/components/PeopleGrid.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@ import { fakeData } from '../data/fakeData.js';
import { columnMeta } from '../data/columnMeta.jsx';
const resultsPerPage = 10;

const fakeDataWithAction = fakeData.map(data => Object.assign(data, {actions: ''}));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In latest version of Griddle, nothing is rendered for a cell if data does not have a property matching the column name, so had to add an empty field "actions".


export class PeopleGrid extends React.Component {
render() {
var pageIndex = this.props.params ? (this.props.params.pageIndex || 1) - 1 : 0;
return (
<div>
<h1>People</h1>
<div id="table-area">
<Griddle results={fakeData}
<Griddle results={fakeDataWithAction}
columns={columnMeta.map(x => x.columnName)}
columnMetadata={columnMeta}
resultsPerPage={resultsPerPage}
Expand Down
54 changes: 27 additions & 27 deletions samples/react/ReactGrid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,38 @@
"name": "ReactExample",
"version": "0.0.0",
"dependencies": {
"babel-core": "^6.4.5",
"bootstrap": "^3.3.5",
"domain-task": "^2.0.0",
"formsy-react": "^0.17.0",
"formsy-react-components": "^0.6.3",
"griddle-react": "^0.3.1",
"history": "^1.12.6",
"babel-core": "^6.13.2",
"bootstrap": "^3.3.7",
"domain-task": "^2.0.1",
"formsy-react": "^0.18.1",
"formsy-react-components": "^0.8.1",
"griddle-react": "^0.6.1",
"history": "^3.0.0",
"memory-fs": "^0.3.0",
"react": "^0.14.7",
"react-dom": "^0.14.7",
"react-router": "^2.0.0-rc5",
"require-from-string": "^1.1.0",
"react": "^15.3.0",
"react-dom": "^15.3.0",
"react-router": "^2.6.1",
"require-from-string": "^1.2.0",
"underscore": "^1.8.3",
"webpack-externals-plugin": "^1.0.0"
},
"devDependencies": {
"aspnet-prerendering": "^1.0.0",
"aspnet-webpack": "^1.0.3",
"aspnet-prerendering": "^1.0.4",
"aspnet-webpack": "^1.0.9",
"aspnet-webpack-react": "^1.0.1",
"babel-loader": "^6.2.1",
"babel-plugin-react-transform": "^2.0.0",
"babel-preset-es2015": "^6.3.13",
"babel-preset-react": "^6.3.13",
"css-loader": "^0.21.0",
"express": "^4.13.4",
"extract-text-webpack-plugin": "^0.8.2",
"file-loader": "^0.8.4",
"react-transform-hmr": "^1.0.1",
"style-loader": "^0.13.0",
"url-loader": "^0.5.6",
"webpack": "^1.12.2",
"webpack-dev-middleware": "^1.5.1",
"webpack-hot-middleware": "^2.6.4"
"babel-loader": "^6.2.4",
"babel-plugin-react-transform": "^2.0.2",
"babel-preset-es2015": "^6.13.2",
"babel-preset-react": "^6.11.1",
"css-loader": "^0.23.1",
"express": "^4.14.0",
"extract-text-webpack-plugin": "^1.0.1",
"file-loader": "^0.9.0",
"react-transform-hmr": "^1.0.4",
"style-loader": "^0.13.1",
"url-loader": "^0.5.7",
"webpack": "^1.13.1",
"webpack-dev-middleware": "^1.6.1",
"webpack-hot-middleware": "^2.12.2"
}
}
3 changes: 2 additions & 1 deletion src/Microsoft.AspNetCore.AngularServices/npm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "./dist/Exports",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"prepublish": "tsd install && tsc && node build.js"
"prepublish": "rimraf *.d.ts dist/*.d.ts && tsd install && tsc && node build.js"
},
"typings": "dist/Exports",
"author": "Microsoft",
Expand All @@ -17,6 +17,7 @@
"devDependencies": {
"es6-shim": "^0.35.0",
"reflect-metadata": "^0.1.2",
"rimraf": "^2.5.4",
"systemjs-builder": "^0.14.11",
"typescript": "^1.8.10",
"zone.js": "^0.6.10"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@
"main": "main.js",
"typings": "main.d.ts",
"scripts": {
"prepublish": "tsd update && tsc && echo 'Finished building NPM package \"redux-typed\"'",
"prepublish": "rimraf *.d.ts && tsd update && tsc && echo 'Finished building NPM package \"redux-typed\"'",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Microsoft",
"license": "Apache-2.0",
"devDependencies": {
"rimraf": "^2.5.4",
"typescript": "^1.8.10"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ export interface Reducer<TState> extends Function {
}

export interface ActionCreatorGeneric<TState> extends Function {
(dispatch: Dispatch, getState: () => TState): any;
(dispatch: Dispatch<TState>, getState: () => TState): any;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch! Need this for my issue with TS2.0 PR & React as well.
node_modules/redux-typed/StrongActions.d.ts (16,16): error TS2314: Generic type 'Dispatch<S>' requires 1 type argument(s).

}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Helpers for server-side rendering of JavaScript applications in ASP.NET Core projects. Works in conjunction with the Microsoft.AspNetCore.SpaServices NuGet package.",
"main": "index.js",
"scripts": {
"prepublish": "tsd update && tsc && echo 'Finished building NPM package \"aspnet-prerendering\"'",
"prepublish": "rimraf *.d.ts && tsd update && tsc && echo 'Finished building NPM package \"aspnet-prerendering\"'",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Microsoft",
Expand All @@ -14,6 +14,7 @@
"es6-promise": "^3.1.2"
},
"devDependencies": {
"rimraf": "^2.5.4",
"typescript": "^1.8.10"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Helpers for using Webpack with React in ASP.NET Core projects. Works in conjunction with the Microsoft.AspNetCore.SpaServices NuGet package.",
"main": "index.js",
"scripts": {
"prepublish": "tsd update && tsc && echo 'Finished building NPM package \"aspnet-webpack-react\"'",
"prepublish": "rimraf *.d.ts && tsd update && tsc && echo 'Finished building NPM package \"aspnet-webpack-react\"'",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Microsoft",
Expand All @@ -15,11 +15,12 @@
"babel-plugin-react-transform": "^2.0.2",
"babel-preset-es2015": "^6.6.0",
"babel-preset-react": "^6.5.0",
"react": "^0.14.7",
"react": "^15.0.0",
"react-transform-hmr": "^1.0.4",
"webpack": "^1.12.14"
},
"devDependencies": {
"rimraf": "^2.5.4",
"typescript": "^1.8.10"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"webpack-externals-plugin": "^1.0.0"
},
"devDependencies": {
"typescript": "^1.8.10",
"rimraf": "^2.5.2"
"rimraf": "^2.5.4",
"typescript": "^1.8.10"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Tracks outstanding operations for a logical thread of execution",
"main": "index.js",
"scripts": {
"prepublish": "tsd update && tsc && echo 'Finished building NPM package \"domain-task\"'",
"prepublish": "rimraf *.d.ts && tsd update && tsc && echo 'Finished building NPM package \"domain-task\"'",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Microsoft",
Expand All @@ -14,6 +14,7 @@
"isomorphic-fetch": "^2.2.1"
},
"devDependencies": {
"rimraf": "^2.5.4",
"typescript": "^1.8.10"
}
}