Skip to content
This repository was archived by the owner on Jan 16, 2024. It is now read-only.
Merged
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
20 changes: 19 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,29 @@
after_success:
- npm run covergae
- npm run coverage
after_deploy:
- git config --global user.email "git@asana.com"
- git config --global user.name "Asana"
- npm run doc
before_deploy:
- npm run bundle
before_script:
- npm run typings
cache:
directories:
- node_modules
- typings
deploy:
provider: npm
email: pspeter333@gmail.com
skip_cleanup: true
api_key:
secure: bgLRiofeBDHPjtWINn/J87Zz9+hNMjfhSy2bmzPNdkp3WwSYiCQD4/FbhIx717OkHvUj/KkK2CHJkzMoIa4/n9y0t8DzD+YAIYPKdvCPaXvW9pueCFydKddoIxGgYpNURu9+N2JV6pLsCzUQO4qMaFaiMJfMC+iYWmrUdaQvmog=
on:
tags: true
repo: Asana/typed-react
env:
global:
secure: d7CTjWUzh9E5JQELB9OqqC9DLaC2TfgwlTeHN2HhlmCMpva8KgV6QdLNtLNp2WRAvcuFYQITJCASRckhaUXD9HfE/PVjCLRoeIflQwNddfGedVI89xPpY7BQqQGSdRWXpvgaHGETovty75MWBT+5H0ju7oxJt+wKkz+Lj/NC2ks=
language: node_js
node_js:
- '0.12'
Expand Down
21 changes: 17 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# Typed React [![build status](http://img.shields.io/travis/Asana/typed-react.svg?style=flat-square)](https://travis-ci.org/Asana/typed-react)
# Typed React [![NPM Version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coverage][coveralls-image]][coveralls-url]

A binding layer between React and TypeScript. React currently uses a `createClass` function which takes in a component specification and then binds the value of `this`. Unfortunately TypeScript does not support that currently but there are several proposals to do that in the future. React moving to a world which supports ES6 classes will also make this unnecessary. In the meantime, this library quite simple provides a class to extend and factory function to convert the prototype for `createClass`.

This library will change dramatically with the release of React 0.13. The goal
will be to provide traditional React semantics, such as Mixins with the new
ES6 style classes.

## Installation

```sh
Expand Down Expand Up @@ -95,6 +99,7 @@ export var greeter = TypedReact.createClass(Greeter, [

## Changelog

- **3.3** Updating the React type definitions and moving the location of the type definition
- **3.2** Update with new `react.d.ts` typings
- **3.1** `extractPrototype` is now `createMixin`
- **3.0** Idiomatic Mixin Support
Expand All @@ -107,10 +112,18 @@ export var greeter = TypedReact.createClass(Greeter, [
## Development Setup

```sh
npm install -g gulp
npm install -g tsd
git clone git@github.com:Asana/typed-react.git
cd typed-react
npm install
tsd reinstall --overwrite --save
npm run typings
npm test
```

[npm-url]: https://www.npmjs.org/package/typed-react
[npm-image]: http://img.shields.io/npm/v/typed-react.svg?style=flat-square

[travis-url]: http://travis-ci.org/Asana/Asana/typed-react
[travis-image]: http://img.shields.io/travis/Asana/typed-react/master.svg?style=flat-square

[coveralls-url]: https://coveralls.io/r/Asana/typed-react
[coveralls-image]: https://img.shields.io/coveralls/Asana/typed-react/master.svg?style=flat-square
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@
"*.d.ts"
],
"scripts": {
"bundle": "gulp bundle",
"coverage": "cat ./coverage/lcov.info | coveralls",
"test": "node_modules/.bin/gulp test",
"doc": "gulp doc",
"test": "gulp test",
"typings": "tsd reinstall && tsd rebundle"
},
"repository": {
Expand Down