Rearrange for DefinitelyTyped

This commit is contained in:
Keith Dahlby
2017-03-07 00:55:53 -06:00
parent a3d631312b
commit b83cfcea07
17 changed files with 90 additions and 186 deletions

View File

@@ -1,3 +0,0 @@
{
"presets": ["es2015", "react"]
}

View File

@@ -1,40 +0,0 @@
*.iml
.idea
/target
/typings
output/
# Logs
logs
*.log
npm-debug.log*
# Runtime data
pids
*.pid
*.seed
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# node-waf configuration
.lock-wscript
# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release
# Dependency directory
node_modules
# Optional npm cache directory
.npm
# Optional REPL history
.node_repl_history

View File

@@ -1,5 +0,0 @@
language: node_js
node_js:
- "5.8"
- "5.7"
- "4.4"

View File

@@ -1,21 +0,0 @@
The MIT License (MIT)
Copyright (c) 2016 David Hara
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -1,14 +0,0 @@
# griddle-react-typings
[![Build Status](https://travis-ci.org/hodavidhara/griddle-react-typings.svg?branch=master)](https://travis-ci.org/hodavidhara/griddle-react-typings)
Typescript 2.1 definition for https://griddlegriddle.github.io/Griddle/
## Testing
run:
```
npm install
npm test
npm start
```
then open your browser to http://localhost:8080/webpack-dev-server/test/

View File

@@ -1,6 +1,15 @@
/*
Licensed under the MIT License (MIT)
Copyright (c) 2016 David Hara
*/
import * as React from 'react';
import { render } from 'react-dom';
import Griddle, { CustomColumnComponentProps } from 'griddle-react';
import CustomColumnComponentGrid from './test/CustomColumnComponent';
import CustomHeaderComponentGrid from './test/CustomHeaderComponent';
import CustomFilterComponentGrid from './test/CustomFilterComponent';
interface MyCustomResult {
name: string,
@@ -50,6 +59,12 @@ const TypedGriddle = Griddle as TypedGriddle;
render(
<div>
<h1>Custom Column Component Grid</h1>
<CustomColumnComponentGrid />
<h1>Custom Header Component Grid</h1>
<CustomHeaderComponentGrid />
<h1>Custom Filter Component Grid</h1>
<CustomFilterComponentGrid />
<TypedGriddle
results={results}
columnMetadata={columnMeta}
@@ -60,4 +75,4 @@ render(
/>
</div>,
document.getElementById('root')
);
);

View File

@@ -1,3 +1,33 @@
// Type definitions for griddle-react 0.7
// Project: https://github.com/griddlegriddle/griddle
// Definitions by: David Hara <https://github.com/hodavidhara>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.1
/*
The MIT License (MIT)
Copyright (c) 2016 David Hara
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
import * as React from 'react';
type ReactClass<T> = React.ComponentClass<T> | React.StatelessComponent<T>
@@ -137,4 +167,4 @@ export interface GriddleProps<T> {
declare class Griddle<T> extends React.Component<GriddleProps<T>, any> {
}
export default Griddle;
export default Griddle;

View File

@@ -1,42 +0,0 @@
{
"name": "griddle-react-typings",
"version": "0.7.1",
"description": "",
"repository": {
"type": "git",
"url": "https://github.com/hodavidhara/griddle-react-typings.git"
},
"main": "griddle-react.d.ts",
"scripts": {
"test": "tsc",
"start": "webpack-dev-server"
},
"author": "",
"license": "MIT",
"peerDependencies": {
"@types/react": "^0.14.3 || ^15.0.1",
"@types/react-dom": "^0.14.3 || ^15.0.1",
"react": "^0.14.3 || ^15.0.1",
"react-dom": "^0.14.3 || ^15.0.1"
},
"dependencies": {
"@types/lodash": "^4.12.0",
"griddle-react": "^0.7.1",
"lodash": "^4.12.0"
},
"devDependencies": {
"@types/react": "^0.14.3 || ^15.0.1",
"@types/react-dom": "^0.14.3 || ^15.0.1",
"babel-core": "^6.7.4",
"babel-loader": "^6.2.4",
"babel-preset-es2015": "^6.6.0",
"babel-preset-react": "^6.5.0",
"react": "^0.14.3 || ^15.0.1",
"react-dom": "^0.14.3 || ^15.0.1",
"ts-loader": "^0.8.1",
"typescript": "^2.1.0",
"typings": "^0.7.9",
"webpack": "^1.12.14",
"webpack-dev-server": "^1.14.1"
}
}

View File

@@ -1,3 +1,9 @@
/*
Licensed under the MIT License (MIT)
Copyright (c) 2016 David Hara
*/
import * as React from 'react';
import Griddle, { CustomColumnComponentProps } from 'griddle-react';

View File

@@ -1,3 +1,9 @@
/*
Licensed under the MIT License (MIT)
Copyright (c) 2016 David Hara
*/
import * as _ from 'lodash';
import * as React from 'react';
import Griddle, { CustomFilterComponentProps } from 'griddle-react';

View File

@@ -1,3 +1,9 @@
/*
Licensed under the MIT License (MIT)
Copyright (c) 2016 David Hara
*/
import * as React from 'react';
import Griddle, { ColumnMetaData, CustomHeaderComponentProps } from 'griddle-react';

View File

@@ -1,9 +0,0 @@
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<div id="root"></div>
<script src="/bundle.js"></script>
</body>
</html>

View File

@@ -1,17 +0,0 @@
import * as React from 'react';
import { render } from 'react-dom';
import CustomColumnComponentGrid from './CustomColumnComponent';
import CustomHeaderComponentGrid from './CustomHeaderComponent';
import CustomFilterComponentGrid from './CustomFilterComponent';
render(
<div>
<h1>Custom Column Component Grid</h1>
<CustomColumnComponentGrid />
<h1>Custom Header Component Grid</h1>
<CustomHeaderComponentGrid />
<h1>Custom Filter Component Grid</h1>
<CustomFilterComponentGrid />
</div>,
document.getElementById('root')
);

View File

@@ -1,14 +1,27 @@
{
"compilerOptions": {
"module": "es2015",
"outDir": "./target",
"module": "commonjs",
"lib": [
"es6",
"dom"
],
"jsx": "preserve",
"target": "es6"
"noImplicitAny": false,
"noImplicitThis": true,
"strictNullChecks": false,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"exclude": [
"node_modules",
"griddle-react.d.ts",
"typings/main",
"typings/main.d.ts"
"files": [
"index.d.ts",
"griddle-react-tests.tsx",
"test/CustomColumnComponent.tsx",
"test/CustomFilterComponent.tsx",
"test/CustomHeaderComponent.tsx"
]
}
}

View File

@@ -0,0 +1,3 @@
{
"extends": "../tslint.json"
}

View File

@@ -1,4 +0,0 @@
{
"name": "griddle-react",
"main": "griddle-react.d.ts"
}

View File

@@ -1,20 +0,0 @@
module.exports = {
entry: ['./test/index.tsx'],
resolve: {
extensions: ["", ".webpack.js", ".web.js", ".js", ".ts", ".tsx"]
},
output: {
path: './output/',
filename: 'bundle.js'
},
module: {
loaders: [
{
test: /.tsx?$/,
loaders: ['babel-loader', 'ts-loader'],
exclude: /node_modules/
}
]
},
devtool: "#source-map"
};