Compare commits

..

238 Commits

Author SHA1 Message Date
Ben Alpert
56517a5423 Blog post for 0.9 release candidate 2014-02-16 19:37:24 -08:00
Ben Alpert
ec58683389 Fix typo in latest round-up 2014-02-15 22:54:32 -08:00
Jonas Gebhardt
be569b1ee1 Add community round-up #16 2014-02-15 15:54:40 -08:00
Paul O’Shannessy
407589bd96 Center twitter embeds differently. again.
This time, just target the iframe. display: table was weird in webkit.
2014-02-05 16:23:43 -08:00
Paul O’Shannessy
084f24e3e7 Don't use <center> for twitter embeds 2014-02-05 15:52:59 -08:00
Jonas Gebhardt
acf97b26ca Community Round-Up #15; center embedded tweets 2014-02-05 15:52:59 -08:00
Paul O’Shannessy
ccf00ccf08 Revert "Update propTypes documentation."
This reverts commit b66fbde0a9.
2014-02-05 15:05:41 -08:00
Pete Hunt
7f22f43fb1 Update example-apps.md 2014-02-02 04:02:17 +01:00
petehunt
92092073ca add example apps page 2014-02-02 04:02:10 +01:00
petehunt
3c19f6253b Add a complementary tools page 2014-02-02 04:01:56 +01:00
Pete Hunt
7467b1fb39 Update videos.md 2014-02-02 04:01:48 +01:00
petehunt
c06ca2305f Add link to meteor talk 2014-02-02 04:01:37 +01:00
Ben Alpert
3810c839a7 [docs] Fix comma splice 2014-02-02 03:51:23 +01:00
Ben Alpert
571d173182 Disable CodeMirror smart indentation
Fixes #966.
2014-02-02 03:51:16 +01:00
Christopher Chedeau
22772c9862 s/Mock DOM/Virtual DOM/
Let's be consistent with the naming
2014-02-02 03:51:07 +01:00
Kunal Mehta
f9704536d1 Add documentation about React.renderComponent
Recently learned that components passed into `React.renderComponent` may not be the ones actually mounted. Also learned that it returns the mounted component. Added some documentation describing this.
2014-02-02 03:50:58 +01:00
Eric Schoffstall
64ac427395 fix grammar mistake 2014-02-02 03:50:26 +01:00
Paul O’Shannessy
dd66223d67 Fix animation example code
key should never be index into an array or there are bugs. Especially in
transitions.

Fixes #853
2014-02-02 03:49:58 +01:00
Ben Alpert
6e4ddfd239 Fix docs typo 2014-02-02 03:49:48 +01:00
petehunt
3120192172 remove references to react-page 2014-02-02 03:49:41 +01:00
Bob Eagan
3db3460868 add hash link for lifecycle section of working with the browser page 2014-02-02 03:49:14 +01:00
Bob Eagan
2edb76f558 fix incorrect link 2014-02-02 03:48:41 +01:00
Ayman Osman
09650e1dc3 Fix typo 2014-02-02 03:47:54 +01:00
Jean Lauliac
0681d1386b Normalize internal links in 'why react' article 2014-02-02 03:47:16 +01:00
Jean Lauliac
341d292665 Update broken link in 'why react' article 2014-02-02 03:47:01 +01:00
cpojer
b66fbde0a9 Update propTypes documentation. 2014-02-02 03:46:42 +01:00
Cheng Lou
8c8841c83a [docs] Tweak frontpage first example and jsx-compiler example 2014-02-02 03:45:31 +01:00
Ben Alpert
c7f0663176 Simplify live editor execution logic 2014-02-02 03:45:21 +01:00
Ben Alpert
d3fc5adf39 Properly clear live editor on JSX compile failure 2014-02-02 03:45:15 +01:00
Ben Alpert
761e1c8080 Update homepage for new JSX/JS editor 2014-02-02 03:44:58 +01:00
Paul O’Shannessy
6b1c6be974 Normalize line endings 2014-02-02 03:44:44 +01:00
Cheng Lou
7ac5f3c7cf docs add jsx->js tab to live editors 2014-02-02 03:43:43 +01:00
Cheng Lou
6b15ad5f6d docs fix back link in Examples 2014-02-02 03:43:26 +01:00
Nick Thompson
542f20b822 Clarify componentWillMount behavior 2014-02-02 03:42:40 +01:00
Christopher Chedeau
30e16e4e63 Document isMounted
Text from @petehunt
2014-02-02 03:42:15 +01:00
Paul O’Shannessy
7c4c0cdd01 [docs] Remove commented out ghbtns 2014-01-15 11:39:52 -08:00
Ben Alpert
92102ac31d Add info about dev vs. prod builds
Also moved the dev builds first because that's what most people will want.
2014-01-15 11:35:51 -08:00
Paul O’Shannessy
277cbf06e4 [docs] Add timezone to _config
This way we hopefully won't churn the feed when genereated in
a different time zone (eg France).
2014-01-15 11:12:02 -08:00
Paul O’Shannessy
b0b771763b Remove stray "117", combine lines in polyfill docs 2014-01-15 11:09:24 -08:00
Richard Feldman
8d63dad433 Rewrite Older Browsers polyfill section for clarity. 2014-01-15 10:52:39 -08:00
Timothy Yung
edd61edfb1 Fix "Uncontrolled Components" documentation 2014-01-15 10:52:38 -08:00
Richard Feldman
d99cafaf9a Fix typo in docs. 2014-01-15 10:52:38 -08:00
Richard Feldman
190f373ce3 Update docs to mention that you need both es5-shim.js and es5-sham.js to use React with IE8. 2014-01-15 10:52:38 -08:00
Ben Alpert
1873e1d0a9 Add dataType to all $.ajax calls for consistency
Fixes https://groups.google.com/forum/#!topic/reactjs/WWA3ZqU6y4w.
2014-01-15 10:52:38 -08:00
Christoph Pojer
27ac8a3224 Fix #845, Trivial year change
This was accidentally pulled into gh-pages.
2014-01-15 10:52:38 -08:00
Christoph Pojer
97f2441b7e Fix #874: Edit thinking-in-react
Accidentally pulled #874 into gh-pages.
2014-01-15 10:52:38 -08:00
Ben Alpert
ce72e84234 Document return value of unmountComponentAtNode 2014-01-15 10:52:38 -08:00
Ben Alpert
52ad24f788 Remove two more react.min.js references 2014-01-15 10:52:38 -08:00
Paul O’Shannessy
7efdb43742 Don't use the min build in getting started guide 2014-01-15 10:52:38 -08:00
Michal Srb
51e7a6bae1 Fix URL in displayName description 2014-01-15 10:52:38 -08:00
Ben Alpert
f44e8ccd40 Add charCode/keyCode/which to key event docs 2014-01-15 10:52:38 -08:00
Vjeux
60b5520fee Revert "adding warning about the lack of support for onScroll on IE8"
This reverts commit 8615ade2b6.
2014-01-06 18:35:50 +01:00
Vjeux
658aa45483 Community Round-up #14 2014-01-06 18:15:56 +01:00
Daniel Lo Nigro
ea41991825 Change “not allowed” back to “discouraged” since you technically *can* use props called class or for 2014-01-06 18:15:24 +01:00
Daniel Lo Nigro
5cbc727f68 Add link to HTML to JSX converter to “JSX In Depth” page 2014-01-06 18:15:19 +01:00
xixixao
ee90857dfb Document displayName 2014-01-06 18:15:13 +01:00
Pascal Hartig
8ef2cec2c4 Add gulp-react to Helpful OSS Projects
Add @sindresorhus' JSX task for Gulp to the "Helpful Open-Source Projects" section of the tooling integration docs.
2014-01-06 18:15:07 +01:00
Ben Alpert
3afe6dee51 Fix typo 2014-01-06 18:14:59 +01:00
Ben Alpert
13c211a6a6 Mention react-art where we talk about SVG 2014-01-06 18:14:50 +01:00
Felipe Oliveira Carvalho
e23e627091 Remove the require-jsx plugin from the tooling-integration page
In favor of the r.js friendly jsx-requirejs-plugin
2014-01-06 18:14:40 +01:00
Felipe Oliveira Carvalho
978a8f5807 Add jsx-requirejs-plugin to the tooling-integration page 2014-01-06 18:14:31 +01:00
Fabio Costa
8615ade2b6 adding warning about the lack of support for onScroll on IE8
Adding `console.warn` about the lack of support for `onScroll` event on IE8
Related to this issue on github https://github.com/facebook/react/issues/631
2014-01-06 18:14:02 +01:00
Vjeux
dbae31d36f React Chrome Developer Tools 2014-01-02 21:05:37 +01:00
Cheng Lou
8d37f7d373 docs better error display for live editor and JSX compiler 2014-01-02 21:05:27 +01:00
Cheng Lou
8dc36e396b docs tips fix small typo and code 2014-01-02 21:05:20 +01:00
Cheng Lou
c5a2ca997c docs remove link to wiki page
Also some minor writing changes.
2013-12-31 05:59:08 +01:00
Ben Alpert
32753c59d4 Upgrade codemirror and enable line wrapping
Fixes #678.
2013-12-31 05:58:46 +01:00
Vjeux
16072437c3 Making 'native DOM' nodes more explicit in documentation 2013-12-31 01:38:22 +01:00
Ben Alpert
5e441d656f IE8 style fixes
- Add html5shiv so that HTML5 elements like header, footer, etc can be styled
- Remove a couple uses of :first-child/:last-child which IE8 doesn't support
2013-12-31 01:25:10 +01:00
Cheng Lou
0b63c665eb docs tips small refactorings 2013-12-31 00:13:10 +01:00
Ben Alpert
30178d4baf Make React website work in IE8
Fixes #406.

Empty conditional comment is for http://www.phpied.com/conditional-comments-block-downloads/.
2013-12-30 23:46:55 +01:00
Wincent Colaiuta
0e95e8e76d Fix a typo in the working-with-the-browser docs 2013-12-30 23:44:07 +01:00
Cheng Lou
cdb328be92 docs tips expose component function 2013-12-30 23:43:30 +01:00
jhiswin
4b7eb66b31 live_editor.js using deprecated function
unmountAndReleaseReactRootNode -> unmountComponentAtNode
breaks html-jsx.html
2013-12-30 19:57:41 +01:00
petehunt
b55ebc0a95 Update parent/child communication tip 2013-12-30 19:45:40 +01:00
Vjeux
3a370b8db5 Community Round-up #13 2013-12-30 18:30:56 +01:00
Ben Alpert
12b94b0a8c Move initial $.ajax out of getInitialState
We want to encourage people to make pure getInitialState functions.
2013-12-30 18:30:48 +01:00
Ivan Kozik
880951f08c console.log -> console.error 2013-12-30 18:30:12 +01:00
Ivan Kozik
838589c37a Add a warning about the @jsx declaration 2013-12-30 18:30:07 +01:00
Ivan Kozik
0ae26fed60 Use explicit $.ajax dataType and add error callback 2013-12-30 18:30:00 +01:00
Cheng Lou
c68b972618 docs add warning to add jsx pragma 2013-12-30 18:29:53 +01:00
Cheng Lou
a35671a6ec docs remove video at the bottom 2013-12-24 07:45:37 +01:00
Vjeux
5a571e0777 Add a talks section to the docs 2013-12-24 01:31:56 -05:00
Fabio M. Costa
645e25d7a8 language update as suggested by @petehunt 2013-12-24 00:49:19 -05:00
Fabio M. Costa
fa42d0cc6d updating text as suggested by @petehunt 2013-12-24 00:49:11 -05:00
Fabio M. Costa
0a8c2bb272 Adding note about onScroll on IE8 2013-12-24 00:49:06 -05:00
Fabio M. Costa
8de5a925fa Note about react's version on the talk, since somethings have already changed since then 2013-12-24 00:48:57 -05:00
Vjeux
14e05c9dbb typo 2013-12-23 18:54:16 +01:00
Vjeux
219f25c812 Fix html-jsx compiler
It changed React Playground to add a required props but unfortunately didn't update the call sites of the front-page. I don't think it should be required so I'm just making it optional and providing the correct default value.

Test Plan:
 - Open the front page and make sure examples are working
 - Open /react/jsx-compiler.html and make sure it is working
 - Open /react/html-jsx.html and make sure it is working
2013-12-23 18:32:13 +01:00
Daniel Lo Nigro
c7a915993e Simple HTML to JSX converter, built during Hackathon 40 at Facebook.
See /react/html-jsx.html. Not directly linked from the site yet as there may still be some minor issues with it.
2013-12-23 18:32:04 +01:00
Vjeux
6d822d4149 Community Round-up #12 2013-12-23 18:04:55 +01:00
Vjeux
b95fee3c0b Revert "Simple HTML to JSX converter, built during Hackathon 40 at Facebook."
This reverts commit 2308f95316.
2013-12-23 07:01:12 +01:00
Daniel Lo Nigro
2308f95316 Simple HTML to JSX converter, built during Hackathon 40 at Facebook.
See /react/html-jsx.html. Not directly linked from the site yet as there may still be some minor issues with it.
2013-12-23 06:14:39 +01:00
Cheng Lou
dbc8563dfb docs make all link start with /react/docs 2013-12-23 06:14:32 +01:00
Cheng Lou
7eae8d3c4a docs add input attrs for Dom Differences 2013-12-23 06:14:00 +01:00
Kit Randel
37e544d817 Tutorial template markup needs a reference to jquery for the ajax calls
from step 13 onwards.
2013-12-23 06:12:45 +01:00
Jared Forsyth
cd2fd806dc one liner 2013-12-23 06:12:38 +01:00
Jared Forsyth
cb0cbcc305 changes as requested 2013-12-23 06:12:33 +01:00
Jared Forsyth
4f71ddfe5f adding note about initializing state w/ props 2013-12-23 06:12:27 +01:00
Nicholas Bergson-Shilcock
18410bf130 Fix typo (ot -> to) 2013-12-23 06:11:21 +01:00
Jared Forsyth
1a9b21313e fixing capitalization 2013-12-23 06:11:10 +01:00
Jared Forsyth
9686487e3a rename this tip to be less confusing
Using props to initialize state is completely fine; the issue is using state as a "cache" for values calculated based off of props. This title makes it more clear.
2013-12-23 06:11:03 +01:00
Brian Cooke
38d68fd1c5 Update highlighted lines in tutorial
Minor issue, but I found it distracting that the highlighted lines were not accurate. I *believe* this fixes them up.
2013-12-23 06:10:40 +01:00
Vjeux
0993b61fe8 Add video at the bottom of the front page 2013-12-23 06:10:23 +01:00
Vjeux
8f24fcae05 Document the Diff algorithm
We often refer to it but never did actually explain it.
2013-12-23 06:04:47 +01:00
Cheng Lou
94c100cc7a docs section for non-dom attributes
Also added documentation for `dangerouslySetInnerHTML`.
2013-12-23 06:04:42 +01:00
Paul O’Shannessy
b9579e444b 0.8 starter kit 2013-12-19 13:16:07 -08:00
Paul O’Shannessy
4630540f87 v0.8 blog post 2013-12-19 10:42:22 -08:00
Paul O’Shannessy
ece573e7fe Update materials for 0.8.0 2013-12-19 10:41:49 -08:00
Paul O’Shannessy
2e1e868080 v0.8.0 2013-12-19 10:41:03 -08:00
Paul O’Shannessy
e78b01f090 Fix npm-react build task, add to release 2013-12-19 10:31:43 -08:00
Paul O’Shannessy
c7562cf924 Update AUTHORS for 0.8 2013-12-19 09:35:17 -08:00
Paul O’Shannessy
b90ec8a8ec Add newest starter-kit downloads to docs 2013-12-18 17:01:30 -08:00
Paul O’Shannessy
b4cc540a7b Add starter-kit zip files to repo
These should be included so that anybody can build and update the docs
with as little confusion as possible.

I've left the directory in .gitignore so additions need to be
intentional as part of a release.
2013-12-18 17:01:30 -08:00
Paul O’Shannessy
76dc1f7661 Changelog, blog post for 0.5.2, 0.4.2 2013-12-18 16:46:31 -08:00
Paul O’Shannessy
e9b8edd4ba Update readme for 0.5.2 2013-12-18 16:46:31 -08:00
Paul O’Shannessy
0c05167b33 Update npm-react error to point to autoflow 2013-12-17 11:22:07 -08:00
Paul O’Shannessy
77bd2cc1f3 Update npm-react readme to point to autoflow 2013-12-17 11:22:07 -08:00
Paul O’Shannessy
102e1d1fb3 Don't call utils.traverse in transform
Accidental change we missed in review of #495.
2013-12-17 11:10:23 -08:00
Andreas Svensson
50979ffa9e utils.* is now used everywhere 2013-12-17 11:10:23 -08:00
Andreas Svensson
65818f9716 JSXTransformer now supports IE8
Conflicts:
	package.json
2013-12-17 11:10:20 -08:00
Thomas Aylott
65026b1008 fixes ReactTextComponent rootID unescapedness 2013-12-17 10:45:01 -08:00
Thomas Aylott
c24efdba9c test case for ReactTextComponent rootID escaping 2013-12-17 10:45:01 -08:00
Fabio M. Costa
dba52065c9 URL -> url 2013-12-17 10:45:01 -08:00
Josh Duck
7f156bebbf Fix SelectEventPlugin
mouseup was not fired when context menu showed, so select events stopped being fired.
2013-12-17 10:45:01 -08:00
Ben Alpert
8048f96b42 Add loop property 2013-12-17 10:45:01 -08:00
Fabio M. Costa
17b456cfee match -> test
Using RegExp method `test` because this is what is wanted
2013-12-17 10:45:01 -08:00
Fabio M. Costa
432109783a Improving never seen error message
Removing repeating "support it" and fixing camelCase method name
2013-12-17 10:45:01 -08:00
Paul O’Shannessy
93fc40c680 Clean trailing space and lint 2013-12-17 10:45:01 -08:00
Andreas Svensson
fb656ad9ab corrections 2013-12-17 10:45:01 -08:00
Andreas Svensson
36cf618ee7 Fix ReactDOMTextarea missing "rows" and "cols" attribute, incorrect "size" property 2013-12-17 10:45:01 -08:00
Andreas Svensson
68edaa3cfd Add HAS_POSITIVE_NUMERIC_VALUE to DOMProperty and normalize behavior of null values
Uniformly remove null values, rather than sometimes set/remove, could potentially assign 'null' or 'undefined'
2013-12-17 10:45:01 -08:00
Paul O’Shannessy
6235c6b346 Update shrinkwrap 2013-12-13 15:17:26 -08:00
Thomas Aylott
1bf4de4110 fixes browserify task transforms support 2013-12-13 15:08:38 -08:00
Paul O’Shannessy
57b34a120e Move npm-react-core to npm-react, fix tasks accordingly 2013-12-13 14:24:14 -08:00
Paul O’Shannessy
d0be71c8f3 Update react package readme 2013-12-13 14:24:14 -08:00
petehunt
c278a788ac Version bump, make tests work
Conflicts:
	grunt/tasks/populist.js
	package.json
	src/core/React.js
2013-12-13 14:24:11 -08:00
petehunt
1dd0ae5eb7 update README 2013-12-13 14:15:57 -08:00
petehunt
207f2ddb00 version bump to 0.8 to get on top of react.js
Conflicts:
	package.json
2013-12-13 14:15:54 -08:00
petehunt
1188ba5047 rename to with associated warnings 2013-12-13 14:14:42 -08:00
petehunt
caebca54b8 rename to with associated warnings 2013-12-13 14:14:42 -08:00
petehunt
39b7ba2842 revert muffinize :( 2013-12-13 14:14:42 -08:00
petehunt
280243f28b response to code review 2013-12-13 14:14:42 -08:00
petehunt
5361a2bc92 update npm-react-core package.json 2013-12-13 14:14:42 -08:00
Paul O’Shannessy
4262a4089e react-core npm module 2013-12-13 14:14:42 -08:00
petehunt
66b7a5ba0c muffinification 2013-12-13 14:14:42 -08:00
petehunt
0d69d37d06 first work: __DEV__
fix invariant

Get browserify working

remove dead code elimination step since it is not needed due to minifier

use industry standard NODE_ENV

Conflicts:
	grunt/config/browserify.js
	package.json
2013-12-13 14:14:40 -08:00
Ben Newman
92fd516ab8 Explicitly require the assert module in vendor/constants.js. 2013-12-13 14:12:45 -08:00
Ben Newman
0b584b9f8e Better comments for vendor/constants.js. 2013-12-13 14:12:45 -08:00
Ben Newman
1d9a0ce7ff Rewrite vendor/constants.js to use require("ast-types").traverse.
Most notably, this new style of transformation gives us access to
this.parent.node, which allows us to avoid replacing identifiers that are
not actually free variables, such as member expression properties.

Closes #496.

Conflicts:
	package.json
2013-12-13 14:11:22 -08:00
Paul O’Shannessy
a426f1f216 Update depedencies 2013-12-13 13:46:48 -08:00
Paul O’Shannessy
107fbfa809 Disable AnalyticsEventPlugin-test
It gets stuck in web worker issues for some reason. I don't particularly
care and I don't think any of the changes we merged in should be
actually breaking it.
2013-12-13 13:44:35 -08:00
Thomas Aylott
c93db82538 skip Worker test unless the browser supports them 2013-12-12 16:38:05 -08:00
Sean Kinsey
f1a4b84e4c [ReactTransitionGroup] Add onTransitionEnter and onTransitionLeave
It is valuable to know when the number of children in a TransitionGroup is going
to increase or decrease, since we might want to apply extra animations.
For instance, when used with overflow:auto, we might want to apply different css
based on it overflowing or not - to do this we need to calculate this after new
nodes has entered and after nodes has been removed.
2013-12-12 16:01:50 -08:00
John Watson
6438a87264 Separate replaceState invariant violations
It'd be nice if we knew which error we were hitting when this invariant hit.
2013-12-12 16:01:50 -08:00
Ben Alpert
8cb528f0d3 Remove unused updatePropertiesByID 2013-12-12 16:01:50 -08:00
Pete Hunt
656e1bd1b1 Fix lint warnings 2013-12-12 16:01:50 -08:00
Ben Alpert
b0a8103668 Add missing license header 2013-12-12 16:01:49 -08:00
Ben Alpert
7c702fd312 Remove unused event plugin registrationNamesKeys 2013-12-12 16:01:49 -08:00
Ben Alpert
52c7c95be6 ReactErrorUtils: In prod, just return the original
This will save a stack frame (nice when in a debugger) and presumably be a bit faster.
2013-12-12 16:01:49 -08:00
Ben Alpert
b6c7300d48 Don't use .returnValue if .defaultPrevented exists
`.defaultPrevented` exists in IE9+. I checked in IE9, Chrome, and Firefox that it does default to `false`.

Fixes #527.
2013-12-12 16:01:49 -08:00
Christoph Pojer
bc219a2d6e Ensure ReactPerf always uses a string as a URL 2013-12-12 16:01:49 -08:00
Paul O'Shannessy
ad693d9541 order object properties consistently 2013-12-12 16:01:49 -08:00
Pete Hunt
2d5142bc35 Better error message for renderComponentToString()
Reported on Twitter by AirBnb (who are integrating React into their open-source JS framework). They made a mistake and passed a string in as the
component. We should have a better error message for that.
2013-12-12 16:01:49 -08:00
Marshall Roch
6f9f371d2b Rename receiveProps to receiveComponent
This renames receiveProps and changes it to take the next component to copy props from instead of just the props. That is,

  component.receiveComponent(nextComponent, transaction)

instead of

  component.receiveProps(nextComponent.props, transaction)

This is a precursor to adding contexts, which will also need to get propagated just like props. This change allows ReactCompositeComponent to override `receiveProps` and do something like

  this._pendingContext = nextComponent.context;

Conflicts:
	src/core/ReactCompositeComponent.js
2013-12-12 16:01:43 -08:00
Simon Højberg
9e9b3f7348 Transitions: Handle undefined input to mergeKeySet
Gracefully handle undefined input to mergeKeySet.
2013-12-12 15:58:54 -08:00
Simon Højberg
012ac24728 ReactTransitions: Don't animate undefined children 2013-12-12 15:58:54 -08:00
Brian Kim
4915a63973 Fix failing tests
Two of your tests were failing because of commit
1e71df5399
I fixed them by:
1) Using jasmine's spyOn in ReactCompositeComponentError-test.js
2) Inverting the function wrapping in the above commit.
Godspeed.
2013-12-12 15:58:54 -08:00
Tim Yung
55c5178a55 Rename nodeContains to containsNode
Conflicts:
	src/core/ReactMount.js
2013-12-12 15:58:51 -08:00
Mouad Debbar
f142b9b99b Add support for oncontextmenu in React. 2013-12-12 15:57:00 -08:00
Felix Kling
4eb9487c97 Improve error logging for event handlers of React components.
This guards every auto-bound method and uses the name of the component and method as guard name.
2013-12-12 15:57:00 -08:00
Andreas Svensson
3f31ee8d3c Fix wheelDelta misspelled 2013-12-12 15:57:00 -08:00
Ben Alpert
89480e9f38 Make submit button default value appear correctly
Fixes #473.
2013-12-12 15:57:00 -08:00
SanderSpies
4361fb36f9 Removing 'isEventSupported' 2013-12-12 15:57:00 -08:00
SanderSpies
e1fce03d64 Removing unused useSelect variable. 2013-12-12 15:57:00 -08:00
Laurence Rowe
0b4f89cecb Script async and defer properties 2013-12-12 15:57:00 -08:00
Paul O’Shannessy
c09bc39a34 Oxford comma 2013-12-12 15:57:00 -08:00
Josh Duck
996cda82e1 Fix ReactDOMSelection for IE 11
IE 11 no longer supports the legacy document.selection API.
Their implementation of window.getSelection() doesn't support
the extend() method, which we were relying on.

If the selection is RTL and selection extend is missing, then just
flip the selection.
2013-12-12 15:57:00 -08:00
Matti Nelimarkka
efa3618955 Clear error message when rendering a nonvalid component 2013-12-12 15:57:00 -08:00
Tim Yung
c6d2f06697 Better getUnboundedScrollPosition for windows
Instead of using browser sniffing, `getUnboundedScrollPosition` can do
better and not have to depend on the `getDocumentScrollElement` module.
2013-12-12 15:56:59 -08:00
Paul O'Shannessy
06edb20cdf Reorder DefaultDOMPropertyConfig
`autoCorrect` belongs with the non-standard properties list.
2013-12-12 15:56:59 -08:00
Mark Richardson
f4da9418f2 Add autoCorrect to list of supported DOM properties 2013-12-12 15:56:59 -08:00
Tim Yung
7ecd72e724 Forward Compatibility w/ WebKit & Blink
Newer versions of WebKit and Blink will support both `document.body.scrollTop` and `document.documentElement.scrollTop`. Therefore, implementing cross-browser compatibility by summing the two will no longer work.

This changes React to use `getUnboundedScrollPosition` so we get the fix and consistency in one change!

See: https://rniwa.com/2013-10-29/web-compatibility-story-of-scrolltop-and-scrollleft/
2013-12-12 15:56:59 -08:00
Cheng Lou
48af9c7bda docs tips parent-child communication 2013-12-02 15:49:27 -08:00
Paul O’Shannessy
1da10d718d Fix blog pagination
I missed this in the Jekyll upgrade.
2013-12-02 15:47:21 -08:00
Paul O’Shannessy
ef8bd04b04 [docs] Fix download links to addons builds 2013-12-02 15:14:52 -08:00
Pete Hunt
030835b914 Merge pull request #440 from petehunt/new-taglines
New marketing copy
2013-12-02 15:10:24 -08:00
Ben Alpert
abf199d5ff Tweaks to README
Most significant change is updating the leading copy to match #440.
2013-12-02 15:10:12 -08:00
petehunt
1053a1453a Fix frontpage example to retain selection 2013-12-02 15:10:12 -08:00
Cheng Lou
b8194d92f6 docs add download links for react-with-addons 2013-12-02 15:10:12 -08:00
Cheng Lou
18a6b0b94b make docs jsx compiler highlight transpiled js code 2013-12-02 15:10:12 -08:00
Sundeep Malladi
0b31175238 Minor spelling correction in docs 2013-12-02 15:10:12 -08:00
Cheng Lou
6a0bb61b16 docs select value to control chosen option 2013-12-02 15:10:12 -08:00
Ben Alpert
c065b03b8a autoBind -> Autobinding
We don't use the term autoBind anywhere any more.
2013-12-02 15:10:12 -08:00
Levi McCallum
c32c788e5a Add explination of autoBind to DOM Event Listener tip 2013-12-02 15:10:12 -08:00
Paul O’Shannessy
4a0a14d319 Put nav data in "_data"
New in Jekyll 1.3 - http://jekyllrb.com/docs/datafiles/
2013-11-20 23:34:10 -08:00
Paul O’Shannessy
a55d44efaf Fix pagination 2013-11-20 23:34:10 -08:00
Paul O’Shannessy
08fcec503c Update jekyll to 1.3 2013-11-20 23:34:10 -08:00
Cheng Lou
cd6d43e4c0 docs highlight className and htmlFor transforms 2013-11-19 23:28:27 +01:00
Cheng Lou
c329eb6335 docs classSet semicolons missing 2013-11-19 23:28:27 +01:00
Paul O’Shannessy
215988f879 Merge branch 'chenglou-classSet'
closes #463
2013-11-19 23:27:40 +01:00
Ben Alpert
fb7e157cba Make doc headers clickable again
...without preventing clicks on other things.

Just use an `<a name="...">` tag that doesn't take up any space to make sure that we're not covering up something else.

For whatever reason, doing `position: relative; top: -$navHeight;` doesn't work and causes the anchor target not to be moved up. This solution works in both Chrome and Firefox.
2013-11-19 23:24:49 +01:00
Vjeux
8ead6dce76 Community round-up #11 2013-11-19 22:57:46 +01:00
Paul O’Shannessy
79b09d9597 Merge pull request #362 from mcsheffrey/feat-documentation-cookbook
React Tips documentation
2013-11-14 15:06:05 -08:00
Cheng Lou
fb1a072739 fix doc & example transition opacity from .99 to 1
The initial thought was that an opacity animation from 0.01 to 1 causes trouble on some browser. But after testing on opera 12.15, ff 23, ie 10, chrome 30, desktop/mobile safari 7 and chrome android I confirm this works.
2013-11-13 17:55:03 -08:00
Pieter Vanderwerff
c1c7a601dd Added clearfix to blog content holder 2013-11-13 17:54:31 -08:00
Fabio M. Costa
adad0d72be Fixes the name of the component on documentation
AvatarImage -> Avatar
2013-11-13 17:54:02 -08:00
Guido Bouman
e7f48a6c00 Prevents header anchors from interfering with clickable content. 2013-11-13 17:54:02 -08:00
petehunt
d3cee1ee2e Make state immutable in tutorial (eek) 2013-11-08 13:31:45 -08:00
Cheng Lou
d47d509637 move docs tooling from JSX in Depth
Also removes the code wrap around the syntax highlighting link.
2013-11-08 13:31:34 -08:00
Vjeux
411419c361 Community round-up #10 2013-11-06 12:44:42 -08:00
Ben Alpert
fc67d5544c Use smaller blog images and host directly 2013-11-06 12:44:25 -08:00
Andrey Popp
4faad1a32a "Thinking in React": fix list formatting 2013-11-05 16:16:18 -08:00
Paul O’Shannessy
01b40d84c7 Move header link styling out of documentation only
It's used in blog posts too. I also constrained it to just the anchor
class to avoid any other headers we have.
2013-11-05 15:06:58 -08:00
Paul O’Shannessy
67d0f15d1a Remove jQuery version number from tutorial docs 2013-11-05 14:42:46 -08:00
Ben Alpert
e5f03ae407 tutorial: Simplify ajax options
dataType was unnecessary; mimeType was both unnecessary and wrong in this case. Also removed an unnecessary bind and changed pollInterval to 2000 ms for consistency with https://github.com/petehunt/react-tutorial (faster is nicer if you actually try it out!).
2013-11-05 14:42:46 -08:00
Pete Hunt
25140e5a0d "Thinking in React" blog post 2013-11-05 14:41:15 -08:00
Paul O’Shannessy
b5804fa565 [docs] Clarify when getInitialState is called. 2013-11-04 17:21:56 -08:00
petehunt
1bb2651660 Update tutorial to use className 2013-11-04 17:21:28 -08:00
Ben Alpert
b21cdac9e3 Move heading anchors 50px up to avoid nav bar
Fixes #447.

We do this by moving the actual anchored element up in the page without moving the actual text. (Apple uses a similar trick in their framed docs.) Now this looks a bit sillier on smaller screens but it's better overall.
2013-11-04 17:21:16 -08:00
Paul O’Shannessy
92ce80cf4f blog post for 0.5.1 2013-10-29 12:52:00 -07:00
Paul O’Shannessy
f3db0006e8 Update everything for v0.5.1 2013-10-29 11:46:46 -07:00
Paul O’Shannessy
ef4d7a37f0 npm shrinkwrap
We should be doing this in the stable branch to ensure fuzzy
dependencies are met identically on subsequent releases.

In this case, browserify had a change in 2.34.3 which resulted in
JSXTransformer to be a different size. While it was a change for the
better, it was unexpected and not a change we were calling out in the
release.

This shrinkwraps to the same versions of packages we had when we shipped
0.5.0.
2013-10-29 11:46:46 -07:00
Laurence Rowe
64016811d3 Make 'disabled' MUST_USE_ATTRIBUTE for compatibility with CSS [disabled] selectors.
When a ReactDOMComponent is created with the property `disabled: true` subsequently setting the property to `disabled: false` the HTML attribute `disabled="true"` was being left in the DOM.
2013-10-29 10:16:04 -07:00
Andrey Popp
7b957c880c Fix unmounting components mounted into doc element
If we are to unmount a component mounted into a document element we should
unmount it from document.documentElement and not from document.firstChild which
is a doctype element in this specific case.
2013-10-29 10:16:04 -07:00
Ian Obermiller
1b835fb5cf Fix ReactTransitionEvents detectEvents 2013-10-29 10:16:04 -07:00
Cat Chen
9f0bbce797 fixed %d in invariant call 2013-10-29 10:16:04 -07:00
Josh Duck
c9d20e56d3 Don't reset mouseDown in focus handlers
Focus fires after mouse down on initial click, so we lost the
flag when the user initially began dragging on the input.
2013-10-29 10:16:04 -07:00
Ben Alpert
ce612904ef Make SelectEventPlugin not throw for range inputs
Accessing .selectionStart on a non-text input will throw (see http://www.w3.org/TR/2009/WD-html5-20090423/editing.html#textFieldSelection), so check that the input has selection capabilities before accessing the property.

Fixes #437.
2013-10-29 10:16:04 -07:00
Paul O’Shannessy
ea1ab5501d Update API docs for unmountAndReleaseReactRootNode 2013-10-26 17:45:03 -07:00
Brian Rue
2c35ed8068 ReactTransitionGroup example: fix typo and logic bug in handleRemove 2013-10-25 18:25:14 -07:00
Keito Uchiyama
c994cc24c3 docs: Delete Mutation Events (onCharacterDOMModified) 2013-10-25 18:24:37 -07:00
Paul O’Shannessy
24da1c0023 docs: remove OUTLINE 2013-10-21 15:20:46 -07:00
Cheng Lou
d82181e4b9 Add clickable anchors to docs headers
Closes #434
2013-10-21 14:38:57 -07:00
Paul O’Shannessy
ba166b9652 Fix live editor examples on home page.
Remember that one time I wrote release notes and said:

> This is a breaking change - if you were using class, you must change
> this to className or your components will be visually broken.

Good thing I didn't listen to myself!
2013-10-16 18:11:10 -07:00
Paul O’Shannessy
f756cb3d9c 0.5.0 release
Updated README, CHANGELOG, blog post
2013-10-16 11:44:37 -07:00
Paul O’Shannessy
cadf8b786c Fix grunt npm:test 2013-10-16 11:44:37 -07:00
Paul O’Shannessy
953947a617 bump version for 0.5 2013-10-15 22:32:20 -07:00
1543 changed files with 55331 additions and 205695 deletions

View File

@@ -1,25 +0,0 @@
{
"presets": ["react"],
"ignore": ["third_party"],
"plugins": [
"transform-class-properties",
"syntax-trailing-function-commas",
["transform-object-rest-spread", { "useBuiltIns": true }],
"transform-es2015-template-literals",
"transform-es2015-literals",
"transform-es2015-arrow-functions",
"transform-es2015-block-scoped-functions",
["transform-es2015-classes", { "loose": true }],
"transform-es2015-object-super",
"transform-es2015-shorthand-properties",
"transform-es2015-computed-properties",
"transform-es2015-for-of",
"check-es2015-constants",
["transform-es2015-spread", { "loose": true }],
"transform-es2015-parameters",
["transform-es2015-destructuring", { "loose": true }],
["transform-es2015-block-scoping", { "throwIfClosureRequired": true }],
"transform-es3-member-expression-literals",
"transform-es3-property-literals"
]
}

View File

@@ -2,17 +2,11 @@
root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
max_line_length = 80
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
[*.md]
max_line_length = 0
trim_trailing_whitespace = false
[COMMIT_EDITMSG]
max_line_length = 0

View File

@@ -1,20 +0,0 @@
# We can probably lint these later but not important at this point
src/renderers/art
src/__mocks__/vendor
packages/react-art/lib
# But not in docs/_js/examples/*
docs/_js/*.js
docs/js/
docs/_site/
# gems
docs/vendor/bundle/
# This should be more like examples/**/thirdparty/** but
# we should fix https://github.com/facebook/esprima/pull/85 first
fixtures/
# Ignore built files.
build/
coverage/
scripts/bench/benchmarks/**/*.js
scripts/bench/remote-repo/
vendor/*
**/node_modules

View File

@@ -1,64 +0,0 @@
'use strict';
const OFF = 0;
const ERROR = 2;
module.exports = {
extends: 'fbjs',
plugins: [
'react',
'react-internal',
],
// We're stricter than the default config, mostly. We'll override a few rules
// and then enable some React specific ones.
rules: {
'accessor-pairs': OFF,
'brace-style': [ERROR, '1tbs'],
'comma-dangle': [ERROR, 'always-multiline'],
'consistent-return': OFF,
'dot-location': [ERROR, 'property'],
'dot-notation': ERROR,
'eol-last': ERROR,
'eqeqeq': [ERROR, 'allow-null'],
'indent': OFF,
'jsx-quotes': [ERROR, 'prefer-double'],
'keyword-spacing': [ERROR, {after: true, before: true}],
'no-bitwise': OFF,
'no-inner-declarations': [ERROR, 'functions'],
'no-multi-spaces': ERROR,
'no-restricted-syntax': [ERROR, 'WithStatement'],
'no-shadow': ERROR,
'no-unused-expressions': ERROR,
'no-unused-vars': [ERROR, {args: 'none'}],
'no-useless-concat': OFF,
'quotes': [ERROR, 'single', {avoidEscape: true, allowTemplateLiterals: true }],
'space-before-blocks': ERROR,
'space-before-function-paren': OFF,
// React & JSX
// Our transforms set this automatically
'react/jsx-boolean-value': [ERROR, 'always'],
'react/jsx-no-undef': ERROR,
// We don't care to do this
'react/jsx-sort-prop-types': OFF,
'react/jsx-space-before-closing': ERROR,
'react/jsx-uses-react': ERROR,
'react/no-is-mounted': OFF,
// This isn't useful in our test code
'react/react-in-jsx-scope': ERROR,
'react/self-closing-comp': ERROR,
// We don't care to do this
'react/jsx-wrap-multilines': [ERROR, {declaration: false, assignment: false}],
// CUSTOM RULES
// the second argument of warning/invariant should be a literal string
'react-internal/warning-and-invariant-args': ERROR,
'react-internal/no-primitive-constructors': ERROR,
},
globals: {
expectDev: true,
},
};

View File

@@ -1,43 +0,0 @@
[ignore]
<PROJECT_ROOT>/fixtures/.*
<PROJECT_ROOT>/build/.*
<PROJECT_ROOT>/scripts/.*
<PROJECT_ROOT>/.*/node_modules/y18n/.*
<PROJECT_ROOT>/node_modules/chrome-devtools-frontend/.*
<PROJECT_ROOT>/node_modules/devtools-timeline-model/.*
<PROJECT_ROOT>/node_modules/create-react-class/.*
<PROJECT_ROOT>/.*/__mocks__/.*
<PROJECT_ROOT>/.*/__tests__/.*
# Ignore Docs
<PROJECT_ROOT>/docs/.*
<PROJECT_ROOT>/.*/docs/.*
[include]
[libs]
./node_modules/fbjs/flow/lib/dev.js
./flow
[options]
module.system=haste
esproposal.class_static_fields=enable
esproposal.class_instance_fields=enable
unsafe.enable_getters_and_setters=true
munge_underscores=false
suppress_type=$FlowIssue
suppress_type=$FlowFixMe
suppress_type=$FixMe
suppress_type=$FlowExpectedError
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(3[0-3]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*www[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(3[0-3]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*www[a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
[version]
^0.53.1

1
.gitattributes vendored
View File

@@ -1 +0,0 @@
* text=auto

View File

@@ -1,9 +0,0 @@
**Do you want to request a *feature* or report a *bug*?**
**What is the current behavior?**
**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://jsfiddle.net or similar (template: https://jsfiddle.net/ebsrpraL/).**
**What is the expected behavior?**
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**

View File

@@ -1,10 +0,0 @@
**Before submitting a pull request,** please make sure the following is done:
1. Fork [the repository](https://github.com/facebook/react) and create your branch from `master`.
2. If you've added code that should be tested, add tests!
3. If you've changed APIs, update the documentation.
4. Ensure the test suite passes (`npm test`).
5. Format your code with [prettier](https://github.com/prettier/prettier) (`npm run prettier`).
6. Make sure your code lints (`npm run lint`).
7. Run the [Flow](https://flowtype.org/) typechecks (`npm run flow`).
8. If you haven't already, complete the CLA.

23
.gitignore vendored
View File

@@ -7,28 +7,13 @@ static
_SpecRunner.html
__benchmarks__
build/
remote-repo/
coverage/
.module-cache
*.gem
docs/.bundle
docs/code
docs/_site
docs/.sass-cache
docs/css/react.css
docs/js/*
docs/downloads/*.zip
docs/vendor/bundle
fixtures/dom/public/react-dom.js
fixtures/dom/public/react.js
test/the-files-to-test.generated.js
*.log*
chrome-user-data
*.sublime-project
*.sublime-workspace
.idea
*.iml
.vscode
*.swp
*.swo
*react*min*.js
!src/node_modules
docs/downloads
examples/shared/*.js

20
.jshintrc Normal file
View File

@@ -0,0 +1,20 @@
{
"node": true,
"boss": true,
"curly": true,
"devel": true,
"eqnull": true,
"expr": true,
"funcscope": true,
"globalstrict": true,
"loopfunc": true,
"newcap": false,
"noempty": true,
"nonstandard": true,
"onecase": true,
"regexdash": true,
"trailing": true,
"undef": true,
"unused": "vars"
}

145
.mailmap
View File

@@ -1,164 +1,21 @@
Adam Timberlake <adam.timberlake@gmail.com>
Alex Mykyta <dancingwithcows@gmail.com>
Alex Pien <alexpien@gmail.com>
Alex Pien <alexpien@gmail.com> <pien@pien-mbp.dhcp.thefacebook.com>
Alex Pien <alexpien@gmail.com> <pien@pien-mbp.local>
Andreas Savvides <asavvides@twitter.com> <AnSavvides@users.noreply.github.com>
Andreas Savvides <asavvides@twitter.com> <andreas@nibbli.com>
Andreas Svensson <andreas@syranide.com>
Andres Suarez <zertosh@gmail.com>
Andrew Kulakov <avk@8xx8.ru>
Andrew Sokolov <asokolov@atlassian.com>
Anto Aravinth <anto.aravinth.cse@gmail.com>
Baraa Hamodi <bhamodi@uwaterloo.ca> <baraa@optimizely.com>
Ben Halpern <bendhalpern@gmail.com>
Ben Newman <bn@cs.stanford.edu> <benjamn@fb.com>
Benjamin Woodruff <github@benjam.info> <bgw@fb.com>
Bill Fisher <fisherwebdev@gmail.com>
Blaine Kasten <blainekasten@gmail.com>
Brandon Tilley <brandon@brandontilley.com>
Changsoon Bok <winmain@gmail.com>
Cheng Lou <chenglou92@gmail.com> <chenglou@fb.com>
Christian Oliff <christianoliff@yahoo.com>
Christoph Pojer <christoph.pojer@gmail.com>
Christoph Pojer <christoph.pojer@gmail.com> <cpojer@fb.com>
Connor McSheffrey <c@conr.me> <connor.mcsheffrey@gmail.com>
Conor Hastings <hastings.conorm@gmail.com> <conor@socialtables.com>
Dan Schafer <dschafer@fb.com>
Daniel Gasienica <daniel@gasienica.ch> <daniel@fiftythree.com>
Daniel Gasienica <daniel@gasienica.ch> <dgasienica@zynga.com>
Daniel Hejl <daniel.hejl@hotmail.com>
Daniel Lo Nigro <daniel@dan.cx> <danlo@fb.com>
Dave Galbraith <dave@jut.io>
Dennis Johnson <songawee@gmail.com>
Dmitry Blues <dmitri.blyus@gmail.com>
Dongsheng Liu <bellanchor@gmail.com>
Erik Harper <eharper@mixpo.com>
Evan Coonrod <evan@paloalto.com>
Fabio M. Costa <fabiomcosta@gmail.com> <fabs@fb.com>
Felix Kling <felix.kling@gmx.net> <fkling@fb.com>
François-Xavier Bois <fxbois@gmail.com>
Fyodor Ivanishchev <cbrwizard@gmail.com>
Gabe Levi <gabelevi@gmail.com> <glevi@fb.com>
Geert Pasteels <geert.pasteels@gmail.com>
George A Sisco III <george.sisco@gmail.com>
Georgii Dolzhykov <thorn.mailbox@gmail.com>
Harry Hull <harry.hull1@gmail.com>
Hendrik Swanepoel <hendrik.swanepoel@gmail.com>
Hyeock Kwon <doublus@gmail.com>
Ian Obermiller <ian@obermillers.com> <iano@fb.com>
Ilia Pavlenkov <dortonway@gmail.com>
Ilyá Belsky <gelias.gbelsky@gmail.com>
Ingvar Stepanyan <me@rreverser.com> <rreverser@ubuntu.rreverser.a4.internal.cloudapp.net>
Irae Carvalho <irae@irae.pro.br>
Ivan Vergiliev <ivan.vergiliev@gmail.com>
JJ Weber <jj.weber@gmail.com>
Jae Hun Ro <jhr24@duke.edu>
Jaime Mingo <j.mingov@3boll.com>
James Brantly <james@jbrantly.com>
Jan Hancic <jan.hancic@gmail.com> <jan.hancic@caplin.com>
Jan Kassens <jan@kassens.net> <jkassens@fb.com>
Jason Bonta <jbonta@gmail.com> <jasonbonta@fb.com>
Jason Quense <monastic.panic@gmail.com>
Jason Trill <jason@jasontrill.com>
Jeff Chan <jefftchan@gmail.com> <jeff@quizlet.com>
Jeff Morrison <jeff@anafx.com> <Jeff@anafx.com>
Jeff Morrison <jeff@anafx.com> <jeffmo@fb.com>
Jeff Morrison <jeff@anafx.com> <lbljeffmo@gmail.com>
Jeff Morrison <jeff@anafx.com> JeffMo <jeffmo@fb.com>
Jeffrey Lin <lin.jeffrey@gmail.com> <jeffreylin@fb.com>
Jim Sproch <jsproch@fb.com>
Jim Sproch <jsproch@fb.com> <jsfb@github>
Jim Sproch <jsproch@fb.com> <none@no-reply.com>
Jinwoo Oh <arkist@gmail.com>
Jinxiu Lee <lee.jinxiu@gmail.com>
Jiyeon Seo <zzzeons@gmail.com>
Jon Chester <jonchester@fb.com>
Jon Madison <jon@tfftech.com>
Jonathan Hsu <jhiswin@gmail.com>
Jonathan Persson <persson.jonathan@gmail.com> <jonathan.persson@creuna.se>
Jordan Walke <jordojw@gmail.com>
Jordan Walke <jordojw@gmail.com> <jordanjcw@fb.com>
Joseph Savona <joesavona@fb.com> <josephsavona@users.noreply.github.com>
Josh Duck <josh@fb.com> <github@joshduck.com>
Juan Serrano <germ13@users.noreply.github.com>
Jun Wu <quark@lihdd.net>
Justin Robison <jrobison151@gmail.com>
Keito Uchiyama <projects@keito.me> <keito@fb.com>
Kevin Coughlin <kevintcoughlin@gmail.com> <kevincoughlin@tumblr.com>
Krystian Karczewski <karcz.k@gmail.com>
Kunal Mehta <k.mehta@berkeley.edu> <kunalm@fb.com>
Laurence Rowe <l@lrowe.co.uk> <laurence@lrowe.co.uk>
Marcin K. <katzoo@github.mail>
Mark Anderson <undernewmanagement@users.noreply.github.com>
Mark Funk <mfunk86@gmail.com> <mark@boomtownroi.com>
Martin Andert <mandert@gmail.com>
Mathieu M-Gosselin <mathieumg@gmail.com> <mathieumg@atx33.com>
Matsunoki <himkt@klis.tsukuba.ac.jp>
Matt Brookes <matt@brookes.net>
Matt Dunn-Rankin <mdunnrankin@gmail.com> <matchu1993@gmail.com>
Matt Zabriskie <mzabriskie@gmail.com>
Matthew Johnston <matthewjohnston4@outlook.com> <matthewjohnston4@users.noreply.github.com>
Matthew Looi <looi.matthew@gmail.com>
Mattijs Kneppers <mattijs@arttech.nl>
Max Heiber <max.heiber@gmail.com>
Max Stoiber <contact@mstoiber.com>
Michal Srb <xixixao@seznam.cz> xixixao <xixixao@seznam.cz>
Michelle Todd <himichelletodd@gmail.com> <michelle@khanacademy.org>
Mihai Parparita <mihai.parparita@gmail.com> <mihai@persistent.info>
Minwe LUO <minwe@yunshipei.com>
Murray M. Moss <murray@mmoss.name> <MMoss@cainc.com>
Murray M. Moss <murray@mmoss.name> <mmoss@users.noreply.github.com>
Neri Marschik <marschik_neri@cyberagent.co.jp>
Nick Gavalas <njg57@cornell.edu>
Nick Thompson <ncthom91@gmail.com> <nickt@instagram.com>
Patrick Stapleton <github@gdi2290.com>
Paul OShannessy <paul@oshannessy.com> <poshannessy@fb.com>
Paul Shen <paul@mnml0.com> <paulshen@fb.com>
Pete Hunt <floydophone@gmail.com>
Pete Hunt <floydophone@gmail.com> <pete.hunt@fb.com>
Pete Hunt <floydophone@gmail.com> <pete@instagram.com>
Pete Hunt <floydophone@gmail.com> <phunt@instagram.com>
Petri Lievonen <plievone@cc.hut.fi>
Petri Lievonen <plievone@cc.hut.fi> <petri.lievonen@tkk.fi>
Pieter Vanderwerff <me@pieter.io> <pieter@heyday.co.nz>
Pouja Nikray <poujanik@gmail.com>
Rainer Oviir <roviir@gmail.com> <raineroviir@rainers-MacBook-Pro.local>
Ray <ray@tomo.im>
Richard Feldman <richard.t.feldman@gmail.com> <richard@noredink.com>
Richard Livesey <Livesey7@hotmail.co.uk>
Rob Arnold <robarnold@cs.cmu.edu>
Robert Binna <rbinna@gmail.com> <speedskater@users.noreply.github.com>
Robin Frischmann <robin@rofrischmann.de>
Sander Spies <sandermail@gmail.com>
Scott Feeney <scott@oceanbase.org> <smf@fb.com>
Sebastian Markbåge <sebastian@calyptus.eu> <sema@fb.com>
Sergey Rubanov <chi187@gmail.com>
Shogun Sea <shogunsea08@gmail.com> <xxin@groupon.com>
Soichiro Kawamura <mail@w-st.com>
Sophie Alpert <git@sophiebits.com> <balpert@fb.com>
Sophie Alpert <git@sophiebits.com> <ben@benalpert.com>
Sophie Alpert <git@sophiebits.com> <sophiebits@fb.com>
Sophie Alpert <git@sophiebits.com> <spicyjalapeno@gmail.com>
Sota Ohara <ohrst.18@gmail.com>
Steven Luscher <react@steveluscher.com> <github@steveluscher.com>
Steven Luscher <react@steveluscher.com> <steveluscher@fb.com>
Steven Luscher <react@steveluscher.com> <steveluscher@instagram.com>
Steven Luscher <react@steveluscher.com> <steveluscher@users.noreply.github.com>
Stoyan Stefanov <ssttoo@ymail.com>
Tengfei Guo <terryr3rd@yeah.net> <tfguo369@gmail.com>
Thomas Aylott <oblivious@subtlegradient.com> <aylott@fb.com>
Timothy Yung <yungsters@gmail.com> <yungsters@fb.com>
Tomoya Suzuki <tmysz.dev@gmail.com>
Vasiliy Loginevskiy <Yeti.or@gmail.com>
Vasiliy Loginevskiy <Yeti.or@gmail.com> <yeti-or@yandex-team.ru>
Vjeux <vjeuxx@gmail.com>
Vjeux <vjeuxx@gmail.com> <vjeux@fb.com>
Volkan Unsal <spocksplanet@gmail.com>
Wander Wang <wander.wang@ismole.com>
Xavier Morel <xmo-odoo@users.noreply.github.com>
YouBao Nong <noyobo@gmail.com> <nongyoubao@alibaba-inc.com>
Yutaka Nakajima <nakazye@gmail.com>
Zach Bruggeman <mail@bruggie.com> <zbruggeman@me.com>
iawia002 <z2d@jifangcheng.com> <850127508@qq.com>
元彦 <yuanyan@users.noreply.github.com>
张敏 <cookfront@gmail.com>

15
.travis.yml Normal file
View File

@@ -0,0 +1,15 @@
---
language: node_js
node_js:
- '0.10'
after_script:
- curl -F "react=@build/react.js" -F "react.min=@build/react.min.js" -F "transformer=@build/JSXTransformer.js"
-F "react-with-addons=@build/react-with-addons.js" -F "react-with-addons.min=@build/react-with-addons.min.js"
-F "commit=$TRAVIS_COMMIT" -F "date=`git log --format='%ct' -1`" -F "pull_request=$TRAVIS_PULL_REQUEST"
-F "token=$SECRET_TOKEN" -F "branch=$TRAVIS_BRANCH" $SERVER
env:
global:
# SERVER
- secure: qPvsJ46XzGrdIuPA70b55xQNGF8jcK7N1LN5CCQYYocXLa+fBrl+fTE77QvehOPhqwJXcj6kOxI+sY0KrVwV7gmq2XY2HZGWUSCxTN0SZlNIzqPA80Y7G/yOjA4PUt8LKgP+8tptyhTAY56qf+hgW8BoLiKOdztYF2p+3zXOLuA=
# SECRET_TOKEN
- secure: dkpPW+VnoqC/okhRdV90m36NcyBFhcwEKL3bNFExAwi0dXnFao8RoFlvnwiPlA23h2faROkMIetXlti6Aju08BgUFV+f9aL6vLyU7gUent4Nd3413zf2fwDtXIWIETg6uLnOpSykGKgCAT/hY3Q2oPLqOoY0OxfgnbqwxkxljrE=

652
AUTHORS
View File

@@ -1,696 +1,66 @@
839 <8398a7@gmail.com>
Aaron Franks <aaron.franks@gmail.com>
Aaron Gelter <aaron.gelter@harman.com>
Adam Bloomston <adam@glitterfram.es>
Adam Krebs <amk528@cs.nyu.edu>
Adam Mark <adammark75@gmail.com>
Adam Solove <asolove@gmail.com>
Adam Timberlake <adam.timberlake@gmail.com>
Adam Zapletal <adamzap@gmail.com>
Ahmad Wali Sidiqi <wali-s@users.noreply.github.com>
Alan Plum <me@pluma.io>
Alan Souza <alansouzati@gmail.com>
Alan deLevie <adelevie@gmail.com>
Alastair Hole <afhole@gmail.com>
Alex <ultrafez@users.noreply.github.com>
Alex Boatwright <drdelambre@gmail.com>
Alex Boyd <alex@opengroove.org>
Alex Dajani <xelad1@gmail.com>
Alex Lopatin <alex@alexlopatin.com>
Alex Mykyta <dancingwithcows@gmail.com>
Alex Pien <alexpien@gmail.com>
Alex Smith <iqwz@ya.ru>
Alex Zelenskiy <azelenskiy@fb.com>
Alexander Shtuchkin <ashtuchkin@gmail.com>
Alexander Solovyov <alexander@solovyov.net>
Alexander Tseung <alextsg@gmail.com>
Alexandre Gaudencio <shahor@shahor.fr>
Alexey Raspopov <avenger7x13@gmail.com>
Alexey Shamrin <shamrin@gmail.com>
Ali Ukani <ali.ukani@gmail.com>
Andre Z Sanchez <andrezacsanchez@gmail.com>
Andreas Savvides <asavvides@twitter.com>
Andreas Svensson <andreas@syranide.com>
Andres Kalle <mjomble@gmail.com>
Andres Suarez <zertosh@gmail.com>
Andrew Clark <acdlite@me.com>
Andrew Cobby <cobbweb@users.noreply.github.com>
Andrew Davey <andrew@equin.co.uk>
Andrew Henderson <andrew.m.henderson@gmail.com>
Andrew Kulakov <avk@8xx8.ru>
Andrew Rasmussen <andras@fb.com>
Andrew Sokolov <asokolov@atlassian.com>
Andrew Zich <azich@fb.com>
Andrey Popp <8mayday@gmail.com>
Anthony van der Hoorn <anthony.vanderhoorn@gmail.com>
Anto Aravinth <anto.aravinth.cse@gmail.com>
Antonio Ruberto <anto.ruberto@gmail.com>
Antti Ahti <antti.ahti@gmail.com>
Anuj Tomar <ankuto@gmail.com>
AoDev <AoDev@users.noreply.github.com>
April Arcus <april.arcus@gmail.com>
Areeb Malik <areeb.malik91@gmail.com>
Aria Buckles <aria@khanacademy.org>
Aria Stewart <aredridel@dinhe.net>
Arian Faurtosh <arian@icloud.com>
Artem Nezvigin <artem@artnez.com>
Austin Wright <aaa@bzfx.net>
Ayman Osman <aymano.osman@gmail.com>
Baraa Hamodi <bhamodi@uwaterloo.ca>
Bartosz Kaszubowski <gosimek@gmail.com>
Basarat Ali Syed <basaratali@gmail.com>
Battaile Fauber <battaile@gmail.com>
Beau Smith <beau@beausmith.com>
Ben Anderson <banderson@constantcontact.com>
Ben Brooks <ben@benbrooks.net>
Ben Foxall <benfoxall@gmail.com>
Ben Halpern <bendhalpern@gmail.com>
Ben Jaffe <jaffe.ben@gmail.com>
Ben Moss <ben@mossity.com>
Ben Alpert <spicyjalapeno@gmail.com>
Ben Newman <bn@cs.stanford.edu>
Ben Ripkens <bripkens.dev@gmail.com>
Benjamin Keen <ben.keen@gmail.com>
Benjamin Leiken <benleiken@gmail.com>
Benjamin Woodruff <github@benjam.info>
Benjy Cui <benjytrys@gmail.com>
Bill Blanchard <bill@plumbdev.com>
Bill Fisher <fisherwebdev@gmail.com>
Blaine Hatab <jbhatab@gmail.com>
Blaine Kasten <blainekasten@gmail.com>
Bob Eagan <bob@synapsestudios.com>
Bob Ralian <bob.ralian@gmail.com>
Bob Renwick <bob.renwick@gmail.com>
Bobby <puppybytes@gmail.com>
Bojan Mihelac <bmihelac@mihelac.org>
Bradley Spaulding <brad.spaulding@gmail.com>
Brandon Bloom <brandon@brandonbloom.name>
Brandon Tilley <brandon@brandontilley.com>
Brenard Cubacub <bcbcb@users.noreply.github.com>
Brian Cooke <bri@bricooke.com>
Brian Holt <btholt@gmail.com>
Brian Hsu <brianhsu@Brians-MacBook-Pro.local>
Brian Kim <briankimpossible@gmail.com>
Brian Kung <brian@callmekung.com>
Brian Reavis <brian@thirdroute.com>
Brian Rue <brian@rollbar.com>
Bruno Škvorc <bruno@skvorc.me>
Cam Song <neosoyn@gmail.com>
Cam Spiers <camspiers@gmail.com>
Cameron Chamberlain <git@camjc.com>
Cameron Matheson <cameron@instructure.com>
Carter Chung <carterchung@users.noreply.github.com>
Cassus Adam Banko <banko.adam@gmail.com>
Cat Chen <catchen@fb.com>
Cedric Sohrauer <cedric.sohrauer@infopark.de>
Cesar William Alvarenga <cesarwbr@gmail.com>
Changsoon Bok <winmain@gmail.com>
Charles Marsh <charlie@khanacademy.org>
Chase Adams <realchaseadams@gmail.com>
Cheng Lou <chenglou92@gmail.com>
Chitharanjan Das <das.chitharanjan@gmail.com>
Chris Bolin <bolin.chris@gmail.com>
Chris Grovers <chrisgrovers@users.noreply.github.com>
Chris Ha <chriskevinha@gmail.com>
Chris Rebert <github@rebertia.com>
Chris Sciolla <csciolla1@gmail.com>
Christian Alfoni <christianalfoni@gmail.com>
Christian Oliff <christianoliff@yahoo.com>
Christian Roman <chroman16@gmail.com>
Christoffer Sawicki <christoffer.sawicki@gmail.com>
Christoph Pojer <christoph.pojer@gmail.com>
Christopher Monsanto <chris@monsan.to>
Christoph Pojer <cpojer@fb.com>
Clay Allsopp <clay.allsopp@gmail.com>
Connor McSheffrey <c@conr.me>
Conor Hastings <hastings.conorm@gmail.com>
Cory House <housecor@gmail.com>
Cotton Hou <himcotton@gmail.com>
Craig Akimoto <strawbrary@users.noreply.github.com>
Cristovao Verstraeten <cristovao@apleasantview.com>
Damien Pellier <dpellier@leadformance.com>
Dan Abramov <dan.abramov@gmail.com>
Dan Fox <iamdanfox@gmail.com>
Connor McSheffrey <connor.mcsheffrey@gmail.com>
Dan Schafer <dschafer@fb.com>
Daniel Carlsson <daniel.carlsson.1987@gmail.com>
Daniel Cousens <dcousens@users.noreply.github.com>
Daniel Friesen <daniel@nadir-seen-fire.com>
Daniel Gasienica <daniel@gasienica.ch>
Daniel Hejl <daniel.hejl@hotmail.com>
Daniel Hejl <hejldaniel@gmail.com>
Daniel Lo Nigro <daniel@dan.cx>
Daniel Mané <danmane@gmail.com>
Daniel Gasienica <dgasienica@zynga.com>
Daniel Miladinov <dmiladinov@wingspan.com>
Daniel Rodgers-Pryor <djrodgerspryor@gmail.com>
Daniel Schonfeld <daniel@schonfeld.org>
Danny Ben-David <dannybd@fb.com>
Darcy <smadad@me.com>
Daryl Lau <daryl@weak.io>
Darío Javier Cravero <dario@uxtemple.com>
Dave Galbraith <dave@jut.io>
David Baker <djbaker2@gmail.com>
David Ed Mellum <david@edmellum.com>
David Goldberg <gberg1@users.noreply.github.com>
David Granado <davidjgranado@gmail.com>
David Greenspan <dgreenspan@alum.mit.edu>
David Hellsing <david@aino.se>
David Hu <davidhu91@gmail.com>
David Khourshid <davidkpiano@gmail.com>
David Mininger <dmininger@gmail.com>
David Neubauer <davidneub@gmail.com>
David Percy <davetp425@gmail.com>
Dean Shi <dnshi@users.noreply.github.com>
Denis Sokolov <denis@sokolov.cc>
Deniss Jacenko <deniss.jacenko+github@gmail.com>
Dennis Johnson <djohnson@rallydev.com>
Devon Blandin <dblandin@gmail.com>
Devon Harvey <devonharvey@gmail.com>
Dmitrii Abramov <dmitrii@rheia.us>
Dmitriy Rozhkov <dmitriy.rozhkov@xing.com>
Dmitry Blues <dmitri.blyus@gmail.com>
Dmitry Mazuro <dmitry.mazuro@icloud.com>
Domenico Matteo <matteo.domenico@gmail.com>
Don Abrams <donabrams@gmail.com>
Dongsheng Liu <bellanchor@gmail.com>
Dustan Kasten <dustan.kasten@gmail.com>
Dustin Getz <dgetz@wingspan.com>
Dylan Harrington <dylanharrington@gmail.com>
Eduardo Garcia <emumaniacx@gmail.com>
Edvin Erikson <edvin@rocketblast.com>
Elaine Fang <elainefang@Elaines-MacBook-Pro.local>
Enguerran <engcolson@gmail.com>
Eric Clemmons <eric@smarterspam.com>
Eric Eastwood <contact@ericeastwood.com>
Eric Florenzano <floguy@gmail.com>
Eric O'Connell <eric.oconnell@idealist.org>
Eric Schoffstall <contra@wearefractal.com>
Erik Harper <eharper@mixpo.com>
Espen Hovlandsdal <rexxars@gmail.com>
Evan Coonrod <evan@paloalto.com>
Evan Vosberg <evanvosberg@urban.to>
Fabio M. Costa <fabiomcosta@gmail.com>
Federico Rampazzo <frampone@gmail.com>
Felipe Oliveira Carvalho <felipekde@gmail.com>
Felix Gnass <fgnass@gmail.com>
Felix Kling <felix.kling@gmx.net>
Fernando Correia <fernando@servicero.com>
Frankie Bagnardi <f.bagnardi@gmail.com>
François-Xavier Bois <fxbois@gmail.com>
Fred Zhao <fredz@fb.com>
Freddy Rangel <frederick.rangel@gmail.com>
Fyodor Ivanishchev <cbrwizard@gmail.com>
G Scott Olson <gscottolson@gmail.com>
G. Kay Lee <balancetraveller+github@gmail.com>
Gabe Levi <gabelevi@gmail.com>
Gajus Kuizinas <g.kuizinas@anuary.com>
Gareth Nicholson <gareth.nic@gmail.com>
Garren Smith <garren.smith@gmail.com>
Gavin McQuistin <gavin@kickfiredesign.com>
Geert Pasteels <geert.pasteels@gmail.com>
Geert-Jan Brits <gbrits@gmail.com>
George A Sisco III <george.sisco@gmail.com>
Georgii Dolzhykov <thorn.mailbox@gmail.com>
Gilbert <gilbertbgarza@gmail.com>
Glen Mailer <glenjamin@gmail.com>
Grant Timmerman <granttimmerman@gmail.com>
Greg Hurrell <glh@fb.com>
Greg Perkins <gregrperkins@fb.com>
Felix Kling <fkling@fb.com>
Greg Roodt <groodt@gmail.com>
Gregory <g.marcilhacy@gmail.com>
Guangqiang Dong <gqdong@fb.com>
Guido Bouman <m@guido.vc>
Harry Hull <harry.hull1@gmail.com>
Harry Marr <harry.marr@gmail.com>
Harry Moreno <morenoh149@gmail.com>
Harshad Sabne <harshadsabne@users.noreply.github.com>
Hekar Khani <hekark@gmail.com>
Hendrik Swanepoel <hendrik.swanepoel@gmail.com>
Henrik Nyh <henrik@nyh.se>
Henry Wong <henryw4k@gmail.com>
Henry Zhu <hi@henryzoo.com>
Hideo Matsumoto <hideo-m@pekeq.com>
Hou Chia <kchia87@gmail.com>
Huang-Wei Chang <chang.huangwei.01@gmail.com>
Hugo Agbonon <hugo@agbonon.fr>
Hugo Jobling <me@thisishugo.com>
Hyeock Kwon <doublus@gmail.com>
Héliton Nordt <hnordt@hnordt.com>
Ian Obermiller <ian@obermillers.com>
Ignacio Carbajo <icarbajop@gmail.com>
Igor Scekic <igorscekic2@gmail.com>
Ilia Pavlenkov <dortonway@gmail.com>
Ilya Shuklin <ilya.shuklin@gmail.com>
Ilyá Belsky <gelias.gbelsky@gmail.com>
Ingvar Stepanyan <me@rreverser.com>
Irae Carvalho <irae@irae.pro.br>
Ian Obermiller <iano@fb.com>
Isaac Salier-Hellendag <isaac@fb.com>
Iurii Kucherov <yuyokk@gmail.com>
Ivan Kozik <ivan@ludios.org>
Ivan Krechetov <ikr@ikr.su>
Ivan Vergiliev <ivan.vergiliev@gmail.com>
J. Andrew Brassington <jabbrass@zoho.com>
J. Renée Beach <splendidnoise@gmail.com>
JD Isaacks <jd@jisaacks.com>
JJ Weber <jj.weber@gmail.com>
JW <JW00000@gmail.com>
Jack Zhang <jzhang31191@gmail.com>
Jackie Wung <jacquelinewung@gmail.com>
Jacob Gable <jacob.gable@gmail.com>
Jacob Greenleaf <jake@imgur.com>
Jae Hun Ro <jhr24@duke.edu>
Jaeho Lee <me@jaeholee.org>
Jaime Mingo <j.mingov@3boll.com>
Jake Worth <jakeworth82@gmail.com>
Jakub Malinowski <jakubmal@gmail.com>
James <james@mystrata.com>
James Brantly <james@jbrantly.com>
James Burnett <jtburnett@tribune.com>
James Friend <james@jsdf.co>
James Ide <ide@fb.com>
James Long <longster@gmail.com>
James Pearce <jpearce@fb.com>
James Seppi <james.seppi@gmail.com>
James South <james_south@hotmail.com>
James Wen <jrw2175@columbia.edu>
Jamie Wong <jamie.lf.wong@gmail.com>
Jamis Charles <jacharles@paypal.com>
Jamison Dance <jergason@gmail.com>
Jan Hancic <jan.hancic@gmail.com>
Jan Kassens <jan@kassens.net>
Jan Raasch <jan@janraasch.com>
Jared Forsyth <jared@jaredforsyth.com>
Jason <usaman2010us@gmail.com>
Jason Bonta <jbonta@gmail.com>
Jason Ly <jason.ly@gmail.com>
Jason Miller <aidenn0@geocities.com>
Jason Quense <monastic.panic@gmail.com>
Jason Trill <jason@jasontrill.com>
Jason Webster <jason@metalabdesign.com>
Jay Jaeho Lee <jay@spoqa.com>
Jean Lauliac <lauliacj@gmail.com>
Jed Watson <jed.watson@me.com>
Jeff Barczewski <jeff.barczewski@gmail.com>
Jeff Carpenter <gcarpenterv@gmail.com>
Jeff Chan <jefftchan@gmail.com>
Jeff Hicken <jhicken@gmail.com>
Jeff Kolesky <github@kolesky.com>
Jan Kassens <jkassens@fb.com>
Jeff Morrison <jeff@anafx.com>
Jeff Welch <whatthejeff@gmail.com>
Jeffrey Lin <lin.jeffrey@gmail.com>
Jeremy Fairbank <elpapapollo@gmail.com>
Jesse Skinner <jesse@thefutureoftheweb.com>
Jignesh Kakadiya <jigneshhk1992@gmail.com>
Jim OBrien <jimobrien930@gmail.com>
Jim Sproch <jsproch@fb.com>
Jimmy Jea <jimjea@gmail.com>
Jing Chen <jingc@fb.com>
Jinwoo Oh <arkist@gmail.com>
Jinxiu Lee <lee.jinxiu@gmail.com>
Jiyeon Seo <zzzeons@gmail.com>
Jody McIntyre <scjody@modernduck.com>
Joe Critchley <joecritch@gmail.com>
Joe Stein <joeaarons@gmail.com>
Joel Auterson <joel.auterson@googlemail.com>
Johannes Baiter <johannes.baiter@gmail.com>
Johannes Emerich <johannes@emerich.de>
Johannes Lumpe <johannes@johanneslumpe.de>
John Heroy <johnheroy@users.noreply.github.com>
John Ryan <tjfryan@fb.com>
John Watson <jwatson@fb.com>
John-David Dalton <john.david.dalton@gmail.com>
Jon Beebe <jon.beebe@daveramsey.com>
Jon Chester <jonchester@fb.com>
Jon Hester <jon.d.hester@gmail.com>
Jon Madison <jon@tfftech.com>
Jon Scott Clark <jonscottclark@gmail.com>
Jon Tewksbury <jontewks@gmail.com>
Jonas Enlund <jonas.enlund@gmail.com>
Jonas Gebhardt <jonas@instagram.com>
Jonathan Hsu <jhiswin@gmail.com>
Jonathan Persson <persson.jonathan@gmail.com>
Jordan Harband <ljharb@gmail.com>
Jordan Walke <jordojw@gmail.com>
Jorrit Schippers <jorrit@ncode.nl>
Joseph Nudell <joenudell@gmail.com>
Joseph Savona <joesavona@fb.com>
Josh Bassett <josh.bassett@gmail.com>
Josh Duck <josh@fb.com>
Josh Perez <josh.perez@airbnb.com>
Josh Yudaken <yud@instagram.com>
Joshua Evans <joshua.evans@quantified.co>
Joshua Go <joshuago@gmail.com>
Joshua Goldberg <jsgoldberg90@gmail.com>
Joshua Ma <me@joshma.com>
João Valente <filipevalente@gmail.com>
Juan Serrano <germ13@users.noreply.github.com>
Julen Ruiz Aizpuru <julenx@gmail.com>
Julian Viereck <julian.viereck@gmail.com>
Julien Bordellier <git@julienbordellier.com>
Julio Lopez <ljuliom@gmail.com>
Jun Wu <quark@lihdd.net>
Juraj Dudak <jdudak@fb.com>
Justas Brazauskas <brazauskasjustas@gmail.com>
Justin Jaffray <justinjaffray@khanacademy.org>
Justin Robison <jrobison151@gmail.com>
Justin Woo <moomoowoo@gmail.com>
Kale <krydrogen@gmail.com>
Kamron Batman <kamronbatman@users.noreply.github.com>
Karl Mikkelsen <karl@kingkarl.com>
Karpich Dmitry <karpich@gollard.ru>
Keito Uchiyama <projects@keito.me>
Ken Powers <ken@kenpowers.net>
Kent C. Dodds <kent@doddsfamily.us>
Kevin Cheng <09chengk@gmail.com>
Kevin Coughlin <kevintcoughlin@gmail.com>
Kevin Huang <huang.kev@gmail.com>
Kevin Lau <thekevlau@gmail.com>
Kevin Old <kevin@kevinold.com>
Kevin Robinson <krobinson@twitter.com>
Kewei Jiang <jkewei328@hotmail.com>
Kier Borromeo <seraphipod@gmail.com>
KimCoding <jeokrang@hanmail.net>
Kirk Steven Hansen <hanski07@kirk-hansens-macbook.local>
Kit Randel <kit@nocturne.net.nz>
Kohei TAKATA <kt.koheitakata@gmail.com>
Koo Youngmin <youngmin@youngminz.kr>
Krystian Karczewski <karcz.k@gmail.com>
Keito Uchiyama <keito@fb.com>
Kunal Mehta <k.mehta@berkeley.edu>
Kurt Ruppel <me@kurtruppel.com>
Kyle Kelley <rgbkrk@gmail.com>
Kyle Mathews <mathews.kyle@gmail.com>
Laurence Rowe <l@lrowe.co.uk>
Laurent Etiemble <laurent.etiemble@monobjc.net>
Lee Byron <lee@leebyron.com>
Lee Jaeyoung <jaeyoung@monodiary.net>
Lei <tendant@gmail.com>
Leland Richardson <leland.m.richardson@gmail.com>
Leon Fedotov <LeonFedotov@users.noreply.github.com>
Leon Yip <lyip1992@users.noreply.github.com>
Leonardo YongUk Kim <dalinaum@gmail.com>
Levi Buzolic <levibuzolic@gmail.com>
Levi McCallum <levi@levimccallum.com>
Lily <qvang.j@gmail.com>
Logan Allen <loganfynne@gmail.com>
Lovisa Svallingson <lovisasvallingson@gmail.com>
Ludovico Fischer <livrerie@gmail.com>
Luigy Leon <luichi.19@gmail.com>
Luke Horvat <lukehorvat@gmail.com>
MIKAMI Yoshiyuki <yoshuki@saikyoline.jp>
Maher Beg <maherbeg@gmail.com>
Manas <prometheansacrifice@gmail.com>
Marcin K. <katzoo@github.mail>
Marcin Kwiatkowski <marcin.kwiatkowski@hotmail.com>
Marcin Szczepanski <marcins@gmail.com>
Mariano Desanze <protronm@gmail.com>
Marjan <marjan.georgiev@gmail.com>
Mark Anderson <undernewmanagement@users.noreply.github.com>
Mark Funk <mfunk86@gmail.com>
Mark Hintz <markohintz@gmail.com>
Mark IJbema <markijbema@gmail.com>
Mark Murphy <murphy.mark@live.ca>
Mark Richardson <echo@fb.com>
Mark Rushakoff <mark@influxdb.com>
Mark Sun <sunmark14@gmail.com>
Marlon Landaverde <milanlandaverde@gmail.com>
Marshall Roch <mroch@fb.com>
Martin Andert <mandert@gmail.com>
Martin Hujer <mhujer@gmail.com>
Martin Jul <martin@mjul.com>
Martin Konicek <mkonicek@fb.com>
Martin Mihaylov <martomi@users.noreply.github.com>
Masaki KOBAYASHI <makky.4d6b.3f5@gmail.com>
Mathieu M-Gosselin <mathieumg@gmail.com>
Mathieu Savy <savy.mathieu@gmail.com>
Matias Singers <mail@matiassingers.com>
Matsunoki <himkt@klis.tsukuba.ac.jp>
Matt Brookes <matt@brookes.net>
Matt Dunn-Rankin <mdunnrankin@gmail.com>
Matt Harrison <mt.harrison86@gmail.com>
Matt Huggins <matt.huggins@gmail.com>
Matt Stow <matt.stow@foxsports.com.au>
Matt Zabriskie <mzabriskie@gmail.com>
Matthew Dapena-Tretter <m@tthewwithanm.com>
Matthew Herbst <mherbst@chegg.com>
Matthew Hodgson <matthew@matrix.org>
Matthew Johnston <matthewjohnston4@outlook.com>
Matthew King <mking@users.noreply.github.com>
Matthew Looi <looi.matthew@gmail.com>
Matthew Miner <matthew@matthewminer.com>
Matthias Le Brun <mlbli@me.com>
Matti Nelimarkka <matti.nelimarkka@hiit.fi>
Mattijs Kneppers <mattijs@arttech.nl>
Max F. Albrecht <1@178.is>
Max Heiber <max.heiber@gmail.com>
Max Stoiber <contact@mstoiber.com>
Maxi Ferreira <charca@gmail.com>
Maxim Abramchuk <MaximAbramchuck@gmail.com>
Merrick Christensen <merrick.christensen@gmail.com>
Mert Kahyaoğlu <mertkahyaoglu93@gmail.com>
Michael Chan <mijoch@gmail.com>
Michael McDermott <michael@mgmcdermott.com>
Michael Randers-Pehrson <michael.rp@gmail.com>
Michael Ridgway <mridgway@yahoo-inc.com>
Michael Warner <MichaelJWarner@hotmail.com>
Michael Wiencek <mwtuea@gmail.com>
Michael Ziwisky <mikezx@gmail.com>
Michal Srb <xixixao@seznam.cz>
Michelle Todd <himichelletodd@gmail.com>
Mihai Parparita <mihai.parparita@gmail.com>
Mike D Pilsbury <mike.pilsbury@gmail.com>
Mike Groseclose <mike.groseclose@gmail.com>
Mike Nordick <mnordick>
Mikolaj Dadela <mikolaj.dadela@hgv-online.de>
Miles Johnson <mileswjohnson@gmail.com>
Minwe LUO <minwe@yunshipei.com>
Miorel Palii <miorel@fb.com>
Morhaus <alexandre.kirszenberg@gmail.com>
Moshe Kolodny <kolodny.github@gmail.com>
Mouad Debbar <mdebbar@fb.com>
Murad <rogozhnikoff@users.noreply.github.com>
Murray M. Moss <murray@mmoss.name>
Nadeesha Cabral <nadeesha.cabral@gmail.com>
Naman Goel <naman34@gmail.com>
Nate Hunzaker <nate.hunzaker@gmail.com>
Nate Lee <nathaniel.jy.lee88@gmail.com>
Nathan Smith <NogsMPLS@users.noreply.github.com>
Nathan White <nw@nwhite.net>
Nee <944316342@qq.com>
Neri Marschik <marschik_neri@cyberagent.co.jp>
Nguyen Truong Duy <truongduy134@yahoo.com>
Nicholas Bergson-Shilcock <me@nicholasbs.net>
Nicholas Clawson <nickclaw@users.noreply.github.com>
Nick Balestra <nickbalestra@users.noreply.github.com>
Nick Fitzgerald <fitzgen@gmail.com>
Nick Gavalas <njg57@cornell.edu>
Nick Merwin <nick@lemurheavy.com>
Nick Presta <nick@nickpresta.ca>
Nick Raienko <enaqxx@gmail.com>
Nick Thompson <ncthom91@gmail.com>
Nick Williams <WickyNilliams@users.noreply.github.com>
Niklas Boström <nbostrom@gmail.com>
Ning Xia <ning-github@users.noreply.github.com>
Niole Nelson <niolenelson@gmail.com>
Oiva Eskola <oiva.eskola@gmail.com>
Oleg <o.yanchinskiy@gmail.com>
Oleksii Markhovskyi <olexiy.markhovsky@gmail.com>
Oliver Zeigermann <oliver.zeigermann@gmail.com>
Olivier Tassinari <Olivier.tassinari@gmail.com>
Owen Coutts <owenc@fb.com>
Pablo Lacerda de Miranda <pablolm@yahoo-inc.com>
Paolo Moretti <moretti@users.noreply.github.com>
Pascal Hartig <passy@twitter.com>
Patrick <info@telepark.de>
Patrick Laughlin <patrick@laughl.info>
Patrick Stapleton <github@gdi2290.com>
Paul Benigeri <me@benigeri.com>
Paul Harper <benekastah@gmail.com>
Paul OShannessy <paul@oshannessy.com>
Paul Seiffert <paul.seiffert@gmail.com>
Paul Shen <paul@mnml0.com>
Pedro Nauck <pedronauck@gmail.com>
Pete Hunt <floydophone@gmail.com>
Peter Blazejewicz <peter.blazejewicz@gmail.com>
Peter Cottle <pcottle@fb.com>
Peter Jaros <peter.a.jaros@gmail.com>
Peter Newnham <peter.newnham@appsbroker.com>
Petri Lehtinen <petri@digip.org>
Petri Lievonen <plievone@cc.hut.fi>
Pieter Vanderwerff <me@pieter.io>
Pouja Nikray <poujanik@gmail.com>
Prathamesh Sonpatki <csonpatki@gmail.com>
Prayag Verma <prayag.verma@gmail.com>
Preston Parry <ClimbsRocks@users.noreply.github.com>
Rafael <rafael.garcia@clever.com>
Rafal Dittwald <rafal.dittwald@gmail.com>
Rainer Oviir <roviir@gmail.com>
Rajat Sehgal <rajatsehgal1988@gmail.com>
Rajiv Tirumalareddy <rajivtreddy@gmail.com>
Ram Kaniyur <quadrupleslap@users.noreply.github.com>
Randall Randall <randall@randallsquared.com>
Ray <ray@tomo.im>
Raymond Ha <raymond@shraymonks.com>
Reed Loden <reed@reedloden.com>
Remko Tronçon <git@el-tramo.be>
Richard D. Worth <rdworth@gmail.com>
Richard Feldman <richard.t.feldman@gmail.com>
Richard Kho <hello@richardkho.com>
Richard Littauer <richard.littauer@gmail.com>
Richard Livesey <Livesey7@hotmail.co.uk>
Richard Wood <rwoodnz@gmail.com>
Rick Beerendonk <rick@beerendonk.com>
Rick Ford <rickfordrick@gmail.com>
Riley Tomasek <riley.tomasek@gmail.com>
Rob Arnold <robarnold@cs.cmu.edu>
Robert Binna <rbinna@gmail.com>
Robert Knight <robert.knight@mendeley.com>
Robert Sedovsek <robert.sedovsek@gmail.com>
Robin Berjon <robin@berjon.com>
Robin Frischmann <robin@rofrischmann.de>
Roman Pominov <rpominov+github@gmail.com>
Roman Vanesyan <roman.vanesyan@gmail.com>
Russ <russwirtz@gmail.com>
Ryan Seddon <seddon.ryan@gmail.com>
Sahat Yalkabov <sakhat@gmail.com>
Saif Hakim <saif@benchling.com>
Saiichi Hashimoto <saiichihashimoto@gmail.com>
Sam Beveridge <sbeveridge@saltstack.com>
Sam Saccone <samccone@gmail.com>
Sam Selikoff <sam.selikoff@gmail.com>
Samy Al Zahrani <samy@sadeem.net>
Pieter Vanderwerff <pieter@heyday.co.nz>
Sander Spies <sandermail@gmail.com>
Scott Burch <scott@bulldoginfo.com>
Scott Feeney <scott@oceanbase.org>
Sean Kinsey <oyvind@fb.com>
Sebastian Markbåge <sebastian@calyptus.eu>
Sebastian McKenzie <sebmck@gmail.com>
Seoh Char <devthewild@gmail.com>
Sercan Eraslan <sercan.eraslan@sahibinden.com>
Serg <undrdog@yandex.ru>
Sergey Generalov <sergey@genbit.ru>
Sergey Rubanov <chi187@gmail.com>
Seyi Adebajo <hello@seyinanigans.com>
Shane O'Sullivan <shaneosullivan1@gmail.com>
Shaun Trennery <shaun.trennery@gmail.com>
ShihChi Huang <hhuang@netflix.com>
Shim Won <marocchino@gmail.com>
Shinnosuke Watanabe <snnskwtnb@gmail.com>
Shogun Sea <shogunsea08@gmail.com>
Shota Kubota <kubosho@users.noreply.github.com>
Shripad K <assortmentofsorts@gmail.com>
Sibi <psibi2000@gmail.com>
Simen Bekkhus <sbekkhus91@gmail.com>
Simon Højberg <r.hackr@gmail.com>
Simon Welsh <simon@simon.geek.nz>
Simone Vittori <hello@simonewebdesign.it>
Soichiro Kawamura <mail@w-st.com>
Sophia Westwood <sophia@quip.com>
Sophie Alpert <git@sophiebits.com>
Sota Ohara <ohrst.18@gmail.com>
Spencer Handley <spencerhandley@gmail.com>
Stefan Dombrowski <sdo451@gmail.com>
Stephen Murphy <smurphy3@apple.com>
Sterling Cobb <sterlingcobb@gmail.com>
Steve Baker <_steve_@outlook.com>
Steven Luscher <react@steveluscher.com>
Steven Vachon <contact@svachon.com>
Stoyan Stefanov <ssttoo@ymail.com>
Sundeep Malladi <sundeep.malladi@gmail.com>
Sunny Juneja <me@sunnyjuneja.com>
Sven Helmberger <fforw@gmx.de>
Sverre Johansen <sverre.johansen@gmail.com>
Sébastien Lorber <lorber.sebastien@gmail.com>
Sławomir Laskowski <laskowski.box@gmail.com>
Taeho Kim <dittos@gmail.com>
Tay Yang Shun <tay.yang.shun@gmail.com>
Ted Kim <ted@vcnc.co.kr>
Tengfei Guo <terryr3rd@yeah.net>
Teodor Szente <teodor98sz@gmail.com>
Thomas Aylott <oblivious@subtlegradient.com>
Thomas Boyt <thomas.boyt@venmo.com>
Thomas Broadley <buriedunderbooks@hotmail.com>
Thomas Reggi <socialtr@gmail.com>
Thomas Röggla <t.roggla@cwi.nl>
Thomas Shaddox <thomas@heyzap.com>
Thomas Shafer <thomasjshafer@gmail.com>
ThomasCrvsr <crevoisier.thomas@gmail.com>
Tienchai Wirojsaksaree <tienchai@fb.com>
Tim Routowicz <troutowicz@gmail.com>
Tim Schaub <tschaub@users.noreply.github.com>
Thomas Aylott <aylott@fb.com>
Timothy Yung <yungsters@gmail.com>
Timur Carpeev <timuric@users.noreply.github.com>
Tobias Reiss <tag+github@basecode.de>
Tom Duncalf <tom@tomduncalf.com>
Tom Haggie <thaggie@gmail.com>
Tom Hauburger <thauburger@gmail.com>
Tom MacWright <tom@macwright.org>
Tom Occhino <tomocchino@gmail.com>
Tomasz Kołodziejski <tkolodziejski@gmail.com>
Tomoya Suzuki <tmysz.dev@gmail.com>
Tony Spiro <tspiro@tonyspiro.com>
Toru Kobayashi <koba0004@gmail.com>
Trinh Hoang Nhu <trinhhoangnhu@gmail.com>
Tsung Hung <thung@me.com>
Tyler Brock <tyler.brock@gmail.com>
Ustin Zarubin <ustin.zarubin@campusbellhops.com>
Vadim Chernysh <chernysh.vadim@gmail.com>
Varun Rau <varunrau@gmail.com>
Vasiliy Loginevskiy <Yeti.or@gmail.com>
Victor Alvarez <v.alvarez312@gmail.com>
Victor Homyakov <vkhomyackov@gmail.com>
Victor Koenders <victor.koenders@gmail.com>
Ville Immonen <ville.immonen@iki.fi>
Vincent Riemer <vincentriemer@gmail.com>
Vincent Siao <vincent@asana.com>
Vipul A M <vipulnsward@gmail.com>
Vitaly Kramskikh <vkramskikh@gmail.com>
Vitor Balocco <vitorbal@gmail.com>
Vjeux <vjeuxx@gmail.com>
Volkan Unsal <spocksplanet@gmail.com>
Wander Wang <wander.wang@ismole.com>
Wayne Larsen <wayne@larsen.st>
WickyNilliams <WickyNilliams@MBA>
Wincent Colaiuta <win@wincent.com>
Wout Mertens <Wout.Mertens@gmail.com>
Xavier Morel <xmo-odoo@users.noreply.github.com>
XuefengWu <benewu@gmail.com>
Yakov Dalinchuk <murashki@users.noreply.github.com>
Yasar icli <hello@yasaricli.com>
YouBao Nong <noyobo@gmail.com>
Yuichi Hagio <yhagio87@gmail.com>
Yuriy Dybskiy <yuriy@dybskiy.com>
Yutaka Nakajima <nakazye@gmail.com>
Yuval Dekel <thedekel@fb.com>
Zach Bruggeman <mail@bruggie.com>
Zach Ramaekers <zramaekers@gmail.com>
Zacharias <zachasme@users.noreply.github.com>
Zeke Sikelianos <zeke@sikelianos.com>
Zhangjd <zhang.jd@qq.com>
adraeth <jerzy.mirecki@gmail.com>
arush <arush@ilovebrands.net>
brafdlog <brafdlog@gmail.com>
chen <kikyous@163.com>
clariroid <clarinette.uranus@gmail.com>
claudiopro <claudio.procida@gmail.com>
cutbko <kutsenko.eugene@hotmail.com>
davidxi <davidgraycn@gmail.com>
dongmeng.ldm <dongmeng.ldm@alibaba-inc.com>
iamchenxin <iamchenxin@gmail.com>
iamdoron <doronpagot@gmail.com>
iawia002 <z2d@jifangcheng.com>
imagentleman <imagentlemail@gmail.com>
koh-taka <koh-taka@users.noreply.github.com>
kohashi85 <hako584@gmail.com>
laiso <laiso@lai.so>
leeyoungalias <leeyoungalias@qq.com>
li.li <li.li@ele.me>
maxprafferty <maxprafferty@gmail.com>
rgarifullin <ringarifullin@gmail.com>
songawee <dennis@songawee.com>
sugarshin <shinsugar@gmail.com>
wali-s <ahmad3y2k@hotmail.com>
yiminghe <yiminghe@gmail.com>
youmoo <youmoolee@gmail.com>
zhangjg <jinguozhang@qq.com>
zwhitchcox <zwhitchcox@gmail.com>
Árni Hermann Reynisson <arnihr@gmail.com>
元彦 <yuanyan@users.noreply.github.com>
凌恒 <jiakun.dujk@alibaba-inc.com>
张敏 <cookfront@gmail.com>
Zach Bruggeman <zbruggeman@me.com>

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,63 @@
# Contributing to React
Want to contribute to React? There are a few things you need to know.
React is one of Facebook's first open source projects that is both under very active development and is also being used to ship code to everybody on facebook.com. We're still working out the kinks to make contributing to this project as easy and transparent as possible, but we're not quite there yet. Hopefully this document makes the process for contributing clear and preempts some questions you may have.
We wrote a **[contribution guide](https://facebook.github.io/react/contributing/how-to-contribute.html)** to help you get started.
## Our Development Process
Some of the core team will be working directly on GitHub. These changes will be public from the beginning. Other changesets will come via a bridge with Facebook's internal source control. This is a necessity as it allows engineers at Facebook outside of the core team to move fast and contribute from an environment they are comfortable in.
### `master` is unsafe
We will do our best to keep `master` in good shape, with tests passing at all times. But in order to move fast, we will make API changes that your application might not be compatible with. We will do our best to communicate these changes and always version appropriately so you can lock into a specific version if need be.
### Pull Requests
The core team will be monitoring for pull requests. When we get one, we'll run some Facebook-specific integration tests on it first. From here, we'll need to get another person to sign off on the changes and then merge the pull request. For API changes we may need to fix internal uses, which could cause some delay. We'll do our best to provide updates and feedback throughout the process.
*Before* submitting a pull request, please make sure the following is done…
1. Fork the repo and create your branch from `master`.
2. If you've added code that should be tested, add tests!
3. If you've changed APIs, update the documentation.
4. Ensure the test suite passes (`grunt test`).
5. Make sure your code lints (`grunt lint`) - we've done our best to make sure these rules match our internal linting guidelines.
6. If you haven't already, complete the CLA.
### Contributor License Agreement ("CLA")
In order to accept your pull request, we need you to submit a CLA. You only need to do this once, so if you've done this for another Facebook open source project, you're good to go. If you are submitting a pull request for the first time, just let us know that you have completed the CLA and we can cross-check with your GitHub username.
Complete your CLA here: <https://developers.facebook.com/opensource/cla>
## Bugs
### Where to Find Known Issues
We will be using GitHub Issues for our public bugs. We will keep a close eye on this and try to make it clear when we have an internal fix in progress. Before filing a new task, try to make sure your problem doesn't already exist.
### Reporting New Issues
The best way to get your bug fixed is to provide a reduced test case. jsFiddle, jsBin, and other sites provide a way to give live examples. Those are especially helpful though may not work for `JSX`-based code.
### Security Bugs
Facebook has a [bounty program](https://www.facebook.com/whitehat/) for the safe disclosure of security bugs. With that in mind, please do not file public issues and go through the process outlined on that page.
## How to Get in Touch
* IRC - [#reactjs on freenode](http://webchat.freenode.net/?channels=reactjs)
* Mailing list - [reactjs on Google Groups](http://groups.google.com/group/reactjs)
## Coding Style
* Use semicolons;
* Commas last,
* 2 spaces for indentation (no tabs)
* Prefer `'` over `"`
* `"use strict";`
* 80 character line length
* "Attractive"
## License
By contributing to React, you agree that your contributions will be licensed under the [Apache License Version 2.0 (APLv2)](LICENSE).

149
Gruntfile.js Normal file
View File

@@ -0,0 +1,149 @@
'use strict';
var exec = require('child_process').exec;
var jsxTask = require('./grunt/tasks/jsx');
var browserifyTask = require('./grunt/tasks/browserify');
var wrapupTask = require('./grunt/tasks/wrapup');
var populistTask = require('./grunt/tasks/populist');
var phantomTask = require('./grunt/tasks/phantom');
var npmTask = require('./grunt/tasks/npm');
var releaseTasks = require('./grunt/tasks/release');
var npmReactTasks = require('./grunt/tasks/npm-react');
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
copy: require('./grunt/config/copy'),
jsx: require('./grunt/config/jsx/jsx'),
browserify: require('./grunt/config/browserify'),
wrapup: require('./grunt/config/wrapup'),
populist: require('./grunt/config/populist'),
phantom: require('./grunt/config/phantom'),
npm: require('./grunt/config/npm'),
clean: ['./build', './*.gem', './docs/_site', './examples/shared/*.js'],
jshint: require('./grunt/config/jshint'),
compare_size: require('./grunt/config/compare_size')
});
grunt.config.set('compress', require('./grunt/config/compress'));
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-compare-size');
grunt.loadNpmTasks('grunt-contrib-compress');
// Alias 'jshint' to 'lint' to better match the workflow we know
grunt.registerTask('lint', ['jshint']);
// Register jsx:debug and :release tasks.
grunt.registerMultiTask('jsx', jsxTask);
// Our own browserify-based tasks to build a single JS file build
grunt.registerMultiTask('browserify', browserifyTask);
// Similar to Browserify, use WrapUp to generate single JS file that
// defines global variables instead of using require.
grunt.registerMultiTask('wrapup', wrapupTask);
grunt.registerMultiTask('populist', populistTask);
grunt.registerMultiTask('phantom', phantomTask);
grunt.registerMultiTask('npm', npmTask);
grunt.registerTask('npm-react:release', npmReactTasks.buildRelease);
// Check that the version we're exporting is the same one we expect in the
// package. This is not an ideal way to do this, but makes sure that we keep
// them in sync.
var reactVersionExp = /\bReact\.version\s*=\s*['"]([^'"]+)['"];/;
grunt.registerTask('version-check', function() {
var reactVersion = reactVersionExp.exec(
grunt.file.read('./build/modules/React.js')
)[1];
var npmReactVersion = grunt.file.readJSON('./npm-react/package.json').version;
var reactToolsVersion = grunt.config.data.pkg.version;
if (reactVersion !== reactToolsVersion) {
grunt.log.error(
'React version does not match react-tools version. Expected %s, saw %s',
reactToolsVersion,
reactVersion
);
return false;
}
if (npmReactVersion !== reactToolsVersion) {
grunt.log.error(
'npm-react version does not match react-tools veersion. Expected %s, saw %s',
reactToolsVersion,
npmReactVersion
);
return false;
}
});
grunt.registerTask('build:basic', ['jsx:debug', 'version-check', 'browserify:basic']);
grunt.registerTask('build:addons', ['jsx:debug', 'browserify:addons']);
grunt.registerTask('build:transformer', ['jsx:debug', 'browserify:transformer']);
grunt.registerTask('build:min', ['jsx:release', 'version-check', 'browserify:min']);
grunt.registerTask('build:addons-min', ['jsx:debug', 'browserify:addonsMin']);
grunt.registerTask('build:test', [
'jsx:jasmine',
'jsx:test',
'version-check',
'populist:jasmine',
'populist:test'
]);
grunt.registerTask('build:npm-react', ['version-check', 'jsx:release', 'npm-react:release']);
grunt.registerTask('test', ['build:test', 'build:basic', 'phantom:run']);
grunt.registerTask('npm:test', ['build', 'npm:pack']);
// Optimized build task that does all of our builds. The subtasks will be run
// in order so we can take advantage of that and only run jsx:debug once.
grunt.registerTask('build', [
'jsx:debug',
'version-check',
'browserify:basic',
'browserify:transformer',
'browserify:addons',
'jsx:release',
'browserify:min',
'browserify:addonsMin',
'npm-react:release',
'copy:react_docs',
'compare_size'
]);
// Automate the release!
grunt.registerTask('release:setup', releaseTasks.setup);
grunt.registerTask('release:bower', releaseTasks.bower);
grunt.registerTask('release:docs', releaseTasks.docs);
grunt.registerTask('release:msg', releaseTasks.msg);
grunt.registerTask('release:starter', releaseTasks.starter);
grunt.registerTask('release', [
'release:setup',
'clean',
'build',
'gem:only',
'release:bower',
'release:starter',
'compress',
'release:docs',
'release:msg'
]);
// `gem` task to build the react-source gem
grunt.registerTask('gem', ['build', 'gem:only']);
grunt.registerTask('gem:only', function() {
var done = this.async();
exec('gem build react-source.gemspec', done);
});
// The default task - build - to keep setup easy
grunt.registerTask('default', ['build']);
};

214
LICENSE
View File

@@ -1,21 +1,201 @@
MIT License
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Copyright (c) 2013-present, Facebook, Inc.
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
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:
1. Definitions.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
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.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@@ -1,393 +0,0 @@
Attribution 4.0 International
=======================================================================
Creative Commons Corporation ("Creative Commons") is not a law firm and
does not provide legal services or legal advice. Distribution of
Creative Commons public licenses does not create a lawyer-client or
other relationship. Creative Commons makes its licenses and related
information available on an "as-is" basis. Creative Commons gives no
warranties regarding its licenses, any material licensed under their
terms and conditions, or any related information. Creative Commons
disclaims all liability for damages resulting from their use to the
fullest extent possible.
Using Creative Commons Public Licenses
Creative Commons public licenses provide a standard set of terms and
conditions that creators and other rights holders may use to share
original works of authorship and other material subject to copyright
and certain other rights specified in the public license below. The
following considerations are for informational purposes only, are not
exhaustive, and do not form part of our licenses.
Considerations for licensors: Our public licenses are
intended for use by those authorized to give the public
permission to use material in ways otherwise restricted by
copyright and certain other rights. Our licenses are
irrevocable. Licensors should read and understand the terms
and conditions of the license they choose before applying it.
Licensors should also secure all rights necessary before
applying our licenses so that the public can reuse the
material as expected. Licensors should clearly mark any
material not subject to the license. This includes other CC-
licensed material, or material used under an exception or
limitation to copyright. More considerations for licensors:
wiki.creativecommons.org/Considerations_for_licensors
Considerations for the public: By using one of our public
licenses, a licensor grants the public permission to use the
licensed material under specified terms and conditions. If
the licensor's permission is not necessary for any reason--for
example, because of any applicable exception or limitation to
copyright--then that use is not regulated by the license. Our
licenses grant only permissions under copyright and certain
other rights that a licensor has authority to grant. Use of
the licensed material may still be restricted for other
reasons, including because others have copyright or other
rights in the material. A licensor may make special requests,
such as asking that all changes be marked or described.
Although not required by our licenses, you are encouraged to
respect those requests where reasonable. More_considerations
for the public:
wiki.creativecommons.org/Considerations_for_licensees
=======================================================================
Creative Commons Attribution 4.0 International Public License
By exercising the Licensed Rights (defined below), You accept and agree
to be bound by the terms and conditions of this Creative Commons
Attribution 4.0 International Public License ("Public License"). To the
extent this Public License may be interpreted as a contract, You are
granted the Licensed Rights in consideration of Your acceptance of
these terms and conditions, and the Licensor grants You such rights in
consideration of benefits the Licensor receives from making the
Licensed Material available under these terms and conditions.
Section 1 -- Definitions.
a. Adapted Material means material subject to Copyright and Similar
Rights that is derived from or based upon the Licensed Material
and in which the Licensed Material is translated, altered,
arranged, transformed, or otherwise modified in a manner requiring
permission under the Copyright and Similar Rights held by the
Licensor. For purposes of this Public License, where the Licensed
Material is a musical work, performance, or sound recording,
Adapted Material is always produced where the Licensed Material is
synched in timed relation with a moving image.
b. Adapter's License means the license You apply to Your Copyright
and Similar Rights in Your contributions to Adapted Material in
accordance with the terms and conditions of this Public License.
c. Copyright and Similar Rights means copyright and/or similar rights
closely related to copyright including, without limitation,
performance, broadcast, sound recording, and Sui Generis Database
Rights, without regard to how the rights are labeled or
categorized. For purposes of this Public License, the rights
specified in Section 2(b)(1)-(2) are not Copyright and Similar
Rights.
d. Effective Technological Measures means those measures that, in the
absence of proper authority, may not be circumvented under laws
fulfilling obligations under Article 11 of the WIPO Copyright
Treaty adopted on December 20, 1996, and/or similar international
agreements.
e. Exceptions and Limitations means fair use, fair dealing, and/or
any other exception or limitation to Copyright and Similar Rights
that applies to Your use of the Licensed Material.
f. Licensed Material means the artistic or literary work, database,
or other material to which the Licensor applied this Public
License.
g. Licensed Rights means the rights granted to You subject to the
terms and conditions of this Public License, which are limited to
all Copyright and Similar Rights that apply to Your use of the
Licensed Material and that the Licensor has authority to license.
h. Licensor means the individual(s) or entity(ies) granting rights
under this Public License.
i. Share means to provide material to the public by any means or
process that requires permission under the Licensed Rights, such
as reproduction, public display, public performance, distribution,
dissemination, communication, or importation, and to make material
available to the public including in ways that members of the
public may access the material from a place and at a time
individually chosen by them.
j. Sui Generis Database Rights means rights other than copyright
resulting from Directive 96/9/EC of the European Parliament and of
the Council of 11 March 1996 on the legal protection of databases,
as amended and/or succeeded, as well as other essentially
equivalent rights anywhere in the world.
k. You means the individual or entity exercising the Licensed Rights
under this Public License. Your has a corresponding meaning.
Section 2 -- Scope.
a. License grant.
1. Subject to the terms and conditions of this Public License,
the Licensor hereby grants You a worldwide, royalty-free,
non-sublicensable, non-exclusive, irrevocable license to
exercise the Licensed Rights in the Licensed Material to:
a. reproduce and Share the Licensed Material, in whole or
in part; and
b. produce, reproduce, and Share Adapted Material.
2. Exceptions and Limitations. For the avoidance of doubt, where
Exceptions and Limitations apply to Your use, this Public
License does not apply, and You do not need to comply with
its terms and conditions.
3. Term. The term of this Public License is specified in Section
6(a).
4. Media and formats; technical modifications allowed. The
Licensor authorizes You to exercise the Licensed Rights in
all media and formats whether now known or hereafter created,
and to make technical modifications necessary to do so. The
Licensor waives and/or agrees not to assert any right or
authority to forbid You from making technical modifications
necessary to exercise the Licensed Rights, including
technical modifications necessary to circumvent Effective
Technological Measures. For purposes of this Public License,
simply making modifications authorized by this Section 2(a)
(4) never produces Adapted Material.
5. Downstream recipients.
a. Offer from the Licensor -- Licensed Material. Every
recipient of the Licensed Material automatically
receives an offer from the Licensor to exercise the
Licensed Rights under the terms and conditions of this
Public License.
b. No downstream restrictions. You may not offer or impose
any additional or different terms or conditions on, or
apply any Effective Technological Measures to, the
Licensed Material if doing so restricts exercise of the
Licensed Rights by any recipient of the Licensed
Material.
6. No endorsement. Nothing in this Public License constitutes or
may be construed as permission to assert or imply that You
are, or that Your use of the Licensed Material is, connected
with, or sponsored, endorsed, or granted official status by,
the Licensor or others designated to receive attribution as
provided in Section 3(a)(1)(A)(i).
b. Other rights.
1. Moral rights, such as the right of integrity, are not
licensed under this Public License, nor are publicity,
privacy, and/or other similar personality rights; however, to
the extent possible, the Licensor waives and/or agrees not to
assert any such rights held by the Licensor to the limited
extent necessary to allow You to exercise the Licensed
Rights, but not otherwise.
2. Patent and trademark rights are not licensed under this
Public License.
3. To the extent possible, the Licensor waives any right to
collect royalties from You for the exercise of the Licensed
Rights, whether directly or through a collecting society
under any voluntary or waivable statutory or compulsory
licensing scheme. In all other cases the Licensor expressly
reserves any right to collect such royalties.
Section 3 -- License Conditions.
Your exercise of the Licensed Rights is expressly made subject to the
following conditions.
a. Attribution.
1. If You Share the Licensed Material (including in modified
form), You must:
a. retain the following if it is supplied by the Licensor
with the Licensed Material:
i. identification of the creator(s) of the Licensed
Material and any others designated to receive
attribution, in any reasonable manner requested by
the Licensor (including by pseudonym if
designated);
ii. a copyright notice;
iii. a notice that refers to this Public License;
iv. a notice that refers to the disclaimer of
warranties;
v. a URI or hyperlink to the Licensed Material to the
extent reasonably practicable;
b. indicate if You modified the Licensed Material and
retain an indication of any previous modifications; and
c. indicate the Licensed Material is licensed under this
Public License, and include the text of, or the URI or
hyperlink to, this Public License.
2. You may satisfy the conditions in Section 3(a)(1) in any
reasonable manner based on the medium, means, and context in
which You Share the Licensed Material. For example, it may be
reasonable to satisfy the conditions by providing a URI or
hyperlink to a resource that includes the required
information.
3. If requested by the Licensor, You must remove any of the
information required by Section 3(a)(1)(A) to the extent
reasonably practicable.
4. If You Share Adapted Material You produce, the Adapter's
License You apply must not prevent recipients of the Adapted
Material from complying with this Public License.
Section 4 -- Sui Generis Database Rights.
Where the Licensed Rights include Sui Generis Database Rights that
apply to Your use of the Licensed Material:
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
to extract, reuse, reproduce, and Share all or a substantial
portion of the contents of the database;
b. if You include all or a substantial portion of the database
contents in a database in which You have Sui Generis Database
Rights, then the database in which You have Sui Generis Database
Rights (but not its individual contents) is Adapted Material; and
c. You must comply with the conditions in Section 3(a) if You Share
all or a substantial portion of the contents of the database.
For the avoidance of doubt, this Section 4 supplements and does not
replace Your obligations under this Public License where the Licensed
Rights include other Copyright and Similar Rights.
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
c. The disclaimer of warranties and limitation of liability provided
above shall be interpreted in a manner that, to the extent
possible, most closely approximates an absolute disclaimer and
waiver of all liability.
Section 6 -- Term and Termination.
a. This Public License applies for the term of the Copyright and
Similar Rights licensed here. However, if You fail to comply with
this Public License, then Your rights under this Public License
terminate automatically.
b. Where Your right to use the Licensed Material has terminated under
Section 6(a), it reinstates:
1. automatically as of the date the violation is cured, provided
it is cured within 30 days of Your discovery of the
violation; or
2. upon express reinstatement by the Licensor.
For the avoidance of doubt, this Section 6(b) does not affect any
right the Licensor may have to seek remedies for Your violations
of this Public License.
c. For the avoidance of doubt, the Licensor may also offer the
Licensed Material under separate terms or conditions or stop
distributing the Licensed Material at any time; however, doing so
will not terminate this Public License.
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
License.
Section 7 -- Other Terms and Conditions.
a. The Licensor shall not be bound by any additional or different
terms or conditions communicated by You unless expressly agreed.
b. Any arrangements, understandings, or agreements regarding the
Licensed Material not stated herein are separate from and
independent of the terms and conditions of this Public License.
Section 8 -- Interpretation.
a. For the avoidance of doubt, this Public License does not, and
shall not be interpreted to, reduce, limit, restrict, or impose
conditions on any use of the Licensed Material that could lawfully
be made without permission under this Public License.
b. To the extent possible, if any provision of this Public License is
deemed unenforceable, it shall be automatically reformed to the
minimum extent necessary to make it enforceable. If the provision
cannot be reformed, it shall be severed from this Public License
without affecting the enforceability of the remaining terms and
conditions.
c. No term or condition of this Public License will be waived and no
failure to comply consented to unless expressly agreed to by the
Licensor.
d. Nothing in this Public License constitutes or may be interpreted
as a limitation upon, or waiver of, any privileges and immunities
that apply to the Licensor or You, including from the legal
processes of any jurisdiction or authority.
=======================================================================
Creative Commons is not a party to its public licenses.
Notwithstanding, Creative Commons may elect to apply one of its public
licenses to material it publishes and in those instances will be
considered the "Licensor." Except for the limited purpose of indicating
that material is shared under a Creative Commons public license or as
otherwise permitted by the Creative Commons policies published at
creativecommons.org/policies, Creative Commons does not authorize the
use of the trademark "Creative Commons" or any other trademark or logo
of Creative Commons without its prior written consent including,
without limitation, in connection with any unauthorized modifications
to any of its public licenses or any other arrangements,
understandings, or agreements concerning use of licensed material. For
the avoidance of doubt, this paragraph does not form part of the public
licenses.
Creative Commons may be contacted at creativecommons.org.

View File

@@ -1,9 +0,0 @@
The examples provided by Facebook are for non-commercial testing and evaluation
purposes only. Facebook reserves all rights not expressly granted.
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
FACEBOOK 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,25 +1,30 @@
# [React](https://facebook.github.io/react/) &middot; [![CircleCI Status](https://circleci.com/gh/facebook/react.svg?style=shield&circle-token=:circle-token)](https://circleci.com/gh/facebook/react) [![Coverage Status](https://img.shields.io/coveralls/facebook/react/master.svg?style=flat)](https://coveralls.io/github/facebook/react?branch=master) [![npm version](https://img.shields.io/npm/v/react.svg?style=flat)](https://www.npmjs.com/package/react) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](CONTRIBUTING.md#pull-requests)
# [React](http://facebook.github.io/react) [![Build Status](https://travis-ci.org/facebook/react.png?branch=master)](https://travis-ci.org/facebook/react)
React is a JavaScript library for building user interfaces.
* **Declarative:** React makes it painless to create interactive UIs. Design simple views for each state in your application, and React will efficiently update and render just the right components when your data changes. Declarative views make your code more predictable, simpler to understand, and easier to debug.
* **Component-Based:** Build encapsulated components that manage their own state, then compose them to make complex UIs. Since component logic is written in JavaScript instead of templates, you can easily pass rich data through your app and keep state out of the DOM.
* **Learn Once, Write Anywhere:** We don't make assumptions about the rest of your technology stack, so you can develop new features in React without rewriting existing code. React can also render on the server using Node and power mobile apps using [React Native](https://facebook.github.io/react-native/).
* **Just the UI:** Lots of people use React as the V in MVC. Since React makes no assumptions about the rest of your technology stack, it's easy to try it out on a small feature in an existing project.
* **Virtual DOM:** React uses a *virtual DOM* diff implementation for ultra-high performance. It can also render on the server using Node.js — no heavy browser DOM required.
* **Data flow:** React implements one-way reactive data flow which reduces boilerplate and is easier to reason about than traditional data binding.
[Learn how to use React in your own project](https://facebook.github.io/react/docs/getting-started.html).
[Learn how to use React in your own project.](http://facebook.github.io/react/docs/getting-started.html)
## The `react` npm package has recently changed!
If you're looking for jeffbski's [React.js](https://github.com/jeffbski/react) project, it's now in `npm` as `reactjs` rather than `react`.
## Examples
We have several examples [on the website](https://facebook.github.io/react/). Here is the first one to get you started:
We have several examples [on the website](http://facebook.github.io/react/). Here is the first one to get you started:
```jsx
class HelloMessage extends React.Component {
render() {
```js
/** @jsx React.DOM */
var HelloMessage = React.createClass({
render: function() {
return <div>Hello {this.props.name}</div>;
}
}
});
ReactDOM.render(
React.renderComponent(
<HelloMessage name="John" />,
document.getElementById('container')
);
@@ -27,40 +32,67 @@ ReactDOM.render(
This example will render "Hello John" into a container on the page.
You'll notice that we used an HTML-like syntax; [we call it JSX](https://facebook.github.io/react/docs/introducing-jsx.html). JSX is not required to use React, but it makes code more readable, and writing it feels like writing HTML. We recommend using [Babel](https://babeljs.io/) with a [React preset](https://babeljs.io/docs/plugins/preset-react/) to convert JSX into native JavaScript for browsers to digest.
You'll notice that we used an XML-like syntax; [we call it JSX](http://facebook.github.io/react/docs/jsx-in-depth.html). JSX is not required to use React, but it makes code more readable, and writing it feels like writing HTML. A simple transform is included with React that allows converting JSX into native JavaScript for browsers to digest.
## Installation
React is available as the `react` package on [npm](https://www.npmjs.com/). It is also available on a [CDN](https://facebook.github.io/react/docs/installation.html#using-a-cdn).
The fastest way to get started is to serve JavaScript from the CDN (also available on [CDNJS](http://cdnjs.com/#react)):
React is flexible and can be used in a variety of projects. You can create new apps with it, but you can also gradually introduce it into an existing codebase without doing a rewrite.
```html
<!-- The core React library -->
<script src="http://fb.me/react-0.8.0.js"></script>
<!-- In-browser JSX transformer, remove when pre-compiling JSX. -->
<script src="http://fb.me/JSXTransformer-0.8.0.js"></script>
```
The recommended way to install React depends on your project. Here you can find short guides for the most common scenarios:
We've also built a [starter kit](http://facebook.github.io/react/downloads/react-0.8.0.zip) which might be useful if this is your first time using React. It includes a webpage with an example of using React with live code.
* [Trying Out React](https://facebook.github.io/react/docs/installation.html#trying-out-react)
* [Creating a New Application](https://facebook.github.io/react/docs/installation.html#creating-a-new-application)
* [Adding React to an Existing Application](https://facebook.github.io/react/docs/installation.html#adding-react-to-an-existing-application)
If you'd like to use [bower](http://bower.io), it's as easy as:
## Contributing
```sh
bower install --save react
```
The main purpose of this repository is to continue to evolve React core, making it faster and easier to use. Development of React happens in the open on GitHub, and we are grateful to the community for contributing bugfixes and improvements. Read below to learn how you can take part in improving React.
## Contribute
### [Code of Conduct](https://code.facebook.com/codeofconduct)
The main purpose of this repository is to continue to evolve React core, making it faster and easier to use. If you're interested in helping with that, then keep reading. If you're not interested in helping right now that's ok too. :) Any feedback you have about using React would be greatly appreciated.
Facebook has adopted a Code of Conduct that we expect project participants to adhere to. Please read [the full text](https://code.facebook.com/codeofconduct) so that you can understand what actions will and will not be tolerated.
### Building Your Copy of React
### Contributing Guide
The process to build `react.js` is built entirely on top of node.js, using many libraries you may already be familiar with.
Read our [contributing guide](https://facebook.github.io/react/contributing/how-to-contribute.html) to learn about our development process, how to propose bugfixes and improvements, and how to build and test your changes to React.
#### Prerequisites
### Beginner Friendly Bugs
* You have `node` installed at v0.10.0+ (it might work at lower versions, we just haven't tested).
* You are familiar with `npm` and know whether or not you need to use `sudo` when installing packages globally.
* You are familiar with `git`.
To help you get your feet wet and get you familiar with our contribution process, we have a list of [beginner friendly bugs](https://github.com/facebook/react/labels/Difficulty%3A%20beginner) that contain bugs which are fairly easy to fix. This is a great place to get started.
#### Build
### License
Once you have the repository cloned, building a copy of `react.js` is really easy.
React is [MIT licensed](./LICENSE).
```sh
# grunt-cli is needed by grunt; you might have this installed already
npm install -g grunt-cli
npm install
grunt build
```
React documentation is [Creative Commons licensed](./LICENSE-docs).
At this point, you should now have a `build/` directory populated with everything you need to use React. The examples should all work.
Examples provided in this repository and in the documentation are [separately licensed](./LICENSE-examples).
### Grunt
We use grunt to automate many tasks. Run `grunt -h` to see a mostly complete listing. The important ones to know:
```sh
# Build and run tests with PhantomJS
grunt test
# Lint the code with JSHint
grunt lint
# Wipe out build directory
grunt clean
```
### More…
There's only so much we can cram in here. To read more about the community and guidelines for submitting pull requests, please read the [Contributing document](CONTRIBUTING.md).

12
bin/jsx Executable file
View File

@@ -0,0 +1,12 @@
#!/usr/bin/env node
"use strict";
var visitors = require('../vendor/fbtransform/visitors').transformVisitors;
var transform = require('jstransform').transform;
require("commoner").resolve(function(id) {
return this.readModuleP(id);
}).process(function(id, source) {
// This is where JSX, ES6, etc. desugaring happens.
return transform(visitors.react, source).code;
});

55
bin/jsx-internal Executable file
View File

@@ -0,0 +1,55 @@
#!/usr/bin/env node
"use strict";
var visitors = require('../vendor/fbtransform/visitors').transformVisitors;
var transform = require('jstransform').transform;
var propagate = require("../vendor/constants").propagate;
require("commoner").resolve(function(id) {
var context = this;
// Note that the result of context.getProvidedP() is cached for the
// duration of the build, so it is both consistent and cheap to
// evaluate multiple times.
return context.getProvidedP().then(function(idToPath) {
// If a module declares its own identifier using @providesModule
// then that identifier will be a key in the idToPath object.
if (idToPath.hasOwnProperty(id)) {
return context.readFileP(idToPath[id]);
}
// Otherwise assume the identifier maps directly to a path in the
// filesystem.
return context.readModuleP(id);
});
}).process(function(id, source) {
var context = this;
var constants = context.config.constants || {};
// This is where JSX, ES6, etc. desugaring happens.
source = transform(visitors.react, source).code;
// Constant propagation means removing any obviously dead code after
// replacing constant expressions with literal (boolean) values.
source = propagate(constants, source);
if (context.config.mocking) {
// Make sure there is exactly one newline at the end of the module.
source = source.replace(/\s+$/m, "\n");
return context.getProvidedP().then(function(idToPath) {
if (id !== "mock-modules" &&
id !== "mocks" &&
id !== "test/all" &&
idToPath.hasOwnProperty("mock-modules")) {
return source + '\nrequire("mock-modules").register(' +
JSON.stringify(id) + ', module);\n';
}
return source;
});
}
return source;
});

View File

@@ -1,45 +0,0 @@
---
machine:
timezone: America/Los_Angeles
node:
version: 6
ruby:
version: 2.2.3
environment:
TRAVIS_REPO_SLUG: facebook/react
YARN_VERSION: 0.17.8
PATH: "${PATH}:${HOME}/.yarn/bin"
dependencies:
pre:
# This is equivalent to $TRAVIS_COMMIT_RANGE
# Need to figure out how to bail early if this is a "docs only" build
- echo $CIRCLE_COMPARE_URL | cut -d/ -f7
# install yarn if it's not already installed
- |
if [[ ! -e ~/.yarn/bin/yarn || $(yarn --version) != "${YARN_VERSION}" ]]; then
curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version $YARN_VERSION
fi
override:
- bundle install --gemfile=docs/Gemfile --deployment --path=vendor/bundle --jobs=3 --retry=3
- yarn install
- scripts/circleci/set_up_github_keys.sh
post:
# - npm ls --depth=0
cache_directories:
- docs/vendor/bundle
- ~/react-gh-pages # docs checkout
- ~/.yarn
- ~/.yarn-cache
test:
override:
- ./scripts/circleci/test_entry_point.sh:
parallel: true
deployment:
staging:
branch: /.*/
commands:
- ./scripts/circleci/upload_build.sh
- ./scripts/circleci/build_gh_pages.sh

View File

@@ -1,9 +0,0 @@
---
layout: single
title: Page Not Found
permalink: 404.html
---
We couldn't find what you were looking for.
Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

View File

@@ -3,27 +3,19 @@ source 'https://rubygems.org'
gem 'rake'
# jekyll, which builds it all
# 3.0 includes sass processing
gem 'jekyll', '~>3.1'
# Jekyll extensions
gem 'jekyll-redirect-from'
gem 'jekyll-paginate'
gem 'jekyll', '~>1.3.0'
# JSON
gem 'json'
# SASS for CSS
gem 'sass'
# For `rake watch`
gem 'rb-fsevent'
# For markdown header cleanup
gem 'sanitize', '~>2.0'
# Markdown
# Redcarpet for Markdown
gem 'redcarpet'
# Syntax highlighting
gem 'pygments.rb'
# Avoid having to poll for changes on Windows
gem 'wdm', '>= 0.1.0' if Gem.win_platform?
# For markdown header cleanup
gem 'sanitize'

View File

@@ -1,67 +1,61 @@
GEM
remote: https://rubygems.org/
specs:
classifier (1.3.3)
fast-stemmer (>= 1.0.0)
colorator (0.1)
ffi (1.9.14)
ffi (1.9.14-x64-mingw32)
jekyll (3.1.6)
commander (4.1.5)
highline (~> 1.6.11)
fast-stemmer (1.0.2)
ffi (1.9.3)
highline (1.6.20)
jekyll (1.3.0)
classifier (~> 1.3)
colorator (~> 0.1)
jekyll-sass-converter (~> 1.0)
jekyll-watch (~> 1.1)
kramdown (~> 1.3)
liquid (~> 3.0)
mercenary (~> 0.3.3)
rouge (~> 1.7)
safe_yaml (~> 1.0)
jekyll-paginate (1.1.0)
jekyll-redirect-from (0.11.0)
jekyll (>= 2.0)
jekyll-sass-converter (1.4.0)
sass (~> 3.4)
jekyll-watch (1.4.0)
listen (~> 3.0, < 3.1)
json (2.0.1)
kramdown (1.11.1)
liquid (3.0.6)
listen (3.0.8)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
mercenary (0.3.6)
mini_portile2 (2.1.0)
nokogiri (1.6.8)
mini_portile2 (~> 2.1.0)
pkg-config (~> 1.1.7)
nokogiri (1.6.8-x64-mingw32)
mini_portile2 (~> 2.1.0)
pkg-config (~> 1.1.7)
pkg-config (1.1.7)
posix-spawn (0.3.11)
pygments.rb (0.6.3)
commander (~> 4.1.3)
liquid (~> 2.5.2)
listen (~> 1.3)
maruku (~> 0.6.0)
pygments.rb (~> 0.5.0)
redcarpet (~> 2.3.0)
safe_yaml (~> 0.9.7)
json (1.8.1)
liquid (2.5.4)
listen (1.3.1)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
rb-kqueue (>= 0.2)
maruku (0.6.1)
syntax (>= 1.0.0)
mini_portile (0.5.2)
nokogiri (1.6.0)
mini_portile (~> 0.5.0)
posix-spawn (0.3.6)
pygments.rb (0.5.4)
posix-spawn (~> 0.3.6)
yajl-ruby (~> 1.2.0)
rake (11.2.2)
rb-fsevent (0.9.7)
rb-inotify (0.9.7)
yajl-ruby (~> 1.1.0)
rake (10.1.0)
rb-fsevent (0.9.3)
rb-inotify (0.9.2)
ffi (>= 0.5.0)
redcarpet (3.3.4)
rouge (1.11.1)
safe_yaml (1.0.4)
sanitize (2.1.0)
rb-kqueue (0.2.0)
ffi (>= 0.5.0)
redcarpet (2.3.0)
safe_yaml (0.9.7)
sanitize (2.0.6)
nokogiri (>= 1.4.4)
sass (3.4.22)
yajl-ruby (1.2.1)
sass (3.2.12)
syntax (1.0.0)
yajl-ruby (1.1.0)
PLATFORMS
ruby
x64-mingw32
DEPENDENCIES
jekyll (~> 3.1)
jekyll-paginate
jekyll-redirect-from
jekyll (~> 1.3.0)
json
pygments.rb
rake
rb-fsevent
redcarpet
sanitize (~> 2.0)
sanitize
sass

View File

@@ -1,52 +1,40 @@
# React Documentation & Website
## [Read the React Documentation](https://facebook.github.io/react/)
This folder is not the right place to *read* the documentation.
Instead, head over [to the React website](https://facebook.github.io/react/) to read it.
This folder only contains the source code for the website.
We use [Jekyll](http://jekyllrb.com/) to build the site using ([mostly](http://zpao.com/posts/adding-line-highlights-to-markdown-code-fences/)) Markdown, and we host it by pushing HTML to [GitHub Pages](http://pages.github.com/).
## Installation
If you are working on the site, you will want to install and run a local copy of it.
We use [Jekyll](http://jekyllrb.com/) to build the site using ([mostly](http://zpao.com/posts/adding-line-highlights-to-markdown-code-fences/)) Markdown, and we host it by pushing HTML to [GitHub Pages](http://pages.github.com/).
### Dependencies
In order to use Jekyll, you will need to have Ruby installed. macOS comes pre-installed with Ruby, but you may need to update RubyGems (via `gem update --system`).
Otherwise, [RVM](https://rvm.io/) and [rbenv](https://github.com/sstephenson/rbenv) are popular ways to install Ruby.
In order to use Jekyll, you will need to have Ruby installed.
- [Ruby](http://www.ruby-lang.org/) (version >= 1.8.7)
- [RubyGems](http://rubygems.org/) (version >= 1.3.7)
- [Bundler](http://gembundler.com/)
The version of the Pygment syntax highlighter used by Jekyll requires Python 2.7.x (not 3.x). macOS comes pre-installed with Python 2.7, but you may need to install it on other OSs.
- [Python](https://www.python.org) (version 2.7.x)
Mac OS X comes pre-installed with Ruby, but you may need to update RubyGems (via `gem update --system`).
Otherwise, [RVM](https://rvm.io/) and [rbenv](https://github.com/sstephenson/rbenv) are popular ways to install Ruby.
Once you have RubyGems and installed Bundler (via `gem install bundler`), use it to install the dependencies:
```sh
$ cd react/docs
$ bundle install # Might need sudo.
$ npm install
$ npm install # Might need sudo.
```
### Instructions
The site requires React, so first make sure you've built the project (via [`grunt`](http://gruntjs.com/getting-started)).
The site requires React, so first make sure you've built the project (via `grunt`).
Use Jekyll to serve the website locally (by default, at `http://localhost:4000`):
```sh
$ cd react/docs
$ bundle exec rake
$ bundle exec rake fetch_remotes
$ bundle exec jekyll serve -w
$ open http://localhost:4000/react/index.html
$ rake
$ jekyll serve -w
$ open http://localhost:4000/react/
```
We use [SASS](http://sass-lang.com/) (with [Bourbon](http://bourbon.io/)) for our CSS, and we use JSX to transform some of our JS.
@@ -55,24 +43,19 @@ If you want to modify the CSS or JS, use [Rake](http://rake.rubyforge.org/) to c
```sh
$ cd react/docs
$ bundle exec rake watch # Automatically compiles as needed.
# bundle exec rake Manually compile CSS and JS.
# bundle exec rake js Manually compile JS, only.
$ rake watch # Automatically compiles as needed.
# rake Manually compile CSS and JS.
# rake css Manually compile CSS, only.
# rake js Manually compile JS, only.
```
## Afterthoughts
### Updating `facebook.github.io/react`
The easiest way to do this is to have a separate clone of this repository, checked out to the `gh-pages` branch. We have a build step that expects this to be in a directory named `react-gh-pages` at the same depth as `react`. Then it's just a matter of running `grunt docs`, which will compile the site and copy it out to this repository. From there, you can check it in.
The easiest way to do this is to have a separate clone of this repository, checked out to the `gh-pages` branch. We have a build step that expects this to be in a directory named `react-gh-pages` at the same depth as `react`. Then it's just a matter of running `grunt docs`, which will compile the site and copy it out to this repository. From there you can check it in.
**Note:** This should only be done for new releases. You should create a tag corresponding to the release tag in the main repository.
We also have a rake task that does the same thing (without creating commits). It expects the directory structure mentioned above.
```sh
$ bundle exec rake release
```
**Note:** This should only be done for new releases. You should create a tag corresponding to the relase tag in the main repository.
### Removing the Jekyll / Ruby Dependency

View File

@@ -1,24 +1,21 @@
require('rubygems')
require('json')
require('yaml')
require('open-uri')
desc "download babel-browser"
task :fetch_remotes do
IO.copy_stream(
open('https://unpkg.com/babel-standalone@6.15.0/babel.min.js'),
'js/babel.min.js'
)
desc "generate css from sass"
task :css do
system "sass --style=compressed _css/react.scss css/react.css"
end
desc "generate js from jsx"
task :js do
system "../node_modules/.bin/babel _js --out-dir=js"
system "../bin/jsx _js js"
end
desc "watch js"
desc "watch css & js"
task :watch do
Process.spawn "../node_modules/.bin/babel _js --out-dir=js --watch"
Process.spawn "sass --style=compressed --watch _css/react.scss:css/react.css"
Process.spawn "../bin/jsx --watch _js js"
Process.waitall
end
@@ -32,43 +29,9 @@ task :update_version do
end
end
desc "update SRI hashes"
task :update_hashes do
map = {
'react.js' => 'dev',
'react.min.js' => 'prod',
'react-dom.js' => 'dom_dev',
'react-dom.min.js' => 'dom_prod',
'react-dom-server.js' => 'dom_server_dev',
'react-dom-server.min.js' => 'dom_server_prod'
}
site_config = YAML.load_file('_config.yml')
map.each do |file, key|
site_config['react_hashes'][key] = `openssl dgst -sha384 -binary ../../react-bower/#{file} | openssl base64 -A`
end
File.open('_config.yml', 'w+') { |f| f.write(site_config.to_yaml) }
end
desc "update acknowledgements list"
task :update_acknowledgements do
authors = File.readlines('../AUTHORS').map {|author| author.gsub(/ <.*\n/,'')}
# split into cols here because nobody knows how to use liquid
# need to to_f because ruby will keep slice_size as int and round on its own
slice_size = (authors.size / 3.to_f).ceil
cols = authors.each_slice(slice_size).to_a
File.open('_data/acknowledgements.yml', 'w+') { |f| f.write(cols.to_yaml) }
end
desc "copy error codes to docs"
task :copy_error_codes do
codes_json = File.read('../scripts/error-codes/codes.json')
codes_js = "var errorMap = #{codes_json.chomp};\n"
File.write('js/errorMap.js', codes_js)
end
desc "build into ../../react-gh-pages"
task :release => [:update_version, :js, :fetch_remotes, :copy_error_codes] do
task :release => [:update_version, :default] do
system "jekyll build -d ../../react-gh-pages"
end
task :default => [:js]
task :default => [:css, :js]

View File

@@ -1,72 +1,21 @@
---
name: React
description: A JavaScript library for building user interfaces
url: https://facebook.github.io
baseurl: /react
url: http://facebook.github.io
permalink: /blog/:year/:month/:day/:title.html
paginate_path: /blog/page:num/
paginate: 5
timezone: America/Los_Angeles
highlighter: pygments
defaults:
- scope:
path: ''
type: posts
values:
layout: post
sectionid: blog
- scope:
path: blog
type: pages
values:
sectionid: blog
- scope:
path: tutorial
type: pages
values:
layout: tutorial
sectionid: tutorial
- scope:
path: docs
type: pages
values:
layout: docs
sectionid: docs
- scope:
path: contributing
type: pages
values:
sectionid: docs
- scope:
path: community
type: pages
values:
layout: community
sectionid: community
exclude:
- Gemfile
- Gemfile.lock
- README.md
- Rakefile
- vendor/bundle
markdown: redcarpet
redcarpet:
extensions:
- fenced_code_blocks
- footnotes
sass:
style: :compressed
sass_dir: _css
gems:
- jekyll-redirect-from
- jekyll-paginate
react_version: 15.4.0
react_hashes:
dev: buVLzxzBI8Ps3svVMSUurNdb5dozNidH5Ow4H0YgZeia3t6Oeui2VLpvtAq1fwtK
prod: nCjsa0kjNQPQdxWm12/ReVJzfBJaVubEwwDswyQDGMKYJmeWv3qShMuETfU5fisu
addons_dev: /u97pKzBwasbC1yj8gSIq1z30o4ZTUX9j1Mv/hyAjmG41ydTNHw9JFOhwFbDgxmR
addons_prod: /p86n4b5VTlWoA/INEHQZ+zjx9g1pJduoFmTEJ6fSzFTq1mBaXaBcWVGtZJXD68L
dom_dev: lUxkeWjg3I3lXmxcM1gvgo0yvm2w9alc1osa4L8yWZFO6l/vg9h5hSlHPFioltrm
dom_prod: u8x1yIGN9IjGNYbBaDMsp1D4MK3sCmMU13mcBX+bm+aMo5+gaT8HIwIj39GlXaRS
dom_server_dev: Okj1hVX1VF+oZSkPcJQ/YcnW6bsIpeni222ylwUaMnSmdCe0zWKmMwpFMVqzy4Ws
dom_server_prod: wiA4u+G5fEfF4xzhhVnNWeSifVyttoEIpgc3APaMKQgw5A4wHbEMihf63tk1qoyt
pygments: true
name: React
markdown: redcarpet
react_version: 0.8.0
description: A JavaScript library for building user interfaces
relative_permalinks: true
paginate: 5
paginate_path: /blog/page:num/
timezone: America/Los_Angeles

View File

@@ -37,7 +37,7 @@ html * {
border-bottom: 1px dotted #cb4b16;
}
.cm-s-solarized-light span.cm-keyword {
color: #859900;
color: #268bd2;
}
.cm-s-solarized-light span.cm-atom {
color: #2aa198;
@@ -61,7 +61,7 @@ html * {
color: #93a1a1;
}
.cm-s-solarized-light span.cm-property {
color: #657b83;
color: #637c84;
}
.cm-s-solarized-light span.cm-operator {
color: #657b83;
@@ -74,13 +74,14 @@ html * {
border-bottom: 1px dotted #cb4b16;
}
.cm-s-solarized-light span.cm-bracket {
color: #268bd2;
color: #cb4b16;
}
.cm-s-solarized-light span.cm-tag {
color: #268bd2;
color: #657b83;
}
.cm-s-solarized-light span.cm-attribute {
color: #586e75;
font-weight: bold;
}
.cm-s-solarized-light span.cm-meta {
color: #268bd2;
@@ -165,6 +166,7 @@ html * {
}
.cm-s-solarized-dark span.cm-attribute {
color: #93a1a1;
font-weight: bold;
}
.cm-s-solarized-dark span.cm-meta {
color: #268bd2;

View File

@@ -6,6 +6,7 @@ $textColorLight: lighten($textColor, 20%);
html {
font-family: $helvetica;
font-family: proxima-nova, $helvetica;
font-weight: 300;
color: $textColor;
line-height: 1.28;
}
@@ -68,7 +69,7 @@ h3 {
}
h4 {
font-size: 16px;
font-size: 17px;
}
h5 {
@@ -112,6 +113,8 @@ li {
line-height: 20px;
}
a {
color: $linkColor;
text-decoration: none;
@@ -130,6 +133,4 @@ a {
text-align: center;
}
input {
font-family: inherit;
}

View File

@@ -2,7 +2,12 @@
// These mixins/functions are deprecated
// They will be removed in the next MAJOR version release
//************************************************************************//
@mixin inline-block {
display: inline-block;
@warn "inline-block mixin is deprecated and will be removed in the next major version release";
@mixin box-shadow ($shadows...) {
@include prefixer(box-shadow, $shadows, spec);
@warn "box-shadow is deprecated and will be removed in the next major version release";
}
@mixin background-size ($lengths...) {
@include prefixer(background-size, $lengths, spec);
@warn "background-size is deprecated and will be removed in the next major version release";
}

View File

@@ -1,36 +1,22 @@
// Settings
@import "settings/prefixer";
@import "settings/px-to-em";
@import "settings/asset-pipeline";
// Custom Helpers
@import "helpers/convert-units";
@import "helpers/deprecated-webkit-gradient";
@import "helpers/gradient-positions-parser";
@import "helpers/is-num";
@import "helpers/linear-angle-parser";
@import "helpers/linear-gradient-parser";
@import "helpers/linear-positions-parser";
@import "helpers/linear-side-corner-parser";
@import "helpers/radial-arg-parser";
@import "helpers/radial-positions-parser";
@import "helpers/radial-gradient-parser";
@import "helpers/render-gradients";
@import "helpers/shape-size-stripper";
@import "helpers/str-to-num";
// Custom Functions
@import "functions/assign";
@import "functions/color-lightness";
@import "functions/compact";
@import "functions/flex-grid";
@import "functions/golden-ratio";
@import "functions/grid-width";
@import "functions/linear-gradient";
@import "functions/modular-scale";
@import "functions/px-to-em";
@import "functions/px-to-rem";
@import "functions/strip-units";
@import "functions/radial-gradient";
@import "functions/tint-shade";
@import "functions/transition-property-name";
@import "functions/unpack";
// CSS3 Mixins
@import "css3/animation";
@@ -41,15 +27,12 @@
@import "css3/border-image";
@import "css3/border-radius";
@import "css3/box-sizing";
@import "css3/calc";
@import "css3/columns";
@import "css3/filter";
@import "css3/flex-box";
@import "css3/font-face";
@import "css3/font-feature-settings";
@import "css3/hyphens";
@import "css3/hidpi-media-query";
@import "css3/image-rendering";
@import "css3/inline-block";
@import "css3/keyframes";
@import "css3/linear-gradient";
@import "css3/perspective";
@@ -62,8 +45,6 @@
// Addons & other mixins
@import "addons/button";
@import "addons/clearfix";
@import "addons/directional-values";
@import "addons/ellipsis";
@import "addons/font-family";
@import "addons/hide-text";
@import "addons/html5-input-types";
@@ -73,7 +54,6 @@
@import "addons/size";
@import "addons/timing-functions";
@import "addons/triangle";
@import "addons/word-wrap";
// Soon to be deprecated Mixins
@import "bourbon-deprecated-upcoming";

View File

@@ -1,51 +1,38 @@
@mixin button ($style: simple, $base-color: #4294f0, $text-size: inherit, $padding: 7px 18px) {
@mixin button ($style: simple, $base-color: #4294f0) {
@if type-of($style) == string and type-of($base-color) == color {
@include buttonstyle($style, $base-color, $text-size, $padding);
}
@if type-of($style) == string and type-of($base-color) == number {
$padding: $text-size;
$text-size: $base-color;
$base-color: #4294f0;
@if $padding == inherit {
$padding: 7px 18px;
}
@include buttonstyle($style, $base-color, $text-size, $padding);
}
@if type-of($style) == color and type-of($base-color) == color {
@if type-of($style) == color {
$base-color: $style;
$style: simple;
@include buttonstyle($style, $base-color, $text-size, $padding);
}
@if type-of($style) == color and type-of($base-color) == number {
$padding: $text-size;
$text-size: $base-color;
$base-color: $style;
$style: simple;
@if $padding == inherit {
$padding: 7px 18px;
// Grayscale button
@if $base-color == grayscale($base-color) {
@if $style == simple {
@include simple($base-color, $grayscale: true);
}
@include buttonstyle($style, $base-color, $text-size, $padding);
@else if $style == shiny {
@include shiny($base-color, $grayscale: true);
}
@else if $style == pill {
@include pill($base-color, $grayscale: true);
}
}
@if type-of($style) == number {
$padding: $base-color;
$text-size: $style;
$base-color: #4294f0;
$style: simple;
@if $padding == #4294f0 {
$padding: 7px 18px;
// Colored button
@else {
@if $style == simple {
@include simple($base-color);
}
@include buttonstyle($style, $base-color, $text-size, $padding);
@else if $style == shiny {
@include shiny($base-color);
}
@else if $style == pill {
@include pill($base-color);
}
}
&:disabled {
@@ -55,55 +42,16 @@
}
// Selector Style Button
//************************************************************************//
@mixin buttonstyle($type, $b-color, $t-size, $pad) {
// Grayscale button
@if $type == simple and $b-color == grayscale($b-color) {
@include simple($b-color, true, $t-size, $pad);
}
@if $type == shiny and $b-color == grayscale($b-color) {
@include shiny($b-color, true, $t-size, $pad);
}
@if $type == pill and $b-color == grayscale($b-color) {
@include pill($b-color, true, $t-size, $pad);
}
@if $type == flat and $b-color == grayscale($b-color) {
@include flat($b-color, true, $t-size, $pad);
}
// Colored button
@if $type == simple {
@include simple($b-color, false, $t-size, $pad);
}
@else if $type == shiny {
@include shiny($b-color, false, $t-size, $pad);
}
@else if $type == pill {
@include pill($b-color, false, $t-size, $pad);
}
@else if $type == flat {
@include flat($b-color, false, $t-size, $pad);
}
}
// Simple Button
//************************************************************************//
@mixin simple($base-color, $grayscale: false, $textsize: inherit, $padding: 7px 18px) {
@mixin simple($base-color, $grayscale: false) {
$color: hsl(0, 0, 100%);
$border: adjust-color($base-color, $saturation: 9%, $lightness: -14%);
$inset-shadow: adjust-color($base-color, $saturation: -8%, $lightness: 15%);
$stop-gradient: adjust-color($base-color, $saturation: 9%, $lightness: -11%);
$text-shadow: adjust-color($base-color, $saturation: 15%, $lightness: -18%);
@if is-light($base-color) {
@if lightness($base-color) > 70% {
$color: hsl(0, 0, 20%);
$text-shadow: adjust-color($base-color, $saturation: 10%, $lightness: 4%);
}
@@ -120,10 +68,10 @@
box-shadow: inset 0 1px 0 0 $inset-shadow;
color: $color;
display: inline-block;
font-size: $textsize;
font-size: 11px;
font-weight: bold;
@include linear-gradient ($base-color, $stop-gradient);
padding: $padding;
padding: 7px 18px;
text-decoration: none;
text-shadow: 0 1px 0 $text-shadow;
background-clip: padding-box;
@@ -144,8 +92,7 @@
@include linear-gradient ($base-color-hover, $stop-gradient-hover);
}
&:active:not(:disabled),
&:focus:not(:disabled) {
&:active:not(:disabled) {
$border-active: adjust-color($base-color, $saturation: 9%, $lightness: -14%);
$inset-shadow-active: adjust-color($base-color, $saturation: 7%, $lightness: -17%);
@@ -155,14 +102,14 @@
}
border: 1px solid $border-active;
box-shadow: inset 0 0 8px 4px $inset-shadow-active, inset 0 0 8px 4px $inset-shadow-active;
box-shadow: inset 0 0 8px 4px $inset-shadow-active, inset 0 0 8px 4px $inset-shadow-active, 0 1px 1px 0 #eee;
}
}
// Shiny Button
//************************************************************************//
@mixin shiny($base-color, $grayscale: false, $textsize: inherit, $padding: 7px 18px) {
@mixin shiny($base-color, $grayscale: false) {
$color: hsl(0, 0, 100%);
$border: adjust-color($base-color, $red: -117, $green: -111, $blue: -81);
$border-bottom: adjust-color($base-color, $red: -126, $green: -127, $blue: -122);
@@ -172,7 +119,7 @@
$text-shadow: adjust-color($base-color, $red: -140, $green: -141, $blue: -114);
$third-stop: adjust-color($base-color, $red: -86, $green: -75, $blue: -48);
@if is-light($base-color) {
@if lightness($base-color) > 70% {
$color: hsl(0, 0, 20%);
$text-shadow: adjust-color($base-color, $saturation: 10%, $lightness: 4%);
}
@@ -193,10 +140,10 @@
box-shadow: inset 0 1px 0 0 $inset-shadow;
color: $color;
display: inline-block;
font-size: $textsize;
font-size: 14px;
font-weight: bold;
@include linear-gradient(top, $base-color 0%, $second-stop 50%, $third-stop 50%, $fourth-stop 100%);
padding: $padding;
padding: 8px 20px;
text-align: center;
text-decoration: none;
text-shadow: 0 -1px 1px $text-shadow;
@@ -221,22 +168,21 @@
$fourth-stop-hover 100%);
}
&:active:not(:disabled),
&:focus:not(:disabled) {
&:active:not(:disabled) {
$inset-shadow-active: adjust-color($base-color, $red: -111, $green: -116, $blue: -122);
@if $grayscale == true {
$inset-shadow-active: grayscale($inset-shadow-active);
}
box-shadow: inset 0 0 20px 0 $inset-shadow-active;
box-shadow: inset 0 0 20px 0 $inset-shadow-active, 0 1px 0 #fff;
}
}
// Pill Button
//************************************************************************//
@mixin pill($base-color, $grayscale: false, $textsize: inherit, $padding: 7px 18px) {
@mixin pill($base-color, $grayscale: false) {
$color: hsl(0, 0, 100%);
$border-bottom: adjust-color($base-color, $hue: 8, $saturation: -11%, $lightness: -26%);
$border-sides: adjust-color($base-color, $hue: 4, $saturation: -21%, $lightness: -21%);
@@ -245,7 +191,7 @@
$stop-gradient: adjust-color($base-color, $hue: 8, $saturation: 14%, $lightness: -10%);
$text-shadow: adjust-color($base-color, $hue: 5, $saturation: -19%, $lightness: -15%);
@if is-light($base-color) {
@if lightness($base-color) > 70% {
$color: hsl(0, 0, 20%);
$text-shadow: adjust-color($base-color, $saturation: 10%, $lightness: 4%);
}
@@ -262,14 +208,14 @@
border: 1px solid $border-top;
border-color: $border-top $border-sides $border-bottom;
border-radius: 16px;
box-shadow: inset 0 1px 0 0 $inset-shadow;
box-shadow: inset 0 1px 0 0 $inset-shadow, 0 1px 2px 0 #b3b3b3;
color: $color;
display: inline-block;
font-size: $textsize;
font-size: 11px;
font-weight: normal;
line-height: 1;
@include linear-gradient ($base-color, $stop-gradient);
padding: $padding;
padding: 5px 16px;
text-align: center;
text-decoration: none;
text-shadow: 0 -1px 1px $text-shadow;
@@ -303,8 +249,7 @@
background-clip: padding-box;
}
&:active:not(:disabled),
&:focus:not(:disabled) {
&:active:not(:disabled) {
$active-color: adjust-color($base-color, $hue: 4, $saturation: -12%, $lightness: -10%);
$border-active: adjust-color($base-color, $hue: 6, $saturation: -2.5%, $lightness: -30%);
$border-bottom-active: adjust-color($base-color, $hue: 11, $saturation: 6%, $lightness: -31%);
@@ -322,53 +267,7 @@
background: $active-color;
border: 1px solid $border-active;
border-bottom: 1px solid $border-bottom-active;
box-shadow: inset 0 0 6px 3px $inset-shadow-active;
box-shadow: inset 0 0 6px 3px $inset-shadow-active, 0 1px 0 0 #fff;
text-shadow: 0 -1px 1px $text-shadow-active;
}
}
// Flat Button
//************************************************************************//
@mixin flat($base-color, $grayscale: false, $textsize: inherit, $padding: 7px 18px) {
$color: hsl(0, 0, 100%);
@if is-light($base-color) {
$color: hsl(0, 0, 20%);
}
background-color: $base-color;
border-radius: 3px;
border: none;
color: $color;
display: inline-block;
font-size: inherit;
font-weight: bold;
padding: 7px 18px;
text-decoration: none;
background-clip: padding-box;
&:hover:not(:disabled){
$base-color-hover: adjust-color($base-color, $saturation: 4%, $lightness: 5%);
@if $grayscale == true {
$base-color-hover: grayscale($base-color-hover);
}
background-color: $base-color-hover;
cursor: pointer;
}
&:active:not(:disabled),
&:focus:not(:disabled) {
$base-color-active: adjust-color($base-color, $saturation: -4%, $lightness: -5%);
@if $grayscale == true {
$base-color-active: grayscale($base-color-active);
}
background-color: $base-color-active;
cursor: pointer;
}
}

View File

@@ -1,4 +1,4 @@
// Modern micro clearfix provides an easy way to contain floats without adding additional markup.
// Micro clearfix provides an easy way to contain floats without adding additional markup
//
// Example usage:
//
@@ -12,12 +12,18 @@
// }
@mixin clearfix {
*zoom: 1;
&:before,
&:after {
content:"";
display:table;
clear:both;
content: " ";
display: table;
}
&:after {
clear: both;
}
}
// Acknowledgements
// Beat *that* clearfix: [Thierry Koblentz](http://www.css-101.org/articles/clearfix/latest-new-clearfix-so-far.php)
// Micro clearfix: [Nicolas Gallagher](http://nicolasgallagher.com/micro-clearfix-hack/)

View File

@@ -1,111 +0,0 @@
// directional-property mixins are shorthands
// for writing properties like the following
//
// @include margin(null 0 10px);
// ------
// margin-right: 0;
// margin-bottom: 10px;
// margin-left: 0;
//
// - or -
//
// @include border-style(dotted null);
// ------
// border-top-style: dotted;
// border-bottom-style: dotted;
//
// ------
//
// Note: You can also use false instead of null
@function collapse-directionals($vals) {
$output: null;
$A: nth( $vals, 1 );
$B: if( length($vals) < 2, $A, nth($vals, 2));
$C: if( length($vals) < 3, $A, nth($vals, 3));
$D: if( length($vals) < 2, $A, nth($vals, if( length($vals) < 4, 2, 4) ));
@if $A == 0 { $A: 0 }
@if $B == 0 { $B: 0 }
@if $C == 0 { $C: 0 }
@if $D == 0 { $D: 0 }
@if $A == $B and $A == $C and $A == $D { $output: $A }
@else if $A == $C and $B == $D { $output: $A $B }
@else if $B == $D { $output: $A $B $C }
@else { $output: $A $B $C $D }
@return $output;
}
@function contains-falsy($list) {
@each $item in $list {
@if not $item {
@return true;
}
}
@return false;
}
@mixin directional-property($pre, $suf, $vals) {
// Property Names
$top: $pre + "-top" + if($suf, "-#{$suf}", "");
$bottom: $pre + "-bottom" + if($suf, "-#{$suf}", "");
$left: $pre + "-left" + if($suf, "-#{$suf}", "");
$right: $pre + "-right" + if($suf, "-#{$suf}", "");
$all: $pre + if($suf, "-#{$suf}", "");
$vals: collapse-directionals($vals);
@if contains-falsy($vals) {
@if nth($vals, 1) { #{$top}: nth($vals, 1); }
@if length($vals) == 1 {
@if nth($vals, 1) { #{$right}: nth($vals, 1); }
} @else {
@if nth($vals, 2) { #{$right}: nth($vals, 2); }
}
// prop: top/bottom right/left
@if length($vals) == 2 {
@if nth($vals, 1) { #{$bottom}: nth($vals, 1); }
@if nth($vals, 2) { #{$left}: nth($vals, 2); }
// prop: top right/left bottom
} @else if length($vals) == 3 {
@if nth($vals, 3) { #{$bottom}: nth($vals, 3); }
@if nth($vals, 2) { #{$left}: nth($vals, 2); }
// prop: top right bottom left
} @else if length($vals) == 4 {
@if nth($vals, 3) { #{$bottom}: nth($vals, 3); }
@if nth($vals, 4) { #{$left}: nth($vals, 4); }
}
// prop: top/right/bottom/left
} @else {
#{$all}: $vals;
}
}
@mixin margin($vals...) {
@include directional-property(margin, false, $vals...);
}
@mixin padding($vals...) {
@include directional-property(padding, false, $vals...);
}
@mixin border-style($vals...) {
@include directional-property(border, style, $vals...);
}
@mixin border-color($vals...) {
@include directional-property(border, color, $vals...);
}
@mixin border-width($vals...) {
@include directional-property(border, width, $vals...);
}

View File

@@ -1,7 +0,0 @@
@mixin ellipsis($width: 100%) {
display: inline-block;
max-width: $width;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

View File

@@ -1,5 +1,5 @@
$georgia: Georgia, Cambria, "Times New Roman", Times, serif;
$helvetica: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
$helvetica: "Helvetica Neue", Helvetica, Arial, sans-serif;
$lucida-grande: "Lucida Grande", Tahoma, Verdana, Arial, sans-serif;
$monospace: "Bitstream Vera Sans Mono", Consolas, Courier, monospace;
$verdana: Verdana, Geneva, sans-serif;

View File

@@ -1,10 +1,5 @@
@mixin hide-text {
overflow: hidden;
&:before {
content: "";
display: block;
width: 0;
height: 100%;
}
color: transparent;
font: 0/0 a;
text-shadow: none;
}

View File

@@ -20,19 +20,29 @@ $inputs-list: 'input[type="email"]',
'input[type="time"]',
'input[type="week"]';
// Bare inputs
//************************************************************************//
$all-text-inputs: assign-inputs($inputs-list);
$unquoted-inputs-list: ();
@each $input-type in $inputs-list {
$unquoted-inputs-list: append($unquoted-inputs-list, unquote($input-type), comma);
}
$all-text-inputs: $unquoted-inputs-list;
// Hover Pseudo-class
//************************************************************************//
$all-text-inputs-hover: assign-inputs($inputs-list, hover);
$all-text-inputs-hover: ();
@each $input-type in $unquoted-inputs-list {
$input-type-hover: $input-type + ":hover";
$all-text-inputs-hover: append($all-text-inputs-hover, $input-type-hover, comma);
}
// Focus Pseudo-class
//************************************************************************//
$all-text-inputs-focus: assign-inputs($inputs-list, focus);
$all-text-inputs-focus: ();
@each $input-type in $unquoted-inputs-list {
$input-type-focus: $input-type + ":focus";
$all-text-inputs-focus: append($all-text-inputs-focus, $input-type-focus, comma);
}
// You must use interpolation on the variable:
// #{$all-text-inputs}
@@ -44,43 +54,3 @@ $all-text-inputs-focus: assign-inputs($inputs-list, focus);
// #{$all-text-inputs}, textarea {
// border: 1px solid red;
// }
//************************************************************************//
// Generate a variable ($all-button-inputs) with a list of all html5
// input types that have a button-based input, excluding button.
//************************************************************************//
$inputs-button-list: 'input[type="button"]',
'input[type="reset"]',
'input[type="submit"]';
// Bare inputs
//************************************************************************//
$all-button-inputs: assign-inputs($inputs-button-list);
// Hover Pseudo-class
//************************************************************************//
$all-button-inputs-hover: assign-inputs($inputs-button-list, hover);
// Focus Pseudo-class
//************************************************************************//
$all-button-inputs-focus: assign-inputs($inputs-button-list, focus);
// Active Pseudo-class
//************************************************************************//
$all-button-inputs-active: assign-inputs($inputs-button-list, active);
// You must use interpolation on the variable:
// #{$all-button-inputs}
// #{$all-button-inputs-hover}
// #{$all-button-inputs-focus}
// #{$all-button-inputs-active}
// Example
//************************************************************************//
// #{$all-button-inputs}, button {
// border: 1px solid red;
// }

View File

@@ -1,12 +1,10 @@
@mixin position ($position: relative, $coordinates: null null null null) {
@mixin position ($position: relative, $coordinates: 0 0 0 0) {
@if type-of($position) == list {
$coordinates: $position;
$position: relative;
}
$coordinates: unpack($coordinates);
$top: nth($coordinates, 1);
$right: nth($coordinates, 2);
$bottom: nth($coordinates, 3);
@@ -14,19 +12,31 @@
position: $position;
@if ($top and $top == auto) or (type-of($top) == number) {
@if $top == auto {
top: $top;
}
@else if not(unitless($top)) {
top: $top;
}
@if ($right and $right == auto) or (type-of($right) == number) {
@if $right == auto {
right: $right;
}
@else if not(unitless($right)) {
right: $right;
}
@if ($bottom and $bottom == auto) or (type-of($bottom) == number) {
@if $bottom == auto {
bottom: $bottom;
}
@else if not(unitless($bottom)) {
bottom: $bottom;
}
@if ($left and $left == auto) or (type-of($left) == number) {
@if $left == auto {
left: $left;
}
@else if not(unitless($left)) {
left: $left;
}
}

View File

@@ -1,7 +1,11 @@
//************************************************************************//
// Example: @include prefixer(border-radius, $radii, webkit ms spec);
//************************************************************************//
// Variables located in /settings/_prefixer.scss
$prefix-for-webkit: true !default;
$prefix-for-mozilla: true !default;
$prefix-for-microsoft: true !default;
$prefix-for-opera: true !default;
$prefix-for-spec: true !default; // required for keyframe mixin
@mixin prefixer ($property, $value, $prefixes) {
@each $prefix in $prefixes {
@@ -37,9 +41,9 @@
}
@mixin disable-prefix-for-all() {
$prefix-for-webkit: false !global;
$prefix-for-mozilla: false !global;
$prefix-for-microsoft: false !global;
$prefix-for-opera: false !global;
$prefix-for-spec: false !global;
$prefix-for-webkit: false;
$prefix-for-mozilla: false;
$prefix-for-microsoft: false;
$prefix-for-opera: false;
$prefix-for-spec: false;
}

View File

@@ -1,27 +1,28 @@
@mixin retina-image($filename, $background-size, $extension: png, $retina-filename: null, $retina-suffix: _2x, $asset-pipeline: $asset-pipeline) {
@mixin retina-image($filename, $background-size, $extension: png, $retina-filename: null, $asset-pipeline: false) {
@if $asset-pipeline {
background-image: image-url("#{$filename}.#{$extension}");
background-image: image_url($filename + "." + $extension);
}
@else {
background-image: url("#{$filename}.#{$extension}");
background-image: url($filename + "." + $extension);
}
@include hidpi {
@if $asset-pipeline {
@if $retina-filename {
background-image: image-url("#{$retina-filename}.#{$extension}");
background-image: image_url($retina-filename + "." + $extension);
}
@else {
background-image: image-url("#{$filename}#{$retina-suffix}.#{$extension}");
background-image: image_url($filename + "@2x" + "." + $extension);
}
}
@else {
@if $retina-filename {
background-image: url("#{$retina-filename}.#{$extension}");
background-image: url($retina-filename + "." + $extension);
}
@else {
background-image: url("#{$filename}#{$retina-suffix}.#{$extension}");
background-image: url($filename + "@2x" + "." + $extension);
}
}

View File

@@ -1,16 +1,44 @@
@mixin size($size) {
$height: nth($size, 1);
$width: $height;
@if length($size) == 1 {
@if $size == auto {
width: $size;
height: $size;
}
@if length($size) > 1 {
@else if unitless($size) {
width: $size + px;
height: $size + px;
}
@else if not(unitless($size)) {
width: $size;
height: $size;
}
}
// Width x Height
@if length($size) == 2 {
$width: nth($size, 1);
$height: nth($size, 2);
}
@if $height == auto or (type-of($height) == number and not unitless($height)) {
height: $height;
}
@if $width == auto {
width: $width;
}
@else if not(unitless($width)) {
width: $width;
}
@else if unitless($width) {
width: $width + px;
}
@if $width == auto or (type-of($width) == number and not unitless($width)) {
width: $width;
@if $height == auto {
height: $height;
}
@else if not(unitless($height)) {
height: $height;
}
@else if unitless($height) {
height: $height + px;
}
}
}

View File

@@ -1,5 +1,5 @@
// CSS cubic-bezier timing functions. Timing functions courtesy of jquery.easie (github.com/jaukia/easie)
// Timing functions are the same as demo'ed here: http://jqueryui.com/resources/demos/effect/easing.html
// Timing functions are the same as demo'ed here: http://jqueryui.com/demos/effect/easing.html
// EASE IN
$ease-in-quad: cubic-bezier(0.550, 0.085, 0.680, 0.530);

View File

@@ -2,82 +2,44 @@
height: 0;
width: 0;
$width: nth($size, 1);
$height: nth($size, length($size));
$foreground-color: nth($color, 1);
$background-color: if(length($color) == 2, nth($color, 2), transparent);
@if ($direction == up) or ($direction == down) or ($direction == right) or ($direction == left) {
$width: $width / 2;
$height: if(length($size) > 1, $height, $height/2);
border-color: transparent;
border-style: solid;
border-width: $size / 2;
@if $direction == up {
border-left: $width solid $background-color;
border-right: $width solid $background-color;
border-bottom: $height solid $foreground-color;
border-bottom-color: $color;
} @else if $direction == right {
border-top: $width solid $background-color;
border-bottom: $width solid $background-color;
border-left: $height solid $foreground-color;
border-left-color: $color;
} @else if $direction == down {
border-left: $width solid $background-color;
border-right: $width solid $background-color;
border-top: $height solid $foreground-color;
border-top-color: $color;
} @else if $direction == left {
border-top: $width solid $background-color;
border-bottom: $width solid $background-color;
border-right: $height solid $foreground-color;
border-right-color: $color;
}
}
@else if ($direction == up-right) or ($direction == up-left) {
border-top: $height solid $foreground-color;
border-top: $size solid $color;
@if $direction == up-right {
border-left: $width solid $background-color;
border-left: $size solid transparent;
} @else if $direction == up-left {
border-right: $width solid $background-color;
border-right: $size solid transparent;
}
}
@else if ($direction == down-right) or ($direction == down-left) {
border-bottom: $height solid $foreground-color;
border-bottom: $size solid $color;
@if $direction == down-right {
border-left: $width solid $background-color;
border-left: $size solid transparent;
} @else if $direction == down-left {
border-right: $width solid $background-color;
border-right: $size solid transparent;
}
}
@else if ($direction == inset-up) {
border-width: $height $width;
border-style: solid;
border-color: $background-color $background-color $foreground-color;
}
@else if ($direction == inset-down) {
border-width: $height $width;
border-style: solid;
border-color: $foreground-color $background-color $background-color;
}
@else if ($direction == inset-right) {
border-width: $width $height;
border-style: solid;
border-color: $background-color $background-color $background-color $foreground-color;
}
@else if ($direction == inset-left) {
border-width: $width $height;
border-style: solid;
border-color: $background-color $foreground-color $background-color $background-color;
}
}

View File

@@ -1,8 +0,0 @@
@mixin word-wrap($wrap: break-word) {
word-wrap: $wrap;
@if $wrap == break-word {
overflow-wrap: break-word;
word-break: break-all;
}
}

View File

@@ -4,39 +4,45 @@
//************************************************************************//
@mixin background-image($images...) {
$webkit-images: ();
$spec-images: ();
@each $image in $images {
$webkit-image: ();
$spec-image: ();
@if (type-of($image) == string) {
$url-str: str-slice($image, 0, 3);
$gradient-type: str-slice($image, 0, 6);
@if $url-str == "url" {
$webkit-image: $image;
$spec-image: $image;
}
@else if $gradient-type == "linear" {
$gradients: _linear-gradient-parser($image);
$webkit-image: map-get($gradients, webkit-image);
$spec-image: map-get($gradients, spec-image);
}
@else if $gradient-type == "radial" {
$gradients: _radial-gradient-parser($image);
$webkit-image: map-get($gradients, webkit-image);
$spec-image: map-get($gradients, spec-image);
}
}
$webkit-images: append($webkit-images, $webkit-image, comma);
$spec-images: append($spec-images, $spec-image, comma);
}
background-image: $webkit-images;
background-image: $spec-images;
background-image: _add-prefix($images, webkit);
background-image: _add-prefix($images);
}
@function _add-prefix($images, $vendor: false) {
$images-prefixed: ();
$gradient-positions: false;
@for $i from 1 through length($images) {
$type: type-of(nth($images, $i)); // Get type of variable - List or String
// If variable is a list - Gradient
@if $type == list {
$gradient-type: nth(nth($images, $i), 1); // linear or radial
$gradient-pos: null;
$gradient-args: null;
@if ($gradient-type == linear) or ($gradient-type == radial) {
$gradient-pos: nth(nth($images, $i), 2); // Get gradient position
$gradient-args: nth(nth($images, $i), 3); // Get actual gradient (red, blue)
}
@else {
$gradient-args: nth(nth($images, $i), 2); // Get actual gradient (red, blue)
}
$gradient-positions: _gradient-positions-parser($gradient-type, $gradient-pos);
$gradient: _render-gradients($gradient-positions, $gradient-args, $gradient-type, $vendor);
$images-prefixed: append($images-prefixed, $gradient, comma);
}
// If variable is a string - Image
@else if $type == string {
$images-prefixed: join($images-prefixed, nth($images, $i), comma);
}
}
@return $images-prefixed;
}
//Examples:
//@include background-image(linear-gradient(top, orange, red));
//@include background-image(radial-gradient(50% 50%, cover circle, orange, red));
//@include background-image(url("/images/a.png"), linear-gradient(orange, red));
//@include background-image(url("image.png"), linear-gradient(orange, red), url("image.png"));
//@include background-image(linear-gradient(hsla(0, 100%, 100%, 0.25) 0%, hsla(0, 100%, 100%, 0.08) 50%, transparent 50%), linear-gradient(orange, red));

View File

@@ -3,53 +3,101 @@
// notation.
//************************************************************************//
@mixin background($backgrounds...) {
$webkit-backgrounds: ();
$spec-backgrounds: ();
@mixin background(
$background-1 , $background-2: false,
$background-3: false, $background-4: false,
$background-5: false, $background-6: false,
$background-7: false, $background-8: false,
$background-9: false, $background-10: false,
$fallback: false
) {
$backgrounds: compact($background-1, $background-2,
$background-3, $background-4,
$background-5, $background-6,
$background-7, $background-8,
$background-9, $background-10);
@each $background in $backgrounds {
$webkit-background: ();
$spec-background: ();
$background-type: type-of($background);
@if $background-type == string or list {
$background-str: if($background-type == list, nth($background, 1), $background);
$url-str: str-slice($background-str, 0, 3);
$gradient-type: str-slice($background-str, 0, 6);
@if $url-str == "url" {
$webkit-background: $background;
$spec-background: $background;
}
@else if $gradient-type == "linear" {
$gradients: _linear-gradient-parser("#{$background}");
$webkit-background: map-get($gradients, webkit-image);
$spec-background: map-get($gradients, spec-image);
}
@else if $gradient-type == "radial" {
$gradients: _radial-gradient-parser("#{$background}");
$webkit-background: map-get($gradients, webkit-image);
$spec-background: map-get($gradients, spec-image);
}
@else {
$webkit-background: $background;
$spec-background: $background;
}
}
@else {
$webkit-background: $background;
$spec-background: $background;
}
$webkit-backgrounds: append($webkit-backgrounds, $webkit-background, comma);
$spec-backgrounds: append($spec-backgrounds, $spec-background, comma);
$fallback-color: false;
@if (type-of($fallback) == color) or ($fallback == "transparent") {
$fallback-color: $fallback;
}
@else {
$fallback-color: _extract-background-color($backgrounds);
}
background: $webkit-backgrounds;
background: $spec-backgrounds;
@if $fallback-color {
background-color: $fallback-color;
}
background: _background-add-prefix($backgrounds, webkit);
background: _background-add-prefix($backgrounds);
}
@function _extract-background-color($backgrounds) {
$final-bg-layer: nth($backgrounds, length($backgrounds));
@if type-of($final-bg-layer) == list {
@for $i from 1 through length($final-bg-layer) {
$value: nth($final-bg-layer, $i);
@if type-of($value) == color {
@return $value;
}
}
}
@return false;
}
@function _background-add-prefix($backgrounds, $vendor: false) {
$backgrounds-prefixed: ();
@for $i from 1 through length($backgrounds) {
$shorthand: nth($backgrounds, $i); // Get member for current index
$type: type-of($shorthand); // Get type of variable - List (gradient) or String (image)
// If shorthand is a list (gradient)
@if $type == list {
$first-member: nth($shorthand, 1); // Get first member of shorthand
// Linear Gradient
@if index(linear radial, nth($first-member, 1)) {
$gradient-type: nth($first-member, 1); // linear || radial
$gradient-args: false;
$gradient-positions: false;
$shorthand-start: false;
@if type-of($first-member) == list { // Linear gradient plus additional shorthand values - lg(red,orange)repeat,...
$gradient-positions: nth($first-member, 2);
$gradient-args: nth($first-member, 3);
$shorthand-start: 2;
}
@else { // Linear gradient only - lg(red,orange),...
$gradient-positions: nth($shorthand, 2);
$gradient-args: nth($shorthand, 3); // Get gradient (red, blue)
}
$gradient-positions: _gradient-positions-parser($gradient-type, $gradient-positions);
$gradient: _render-gradients($gradient-positions, $gradient-args, $gradient-type, $vendor);
// Append any additional shorthand args to gradient
@if $shorthand-start {
@for $j from $shorthand-start through length($shorthand) {
$gradient: join($gradient, nth($shorthand, $j), space);
}
}
$backgrounds-prefixed: append($backgrounds-prefixed, $gradient, comma);
}
// Image with additional properties
@else {
$backgrounds-prefixed: append($backgrounds-prefixed, $shorthand, comma);
}
}
// If shorthand is a simple string (color or image)
@else if $type == string {
$backgrounds-prefixed: join($backgrounds-prefixed, $shorthand, comma);
}
}
@return $backgrounds-prefixed;
}
//Examples:
//@include background(linear-gradient(top, orange, red));
//@include background(radial-gradient(circle at 40% 40%, orange, red));
//@include background(url("/images/a.png") no-repeat, linear-gradient(orange, red));
//@include background(url("image.png") center center, linear-gradient(orange, red), url("image.png"));

View File

@@ -1,53 +1,48 @@
@mixin border-image($borders...) {
$webkit-borders: ();
$spec-borders: ();
@mixin border-image($images) {
-webkit-border-image: _border-add-prefix($images, webkit);
-moz-border-image: _border-add-prefix($images, moz);
-o-border-image: _border-add-prefix($images, o);
border-image: _border-add-prefix($images);
}
@each $border in $borders {
$webkit-border: ();
$spec-border: ();
$border-type: type-of($border);
@function _border-add-prefix($images, $vendor: false) {
$border-image: null;
$images-type: type-of(nth($images, 1));
$first-var: nth(nth($images, 1), 1); // Get type of Gradient (Linear || radial)
@if $border-type == string or list {
$border-str: if($border-type == list, nth($border, 1), $border);
$url-str: str-slice($border-str, 0, 3);
$gradient-type: str-slice($border-str, 0, 6);
@if $url-str == "url" {
$webkit-border: $border;
$spec-border: $border;
}
@else if $gradient-type == "linear" {
$gradients: _linear-gradient-parser("#{$border}");
$webkit-border: map-get($gradients, webkit-image);
$spec-border: map-get($gradients, spec-image);
}
@else if $gradient-type == "radial" {
$gradients: _radial-gradient-parser("#{$border}");
$webkit-border: map-get($gradients, webkit-image);
$spec-border: map-get($gradients, spec-image);
}
@else {
$webkit-border: $border;
$spec-border: $border;
}
// If input is a gradient
@if $images-type == string {
@if ($first-var == "linear") or ($first-var == "radial") {
$gradient-type: nth($images, 1); // Get type of gradient (linear || radial)
$gradient-pos: nth($images, 2); // Get gradient position
$gradient-args: nth($images, 3); // Get actual gradient (red, blue)
$gradient-positions: _gradient-positions-parser($gradient-type, $gradient-pos);
$border-image: _render-gradients($gradient-positions, $gradient-args, $gradient-type, $vendor);
}
// If input is a URL
@else {
$webkit-border: $border;
$spec-border: $border;
$border-image: $images;
}
$webkit-borders: append($webkit-borders, $webkit-border, comma);
$spec-borders: append($spec-borders, $spec-border, comma);
}
// If input is gradient or url + additional args
@else if $images-type == list {
$type: type-of(nth($images, 1)); // Get type of variable - List or String
-webkit-border-image: $webkit-borders;
border-image: $spec-borders;
border-style: solid;
// If variable is a list - Gradient
@if $type == list {
$gradient: nth($images, 1);
$gradient-type: nth($gradient, 1); // Get type of gradient (linear || radial)
$gradient-pos: nth($gradient, 2); // Get gradient position
$gradient-args: nth($gradient, 3); // Get actual gradient (red, blue)
$gradient-positions: _gradient-positions-parser($gradient-type, $gradient-pos);
$border-image: _render-gradients($gradient-positions, $gradient-args, $gradient-type, $vendor);
@for $i from 2 through length($images) {
$border-image: append($border-image, nth($images, $i));
}
}
}
@return $border-image;
}
//Examples:
@@ -57,3 +52,4 @@
// @include border-image(linear-gradient(45deg, orange, yellow) stretch);
// @include border-image(linear-gradient(45deg, orange, yellow) 20 30 40 50 stretch round);
// @include border-image(radial-gradient(top, cover, orange, yellow, orange));

View File

@@ -1,4 +0,0 @@
@mixin calc($property, $value) {
#{$property}: -webkit-calc(#{$value});
#{$property}: calc(#{$value});
}

View File

@@ -15,7 +15,7 @@
@mixin column-fill($arg: auto) {
// auto || length
@include prefixer(column-fill, $arg, webkit moz spec);
@include prefixer(columns-fill, $arg, webkit moz spec);
}
@mixin column-rule($arg) {

View File

@@ -1,5 +0,0 @@
@mixin filter($function: none) {
// <filter-function> [<filter-function]* | none
@include prefixer(filter, $function, webkit spec);
}

View File

@@ -11,7 +11,6 @@
@mixin display-box {
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox; // IE 10
display: box;
}
@@ -23,19 +22,16 @@
@mixin box-pack($pack: start) {
// start|end|center|justify
@include prefixer(box-pack, $pack, webkit moz spec);
-ms-flex-pack: $pack; // IE 10
}
@mixin box-align($align: stretch) {
// start|end|center|baseline|stretch
@include prefixer(box-align, $align, webkit moz spec);
-ms-flex-align: $align; // IE 10
}
@mixin box-direction($direction: normal) {
// normal|reverse|inherit
@include prefixer(box-direction, $direction, webkit moz spec);
-ms-flex-direction: $direction; // IE 10
}
@mixin box-lines($lines: single) {
@@ -45,277 +41,12 @@
@mixin box-ordinal-group($int: 1) {
@include prefixer(box-ordinal-group, $int, webkit moz spec);
-ms-flex-order: $int; // IE 10
}
@mixin box-flex($value: 0.0) {
@include prefixer(box-flex, $value, webkit moz spec);
-ms-flex: $value; // IE 10
}
@mixin box-flex-group($int: 1) {
@include prefixer(box-flex-group, $int, webkit moz spec);
}
// CSS3 Flexible Box Model and property defaults
// Unified attributes for 2009, 2011, and 2012 flavours.
// 2009 - display (box | inline-box)
// 2011 - display (flexbox | inline-flexbox)
// 2012 - display (flex | inline-flex)
@mixin display($value) {
// flex | inline-flex
@if $value == "flex" {
// 2009
display: -webkit-box;
display: -moz-box;
display: box;
// 2012
display: -webkit-flex;
display: -moz-flex;
display: -ms-flexbox; // 2011 (IE 10)
display: flex;
}
@elseif $value == "inline-flex" {
display: -webkit-inline-box;
display: -moz-inline-box;
display: inline-box;
display: -webkit-inline-flex;
display: -moz-inline-flex;
display: -ms-inline-flexbox;
display: inline-flex;
}
@else {
display: $value;
}
}
// 2009 - box-flex (integer)
// 2011 - flex (decimal | width decimal)
// 2012 - flex (integer integer width)
@mixin flex($value) {
// Grab flex-grow for older browsers.
$flex-grow: nth($value, 1);
// 2009
@include prefixer(box-flex, $flex-grow, webkit moz spec);
// 2011 (IE 10), 2012
@include prefixer(flex, $value, webkit moz ms spec);
}
// 2009 - box-orient ( horizontal | vertical | inline-axis | block-axis)
// - box-direction (normal | reverse)
// 2011 - flex-direction (row | row-reverse | column | column-reverse)
// 2012 - flex-direction (row | row-reverse | column | column-reverse)
@mixin flex-direction($value: row) {
// Alt values.
$value-2009: $value;
$value-2011: $value;
$direction: "normal";
@if $value == row {
$value-2009: horizontal;
}
@elseif $value == "row-reverse" {
$value-2009: horizontal;
$direction: reverse;
}
@elseif $value == column {
$value-2009: vertical;
}
@elseif $value == "column-reverse" {
$value-2009: vertical;
$direction: reverse;
}
// 2009
@include prefixer(box-orient, $value-2009, webkit moz spec);
@if $direction == "reverse" {
@include prefixer(box-direction, $direction, webkit moz spec);
}
// 2012
@include prefixer(flex-direction, $value, webkit moz spec);
// 2011 (IE 10)
-ms-flex-direction: $value;
}
// 2009 - box-lines (single | multiple)
// 2011 - flex-wrap (nowrap | wrap | wrap-reverse)
// 2012 - flex-wrap (nowrap | wrap | wrap-reverse)
@mixin flex-wrap($value: nowrap) {
// Alt values.
$alt-value: $value;
@if $value == nowrap {
$alt-value: single;
}
@elseif $value == wrap {
$alt-value: multiple;
}
@elseif $value == "wrap-reverse" {
$alt-value: multiple;
}
@include prefixer(box-lines, $alt-value, webkit moz spec);
@include prefixer(flex-wrap, $value, webkit moz ms spec);
}
// 2009 - TODO: parse values into flex-direction/flex-wrap
// 2011 - TODO: parse values into flex-direction/flex-wrap
// 2012 - flex-flow (flex-direction || flex-wrap)
@mixin flex-flow($value) {
@include prefixer(flex-flow, $value, webkit moz spec);
}
// 2009 - box-ordinal-group (integer)
// 2011 - flex-order (integer)
// 2012 - order (integer)
@mixin order($int: 0) {
// 2009
@include prefixer(box-ordinal-group, $int, webkit moz spec);
// 2012
@include prefixer(order, $int, webkit moz spec);
// 2011 (IE 10)
-ms-flex-order: $int;
}
// 2012 - flex-grow (number)
@mixin flex-grow($number: 0) {
@include prefixer(flex-grow, $number, webkit moz spec);
-ms-flex-positive: $number;
}
// 2012 - flex-shrink (number)
@mixin flex-shrink($number: 1) {
@include prefixer(flex-shrink, $number, webkit moz spec);
-ms-flex-negative: $number;
}
// 2012 - flex-basis (number)
@mixin flex-basis($width: auto) {
@include prefixer(flex-basis, $width, webkit moz spec);
-ms-flex-preferred-size: $width;
}
// 2009 - box-pack (start | end | center | justify)
// 2011 - flex-pack (start | end | center | justify)
// 2012 - justify-content (flex-start | flex-end | center | space-between | space-around)
@mixin justify-content ($value: flex-start) {
// Alt values.
$alt-value: $value;
@if $value == "flex-start" {
$alt-value: start;
}
@elseif $value == "flex-end" {
$alt-value: end;
}
@elseif $value == "space-between" {
$alt-value: justify;
}
@elseif $value == "space-around" {
$alt-value: center;
}
// 2009
@include prefixer(box-pack, $alt-value, webkit moz spec);
// 2012
@include prefixer(justify-content, $value, webkit moz ms o spec);
// 2011 (IE 10)
-ms-flex-pack: $alt-value;
}
// 2009 - box-align (start | end | center | baseline | stretch)
// 2011 - flex-align (start | end | center | baseline | stretch)
// 2012 - align-items (flex-start | flex-end | center | baseline | stretch)
@mixin align-items($value: stretch) {
$alt-value: $value;
@if $value == "flex-start" {
$alt-value: start;
}
@elseif $value == "flex-end" {
$alt-value: end;
}
// 2009
@include prefixer(box-align, $alt-value, webkit moz spec);
// 2012
@include prefixer(align-items, $value, webkit moz ms o spec);
// 2011 (IE 10)
-ms-flex-align: $alt-value;
}
// 2011 - flex-item-align (auto | start | end | center | baseline | stretch)
// 2012 - align-self (auto | flex-start | flex-end | center | baseline | stretch)
@mixin align-self($value: auto) {
$value-2011: $value;
@if $value == "flex-start" {
$value-2011: start;
}
@elseif $value == "flex-end" {
$value-2011: end;
}
// 2012
@include prefixer(align-self, $value, webkit moz spec);
// 2011 (IE 10)
-ms-flex-item-align: $value-2011;
}
// 2011 - flex-line-pack (start | end | center | justify | distribute | stretch)
// 2012 - align-content (flex-start | flex-end | center | space-between | space-around | stretch)
@mixin align-content($value: stretch) {
$value-2011: $value;
@if $value == "flex-start" {
$value-2011: start;
}
@elseif $value == "flex-end" {
$value-2011: end;
}
@elseif $value == "space-between" {
$value-2011: justify;
}
@elseif $value == "space-around" {
$value-2011: distribute;
}
// 2012
@include prefixer(align-content, $value, webkit moz spec);
// 2011 (IE 10)
-ms-flex-line-pack: $value-2011;
}

View File

@@ -1,6 +1,6 @@
// Order of the includes matters, and it is: normal, bold, italic, bold+italic.
@mixin font-face($font-family, $file-path, $weight: normal, $style: normal, $asset-pipeline: $asset-pipeline) {
@mixin font-face($font-family, $file-path, $weight: normal, $style: normal, $asset-pipeline: false ) {
@font-face {
font-family: $font-family;
font-weight: $weight;

View File

@@ -1,10 +0,0 @@
// Font feature settings mixin and property default.
// Examples: @include font-feature-settings("liga");
// @include font-feature-settings("lnum" false);
// @include font-feature-settings("pnum" 1, "kern" 0);
// @include font-feature-settings("ss01", "ss02");
@mixin font-feature-settings($settings...) {
@if length($settings) == 0 { $settings: none; }
@include prefixer(font-feature-settings, $settings, webkit moz ms spec);
}

View File

@@ -1,4 +0,0 @@
@mixin hyphens($hyphenation: none) {
// none | manual | auto
@include prefixer(hyphens, $hyphenation, webkit moz ms spec);
}

View File

@@ -1,11 +1,10 @@
@mixin image-rendering ($mode:auto) {
@mixin image-rendering ($mode:optimizeQuality) {
@if ($mode == crisp-edges) {
-ms-interpolation-mode: nearest-neighbor; // IE8+
@if ($mode == optimize-contrast) {
image-rendering: -moz-crisp-edges;
image-rendering: -o-crisp-edges;
image-rendering: -webkit-optimize-contrast;
image-rendering: crisp-edges;
image-rendering: optimize-contrast;
}
@else {

View File

@@ -0,0 +1,8 @@
// Legacy support for inline-block in IE7 (maybe IE6)
@mixin inline-block {
display: inline-block;
vertical-align: baseline;
zoom: 1;
*display: inline;
*vertical-align: auto;
}

View File

@@ -8,28 +8,36 @@
@if $original-prefix-for-webkit {
@include disable-prefix-for-all();
$prefix-for-webkit: true !global;
$prefix-for-webkit: true;
@-webkit-keyframes #{$name} {
@content;
}
}
@if $original-prefix-for-mozilla {
@include disable-prefix-for-all();
$prefix-for-mozilla: true !global;
$prefix-for-mozilla: true;
@-moz-keyframes #{$name} {
@content;
}
}
$prefix-for-webkit: $original-prefix-for-webkit !global;
$prefix-for-mozilla: $original-prefix-for-mozilla !global;
$prefix-for-microsoft: $original-prefix-for-microsoft !global;
$prefix-for-opera: $original-prefix-for-opera !global;
$prefix-for-spec: $original-prefix-for-spec !global;
@if $original-prefix-for-opera {
@include disable-prefix-for-all();
$prefix-for-opera: true;
@-o-keyframes #{$name} {
@content;
}
}
@if $original-prefix-for-spec {
@include disable-prefix-for-all();
$prefix-for-spec: true;
@keyframes #{$name} {
@content;
}
}
$prefix-for-webkit: $original-prefix-for-webkit;
$prefix-for-mozilla: $original-prefix-for-mozilla;
$prefix-for-microsoft: $original-prefix-for-microsoft;
$prefix-for-opera: $original-prefix-for-opera;
$prefix-for-spec: $original-prefix-for-spec;
}

View File

@@ -1,9 +1,11 @@
@mixin linear-gradient($pos, $G1, $G2: null,
$G3: null, $G4: null,
$G5: null, $G6: null,
$G7: null, $G8: null,
$G9: null, $G10: null,
$fallback: null) {
@mixin linear-gradient($pos, $G1, $G2: false,
$G3: false, $G4: false,
$G5: false, $G6: false,
$G7: false, $G8: false,
$G9: false, $G10: false,
$deprecated-pos1: left top,
$deprecated-pos2: left bottom,
$fallback: false) {
// Detect what type of value exists in $pos
$pos-type: type-of(nth($pos, 1));
$pos-spec: null;
@@ -22,7 +24,7 @@
$pos-spec: nth($positions, 2);
}
$full: $G1, $G2, $G3, $G4, $G5, $G6, $G7, $G8, $G9, $G10;
$full: compact($G1, $G2, $G3, $G4, $G5, $G6, $G7, $G8, $G9, $G10);
// Set $G1 as the default fallback color
$fallback-color: nth($G1, 1);
@@ -33,6 +35,7 @@
}
background-color: $fallback-color;
background-image: _deprecated-webkit-gradient(linear, $deprecated-pos1, $deprecated-pos2, $full); // Safari <= 5.0
background-image: -webkit-linear-gradient($pos-degree $full); // Safari 5.1+, Chrome
background-image: unquote("linear-gradient(#{$pos-spec}#{$full})");
}

View File

@@ -1,8 +1,29 @@
$placeholders: '-webkit-input-placeholder',
'-moz-placeholder',
'-ms-input-placeholder';
@mixin placeholder {
$placeholders: ":-webkit-input" ":-moz" "-moz" "-ms-input";
@each $placeholder in $placeholders {
&:#{$placeholder}-placeholder {
@content;
@if $placeholder == "-webkit-input-placeholder" {
&::#{$placeholder} {
@content;
}
}
@else if $placeholder == "-moz-placeholder" {
// FF 18-
&:#{$placeholder} {
@content;
}
// FF 19+
&::#{$placeholder} {
@content;
}
}
@else {
&:#{$placeholder} {
@content;
}
}
}
}

View File

@@ -1,12 +1,16 @@
// Requires Sass 3.1+
@mixin radial-gradient($G1, $G2,
$G3: null, $G4: null,
$G5: null, $G6: null,
$G7: null, $G8: null,
$G9: null, $G10: null,
$G3: false, $G4: false,
$G5: false, $G6: false,
$G7: false, $G8: false,
$G9: false, $G10: false,
$pos: null,
$shape-size: null,
$fallback: null) {
$deprecated-pos1: center center,
$deprecated-pos2: center center,
$deprecated-radius1: 0,
$deprecated-radius2: 460,
$fallback: false) {
$data: _radial-arg-parser($G1, $G2, $pos, $shape-size);
$G1: nth($data, 1);
@@ -14,7 +18,7 @@
$pos: nth($data, 3);
$shape-size: nth($data, 4);
$full: $G1, $G2, $G3, $G4, $G5, $G6, $G7, $G8, $G9, $G10;
$full: compact($G1, $G2, $G3, $G4, $G5, $G6, $G7, $G8, $G9, $G10);
// Strip deprecated cover/contain for spec
$shape-size-spec: _shape-size-stripper($shape-size);
@@ -34,6 +38,7 @@
$shape-size-spec: if(($shape-size-spec != ' ') and ($pos == null), '#{$shape-size-spec}, ', '#{$shape-size-spec} ');
background-color: $fallback-color;
background-image: _deprecated-webkit-gradient(radial, $deprecated-pos1, $deprecated-pos2, $full, $deprecated-radius1, $deprecated-radius2); // Safari <= 5.0 && IOS 4
background-image: -webkit-radial-gradient(unquote(#{$pos}#{$shape-size}#{$full}));
background-image: unquote("radial-gradient(#{$shape-size-spec}#{$pos-spec}#{$full})");
}

View File

@@ -1,59 +1,16 @@
// Shorthand mixin. Supports multiple parentheses-deliminated values for each variable.
// Example: @include transition (all 2s ease-in-out);
// @include transition (opacity 1s ease-in 2s, width 2s ease-out);
// @include transition-property (transform, opacity);
// Example: @include transition (all, 2.0s, ease-in-out);
// @include transition ((opacity, width), (1.0s, 2.0s), ease-in, (0, 2s));
// @include transition ($property:(opacity, width), $delay: (1.5s, 2.5s));
@mixin transition ($properties...) {
// Fix for vendor-prefix transform property
$needs-prefixes: false;
$webkit: ();
$moz: ();
$spec: ();
// Create lists for vendor-prefixed transform
@each $list in $properties {
@if nth($list, 1) == "transform" {
$needs-prefixes: true;
$list1: -webkit-transform;
$list2: -moz-transform;
$list3: ();
@each $var in $list {
$list3: join($list3, $var);
@if $var != "transform" {
$list1: join($list1, $var);
$list2: join($list2, $var);
}
}
$webkit: append($webkit, $list1);
$moz: append($moz, $list2);
$spec: append($spec, $list3);
}
// Create lists for non-prefixed transition properties
@else {
$webkit: append($webkit, $list, comma);
$moz: append($moz, $list, comma);
$spec: append($spec, $list, comma);
}
@if length($properties) >= 1 {
@include prefixer(transition, $properties, webkit moz spec);
}
@if $needs-prefixes {
-webkit-transition: $webkit;
-moz-transition: $moz;
transition: $spec;
}
@else {
@if length($properties) >= 1 {
@include prefixer(transition, $properties, webkit moz spec);
}
@else {
$properties: all 0.15s ease-out 0s;
@include prefixer(transition, $properties, webkit moz spec);
}
$properties: all 0.15s ease-out 0;
@include prefixer(transition, $properties, webkit moz spec);
}
}

View File

@@ -1,11 +0,0 @@
@function assign-inputs($inputs, $pseudo: null) {
$list : ();
@each $input in $inputs {
$input: unquote($input);
$input: if($pseudo, $input + ":" + $pseudo, $input);
$list: append($list, $input, comma);
}
@return $list;
}

View File

@@ -1,13 +0,0 @@
// Programatically determines whether a color is light or dark
// Returns a boolean
// More details here http://robots.thoughtbot.com/closer-look-color-lightness
@function is-light($hex-color) {
$-local-red: red(rgba($hex-color, 1.0));
$-local-green: green(rgba($hex-color, 1.0));
$-local-blue: blue(rgba($hex-color, 1.0));
$-local-lightness: ($-local-red * 0.2126 + $-local-green * 0.7152 + $-local-blue * 0.0722) / 255;
@return $-local-lightness > .6;
}

View File

@@ -0,0 +1,11 @@
// Remove `false` values from a list
@function compact($vars...) {
$list: ();
@each $var in $vars {
@if $var {
$list: append($list, $var, comma);
}
}
@return $list;
}

View File

@@ -1,3 +0,0 @@
@function golden-ratio($value, $increment) {
@return modular-scale($value, $increment, $golden)
}

View File

@@ -0,0 +1,13 @@
@function linear-gradient($pos, $gradients...) {
$type: linear;
$pos-type: type-of(nth($pos, 1));
// if $pos doesn't exist, fix $gradient
@if ($pos-type == color) or (nth($pos, 1) == "transparent") {
$gradients: zip($pos $gradients);
$pos: false;
}
$type-gradient: $type, $pos, $gradients;
@return $type-gradient;
}

View File

@@ -1,66 +1,40 @@
// Scaling Variables
$golden: 1.618;
$minor-second: 1.067;
$major-second: 1.125;
$minor-third: 1.2;
$major-third: 1.25;
$perfect-fourth: 1.333;
$augmented-fourth: 1.414;
$perfect-fifth: 1.5;
$minor-sixth: 1.6;
$major-sixth: 1.667;
$minor-seventh: 1.778;
$major-seventh: 1.875;
$octave: 2;
$major-tenth: 2.5;
$major-eleventh: 2.667;
$major-twelfth: 3;
$double-octave: 4;
@function modular-scale($value, $increment, $ratio) {
$v1: nth($value, 1);
$v2: nth($value, length($value));
$value: $v1;
// scale $v2 to just above $v1
@while $v2 > $v1 {
$v2: ($v2 / $ratio); // will be off-by-1
}
@while $v2 < $v1 {
$v2: ($v2 * $ratio); // will fix off-by-1
}
// check AFTER scaling $v2 to prevent double-counting corner-case
$double-stranded: $v2 > $v1;
@if $increment > 0 {
@for $i from 1 through $increment {
@if $double-stranded and ($v1 * $ratio) > $v2 {
$value: $v2;
$v2: ($v2 * $ratio);
} @else {
$v1: ($v1 * $ratio);
$value: $v1;
}
$value: ($value * $ratio);
}
}
@if $increment < 0 {
// adjust $v2 to just below $v1
@if $double-stranded {
$v2: ($v2 / $ratio);
}
@for $i from $increment through -1 {
@if $double-stranded and ($v1 / $ratio) < $v2 {
$value: $v2;
$v2: ($v2 / $ratio);
} @else {
$v1: ($v1 / $ratio);
$value: $v1;
}
$increment: abs($increment);
@for $i from 1 through $increment {
$value: ($value / $ratio);
}
}
@return $value;
}
// div {
// Increment Up GR with positive value
// font-size: modular-scale(14px, 1, 1.618); // returns: 22.652px
//
// Increment Down GR with negative value
// font-size: modular-scale(14px, -1, 1.618); // returns: 8.653px
//
// Can be used with ceil(round up) or floor(round down)
// font-size: floor( modular-scale(14px, 1, 1.618) ); // returns: 22px
// font-size: ceil( modular-scale(14px, 1, 1.618) ); // returns: 23px
// }
//
// modularscale.com
@function golden-ratio($value, $increment) {
@return modular-scale($value, $increment, 1.618)
}
// div {
// font-size: golden-ratio(14px, 1); // returns: 22.652px
// }
//
// goldenratiocalculator.com

View File

@@ -2,12 +2,7 @@
// eg. for a relational value of 12px write em(12) when the parent is 16px
// if the parent is another value say 24px write em(12, 24)
@function em($pxval, $base: $em-base) {
@if not unitless($pxval) {
$pxval: strip-units($pxval);
}
@if not unitless($base) {
$base: strip-units($base);
}
@function em($pxval, $base: 16) {
@return ($pxval / $base) * 1em;
}

View File

@@ -1,15 +0,0 @@
// Convert pixels to rems
// eg. for a relational value of 12px write rem(12)
// Assumes $em-base is the font-size of <html>
@function rem($pxval) {
@if not unitless($pxval) {
$pxval: strip-units($pxval);
}
$base: $em-base;
@if not unitless($base) {
$base: strip-units($base);
}
@return ($pxval / $base) * 1rem;
}

View File

@@ -0,0 +1,23 @@
// This function is required and used by the background-image mixin.
@function radial-gradient($G1, $G2,
$G3: false, $G4: false,
$G5: false, $G6: false,
$G7: false, $G8: false,
$G9: false, $G10: false,
$pos: null,
$shape-size: null) {
$data: _radial-arg-parser($G1, $G2, $pos, $shape-size);
$G1: nth($data, 1);
$G2: nth($data, 2);
$pos: nth($data, 3);
$shape-size: nth($data, 4);
$type: radial;
$gradient: compact($G1, $G2, $G3, $G4, $G5, $G6, $G7, $G8, $G9, $G10);
$type-gradient: $type, $shape-size $pos, $gradient;
@return $type-gradient;
}

View File

@@ -1,5 +0,0 @@
// Srtips the units from a value. e.g. 12px -> 12
@function strip-units($val) {
@return ($val / ($val * 0 + 1));
}

View File

@@ -1,17 +0,0 @@
// Convert shorthand to the 4-value syntax
@function unpack($shorthand) {
@if length($shorthand) == 1 {
@return nth($shorthand, 1) nth($shorthand, 1) nth($shorthand, 1) nth($shorthand, 1);
}
@else if length($shorthand) == 2 {
@return nth($shorthand, 1) nth($shorthand, 2) nth($shorthand, 1) nth($shorthand, 2);
}
@else if length($shorthand) == 3 {
@return nth($shorthand, 1) nth($shorthand, 2) nth($shorthand, 3) nth($shorthand, 2);
}
@else {
@return $shorthand;
}
}

View File

@@ -1,15 +0,0 @@
//************************************************************************//
// Helper function for str-to-num fn.
// Source: http://sassmeister.com/gist/9647408
//************************************************************************//
@function _convert-units($number, $unit) {
$strings: 'px' 'cm' 'mm' '%' 'ch' 'pica' 'in' 'em' 'rem' 'pt' 'pc' 'ex' 'vw' 'vh' 'vmin' 'vmax', 'deg', 'rad', 'grad', 'turn';
$units: 1px 1cm 1mm 1% 1ch 1pica 1in 1em 1rem 1pt 1pc 1ex 1vw 1vh 1vmin 1vmax, 1deg, 1rad, 1grad, 1turn;
$index: index($strings, $unit);
@if not $index {
@warn "Unknown unit `#{$unit}`.";
@return false;
}
@return $number * nth($units, $index);
}

View File

@@ -0,0 +1,39 @@
// Render Deprecated Webkit Gradient - Linear || Radial
//************************************************************************//
@function _deprecated-webkit-gradient($type,
$deprecated-pos1, $deprecated-pos2,
$full,
$deprecated-radius1: false, $deprecated-radius2: false) {
$gradient-list: ();
$gradient: false;
$full-length: length($full);
$percentage: false;
$gradient-type: $type;
@for $i from 1 through $full-length {
$gradient: nth($full, $i);
@if length($gradient) == 2 {
$color-stop: color-stop(nth($gradient, 2), nth($gradient, 1));
$gradient-list: join($gradient-list, $color-stop, comma);
}
@else if $gradient != null {
@if $i == $full-length {
$percentage: 100%;
}
@else {
$percentage: ($i - 1) * (100 / ($full-length - 1)) + "%";
}
$color-stop: color-stop(unquote($percentage), $gradient);
$gradient-list: join($gradient-list, $color-stop, comma);
}
}
@if $type == radial {
$gradient: -webkit-gradient(radial, $deprecated-pos1, $deprecated-radius1, $deprecated-pos2, $deprecated-radius2, $gradient-list);
}
@else if $type == linear {
$gradient: -webkit-gradient(linear, $deprecated-pos1, $deprecated-pos2, $gradient-list);
}
@return $gradient;
}

View File

@@ -1,8 +0,0 @@
//************************************************************************//
// Helper for linear-gradient-parser
//************************************************************************//
@function _is-num($char) {
$values: '0' '1' '2' '3' '4' '5' '6' '7' '8' '9' 0 1 2 3 4 5 6 7 8 9;
$index: index($values, $char);
@return if($index, true, false);
}

View File

@@ -1,25 +0,0 @@
// Private function for linear-gradient-parser
@function _linear-angle-parser($image, $first-val, $prefix, $suffix) {
$offset: null;
$unit-short: str-slice($first-val, str-length($first-val) - 2, str-length($first-val));
$unit-long: str-slice($first-val, str-length($first-val) - 3, str-length($first-val));
@if ($unit-long == "grad") or
($unit-long == "turn") {
$offset: if($unit-long == "grad", -100grad * 3, -0.75turn);
}
@else if ($unit-short == "deg") or
($unit-short == "rad") {
$offset: if($unit-short == "deg", -90 * 3, 1.6rad);
}
@if $offset {
$num: _str-to-num($first-val);
@return (
webkit-image: -webkit- + $prefix + ($offset - $num) + $suffix,
spec-image: $image
);
}
}

View File

@@ -1,41 +0,0 @@
@function _linear-gradient-parser($image) {
$image: unquote($image);
$gradients: ();
$start: str-index($image, "(");
$end: str-index($image, ",");
$first-val: str-slice($image, $start + 1, $end - 1);
$prefix: str-slice($image, 0, $start);
$suffix: str-slice($image, $end, str-length($image));
$has-multiple-vals: str-index($first-val, " ");
$has-single-position: unquote(_position-flipper($first-val) + "");
$has-angle: _is-num(str-slice($first-val, 0, 0));
@if $has-multiple-vals {
$gradients: _linear-side-corner-parser($image, $first-val, $prefix, $suffix, $has-multiple-vals);
}
@else if $has-single-position != "" {
$pos: unquote($has-single-position + "");
$gradients: (
webkit-image: -webkit- + $image,
spec-image: $prefix + "to " + $pos + $suffix
);
}
@else if $has-angle {
// Rotate degree for webkit
$gradients: _linear-angle-parser($image, $first-val, $prefix, $suffix);
}
@else {
$gradients: (
webkit-image: -webkit- + $image,
spec-image: $image
);
}
@return $gradients;
}

View File

@@ -11,7 +11,7 @@
$side: nth($pos, 2);
@if $length == 2 { // eg. to top
// Swap for backwards compatibility
// Swap for backwards compatability
$degree: _position-flipper(nth($pos, 2));
}
@else if $length == 3 { // eg. to top left
@@ -38,7 +38,7 @@
$spec: to $side $corner;
}
@else if $length == 1 {
// Swap for backwards compatibility
// Swap for backwards compatability
@if $type == string {
$degree: $pos;
$spec: to _position-flipper($pos);

View File

@@ -1,31 +0,0 @@
// Private function for linear-gradient-parser
@function _linear-side-corner-parser($image, $first-val, $prefix, $suffix, $has-multiple-vals) {
$val-1: str-slice($first-val, 0, $has-multiple-vals - 1 );
$val-2: str-slice($first-val, $has-multiple-vals + 1, str-length($first-val));
$val-3: null;
$has-val-3: str-index($val-2, " ");
@if $has-val-3 {
$val-3: str-slice($val-2, $has-val-3 + 1, str-length($val-2));
$val-2: str-slice($val-2, 0, $has-val-3 - 1);
}
$pos: _position-flipper($val-1) _position-flipper($val-2) _position-flipper($val-3);
$pos: unquote($pos + "");
// Use old spec for webkit
@if $val-1 == "to" {
@return (
webkit-image: -webkit- + $prefix + $pos + $suffix,
spec-image: $image
);
}
// Bring the code up to spec
@else {
@return (
webkit-image: -webkit- + $image,
spec-image: $prefix + "to " + $pos + $suffix
);
}
}

View File

@@ -22,7 +22,7 @@
$pos: $pos nth($value, $i);
}
}
$G1: null;
$G1: false;
}
// If not spec calculate correct values
@@ -38,7 +38,7 @@
$pos: $value;
@if $pos == $G1 {
$G1: null;
$G1: false;
}
}
@@ -55,11 +55,11 @@
$shape-size: $value;
@if $value == $G1 {
$G1: null;
$G1: false;
}
@else if $value == $G2 {
$G2: null;
$G2: false;
}
}
}

View File

@@ -1,50 +0,0 @@
@function _radial-gradient-parser($image) {
$image: unquote($image);
$gradients: ();
$start: str-index($image, "(");
$end: str-index($image, ",");
$first-val: str-slice($image, $start + 1, $end - 1);
$prefix: str-slice($image, 0, $start);
$suffix: str-slice($image, $end, str-length($image));
$is-spec-syntax: str-index($first-val, "at");
@if $is-spec-syntax and $is-spec-syntax > 1 {
$keyword: str-slice($first-val, 1, $is-spec-syntax - 2);
$pos: str-slice($first-val, $is-spec-syntax + 3, str-length($first-val));
$pos: append($pos, $keyword, comma);
$gradients: (
webkit-image: -webkit- + $prefix + $pos + $suffix,
spec-image: $image
)
}
@else if $is-spec-syntax == 1 {
$pos: str-slice($first-val, $is-spec-syntax + 3, str-length($first-val));
$gradients: (
webkit-image: -webkit- + $prefix + $pos + $suffix,
spec-image: $image
)
}
@else if str-index($image, "cover") or str-index($image, "contain") {
@warn "Radial-gradient needs to be updated to conform to latest spec.";
$gradients: (
webkit-image: null,
spec-image: $image
)
}
@else {
$gradients: (
webkit-image: -webkit- + $image,
spec-image: $image
)
}
@return $gradients;
}

View File

@@ -1,50 +0,0 @@
//************************************************************************//
// Helper function for linear/radial-gradient-parsers.
// Source: http://sassmeister.com/gist/9647408
//************************************************************************//
@function _str-to-num($string) {
// Matrices
$strings: '0' '1' '2' '3' '4' '5' '6' '7' '8' '9';
$numbers: 0 1 2 3 4 5 6 7 8 9;
// Result
$result: 0;
$divider: 0;
$minus: false;
// Looping through all characters
@for $i from 1 through str-length($string) {
$character: str-slice($string, $i, $i);
$index: index($strings, $character);
@if $character == '-' {
$minus: true;
}
@else if $character == '.' {
$divider: 1;
}
@else {
@if not $index {
$result: if($minus, $result * -1, $result);
@return _convert-units($result, str-slice($string, $i));
}
$number: nth($numbers, $index);
@if $divider == 0 {
$result: $result * 10;
}
@else {
// Move the decimal dot to the left
$divider: $divider * 10;
$number: $number / $divider;
}
$result: $result + $number;
}
}
@return if($minus, $result * -1, $result);
}

View File

@@ -1 +0,0 @@
$asset-pipeline: false !default;

View File

@@ -1,6 +0,0 @@
// Variable settings for /addons/prefixer.scss
$prefix-for-webkit: true !default;
$prefix-for-mozilla: true !default;
$prefix-for-microsoft: true !default;
$prefix-for-opera: true !default;
$prefix-for-spec: true !default; // required for keyframe mixin

View File

@@ -1 +0,0 @@
$em-base: 16px !default;

View File

@@ -1,15 +1,12 @@
---
---
@import 'bourbon/bourbon';
@import '_variables';
@import '_typography';
@import '_solarized';
@mixin code-typography {
font-family: 'source-code-pro', Menlo, Consolas, 'Courier New', monospace;
line-height: 1.5;
font-family: 'source-code-pro', Menlo, 'Courier New', Consolas, monospace;
font-size: 13px;
-webkit-text-size-adjust: none;
line-height: 20px;
}
$skinnyContentWidth: 650px;
@@ -20,28 +17,7 @@ $columnGutter: 40px;
$twoColumnWidth: 2 * $columnWidth + $columnGutter;
$navHeight: 50px;
// Breakpoints
$bp-large: 960px;
$bp-medium: 640px;
$bp-small: 480px;
@mixin bp-small {
@media (max-width: $bp-small) {
@content;
}
}
@mixin bp-medium {
@media (max-width: $bp-medium) {
@content;
}
}
@mixin bp-large {
@media (max-width: $bp-large) {
@content;
}
}
// basic reset
* {
@@ -68,20 +44,15 @@ html {
.container {
padding-top: $navHeight;
width: 100%;
min-width: $contentWidth + (2 * $contentPadding);
}
.wrap {
max-width: $contentWidth + (2 * $contentPadding);
width: $contentWidth + (2 * $contentPadding);
margin-left: auto;
margin-right: auto;
padding-left: 20px;
padding-right: 20px;
@include bp-large {
padding-left: 10px;
padding-right: 10px;
}
}
.skinnyWrap {
@@ -103,10 +74,6 @@ li {
margin-left: 20px;
}
li + li {
margin-top: 10px;
}
// Make header navigation linkable and on the screen. Used in documentation and
// blog posts.
h1, h2, h3, h4, h5, h6 {
@@ -122,7 +89,6 @@ h1, h2, h3, h4, h5, h6 {
.hash-link {
color: $mediumTextColor;
display: none;
padding-left: 8px;
}
// Main Nav
@@ -138,135 +104,53 @@ h1, h2, h3, h4, h5, h6 {
width: 100%;
z-index: 100;
@include bp-large {
height: auto;
}
a {
color: $lightColor;
text-decoration: none;
}
.nav-site {
display: inline-flex;
display: -ms-flexbox;
flex: 1;
-ms-flex: 1;
float: right;
margin: 0;
li {
margin: 0;
}
li > a {
box-sizing: content-box;
padding: 0 10px;
a {
padding: 0 8px;
text-transform: uppercase;
letter-spacing: 1px;
line-height: $navHeight;
display: inline-block;
height: $navHeight;
color: #ddd;
white-space: nowrap;
@include bp-large {
display: flex;
display: -ms-flex;
justify-content: center;
align-items: center;
padding: 0 5px;
line-height: inherit;
}
color: $mediumTextColor;
&:hover {
color: #fff;
color: $lightTextColor;
}
&.active {
position: relative;
color: $lightTextColor;
border-bottom: 3px solid $primary;
background: #333;
&:after {
content: "";
position: absolute;
bottom: 0;
left: 0;
right: 0;
border-bottom: 3px solid $primary;
}
@include bp-large {
background: inherit;
}
}
}
.nav-site-item {
&--hidden-sm {
@include bp-large {
display: none;
}
}
}
.nav-site-search {
@include bp-large {
position: absolute;
z-index: 1;
right: 0;
top: 0;
margin: 0 10px;
&:focus {
width: 170px;
}
}
}
}
.nav-site-internal {
margin: 0 0 0 20px;
@include bp-large {
margin: 0;
}
}
.nav-site-external {
float: right;
margin: 0;
@include bp-large {
position: absolute;
top: 0;
right: 55px;
float: none;
}
}
.nav-home {
color: #00d8ff;
font-size: 24px;
line-height: $navHeight;
height: $navHeight;
display: inline-block;
@include bp-large {
font-size: 20px;
}
}
.nav-logo {
@include retina-image('../img/logo_small', 38px 38px);
vertical-align: middle;
display: inline-block;
@include bp-large {
height: 30px;
width: auto;
}
}
ul {
display: inline-block;
vertical-align: top;
display: inline;
}
li {
@@ -274,37 +158,10 @@ h1, h2, h3, h4, h5, h6 {
}
}
.nav-lists {
display: inline-block;
vertical-align: top;
width: calc(100% - 120px);
@include bp-large {
display: flex;
display: -ms-flex;
width: calc(100% + 20px);
margin: 0 -10px;
font-size: 0.9em;
li {
display: flex;
display: -ms-flex;
-ms-flex: 1 0 auto;
align-items: center;
a {
-ms-flex: 1;
text-align: center;
line-height: 1.2;
}
}
}
}
// Hero!
.hero {
min-height: 300px;
height: 300px;
// background: $darkColor url(../img/header.png) no-repeat center;
background: $darkColor;
padding-top: 50px;
@@ -329,13 +186,8 @@ h1, h2, h3, h4, h5, h6 {
}
.buttons-unit {
display: flex;
display: flex;
justify-content: center;
flex-wrap: wrap;
margin-top: 60px;
text-align: center;
font-size: 1em;
a {
color: $blueColor;
@@ -349,11 +201,6 @@ h1, h2, h3, h4, h5, h6 {
&:active {
background: darken($primary, 5%);
}
@include bp-large {
margin: 5px;
font-size: 1em;
}
}
}
@@ -372,21 +219,15 @@ h1, h2, h3, h4, h5, h6 {
float: left;
width: 210px;
@include bp-medium {
width: 100%;
padding-bottom: 40px;
}
ul {
list-style: none;
margin: 0;
}
ul ul {
margin: 0 0 6px 20px;
margin-left: 20px;
}
li {
line-height: 16px;
margin: 0 0 6px;
margin: 0;
}
h3 {
text-transform: uppercase;
@@ -404,22 +245,6 @@ h1, h2, h3, h4, h5, h6 {
&.active {
color: $primary;
}
&.external {
&:after {
content: "";
display: inline-block;
width: 10px;
height: 10px;
padding-left: 5px;
@include retina-image('../img/external', 10px 10px);
background-position: 100% 0;
background-repeat: no-repeat;
font-size: 10px;
line-height: 1em;
opacity: 0.5;
}
}
}
.nav-docs-section {
@@ -436,25 +261,6 @@ h1, h2, h3, h4, h5, h6 {
padding-bottom: 0;
border-bottom: 0;
}
> ul {
@include bp-medium {
columns: 2
}
@include bp-small {
columns: 1;
}
li {
margin: 0;
a {
padding: 0;
line-height: 1.6;
}
}
}
}
}
@@ -474,21 +280,7 @@ h1, h2, h3, h4, h5, h6 {
.home-divider {
border-top-color: #bbb;
margin: 0 auto;
width: 100%;
max-width: 400px;
}
.skinny-row {
@include clearfix;
}
.skinny-col {
float: left;
margin-left: $columnGutter;
width: ($skinnyContentWidth - $columnGutter) / 2;
&:first-child {
margin-left: 0;
}
width: 400px;
}
.marketing-row {
@@ -501,16 +293,11 @@ h1, h2, h3, h4, h5, h6 {
margin-left: 40px;
width: $columnWidth;
@include bp-large {
margin: 0;
width: 100%;
}
h3 {
color: $darkColor;
font-size: 24px;
line-height: 28px;
font-weight: normal;
text-transform: uppercase;
}
p {
font-size: 16px;
@@ -575,39 +362,6 @@ h1, h2, h3, h4, h5, h6 {
@include clearfix;
}
/* JSX Compiler */
.jsxCompiler {
margin: 0 auto;
padding-top: 20px;
width: 1220px;
label.compiler-option {
display: block;
margin-top: 5px;
}
#jsxCompiler {
margin-top: 20px;
}
.playgroundPreview {
padding: 0;
width: 600px;
word-wrap: break-word;
pre {
@include code-typography;
}
}
.playgroundError {
// The compiler view kills padding in order to render the CodeMirror code
// more nicely. For the error view, put a padding back
padding: 15px 20px;
}
}
.docs-prev {
float: left;
}
@@ -616,6 +370,14 @@ h1, h2, h3, h4, h5, h6 {
float: right;
}
footer {
font-size: 13px;
font-weight: 600;
margin-top: 36px;
margin-bottom: 18px;
overflow: auto;
}
section.black content {
padding-bottom: 18px;
}
@@ -628,10 +390,6 @@ section.black content {
@include clearfix;
padding-top: 20px;
padding-bottom: 80px;
@include bp-medium {
padding-bottom: 0;
}
blockquote {
padding: 5px 15px;
@@ -640,12 +398,6 @@ section.black content {
border-left: 5px solid #f7ebc6;
}
h2 > code {
font-size: inherit;
line-height: inherit;
color: #555;
background-color: rgba(0,0,0,0.04);
}
}
/**
@@ -666,17 +418,13 @@ section.black content {
}
padding-top: 20px;
padding-bottom: 80px;
@include bp-medium {
padding-bottom: 0;
}
// Make a notice box out of blockquotes in the documentation:
blockquote {
padding: 15px 30px 15px 15px;
margin: 20px 0;
background-color: rgba(248, 245, 236, 0.5);
border-left: 5px solid rgba(191, 87, 73, 0.2);
background-color: rgba(204, 122, 111, 0.09999999999999998);
border-left: 5px solid rgba(191, 87, 73, 0.19999999999999996);
h4 {
margin-top: 0;
}
@@ -699,6 +447,33 @@ section.black content {
padding-bottom: 40px;
}
/* JSX Compiler */
.jsxCompiler {
margin: 0 auto;
padding-top: 20px;
width: 1220px;
#jsxCompiler {
margin-top: 20px;
}
.playgroundPreview {
padding: 0;
width: 600px;
pre {
@include code-typography;
}
}
.playgroundError {
// The compiler view kills padding in order to render the CodeMirror code
// more nicely. For the error view, put a padding back
padding: 15px 20px;
}
}
/* Button */
.button {
@@ -777,17 +552,7 @@ figure {
.inner-content {
float: right;
width: 100%;
max-width: $skinnyContentWidth;
@include bp-large {
width: calc(100% - 240px);
max-width: 100%;
}
@include bp-medium {
width: 100%;
}
width: $skinnyContentWidth;
}
.nosidebar .inner-content {
@@ -795,59 +560,6 @@ figure {
margin: 0 auto;
}
h1 {
// Contains .edit-page-link
@include clearfix;
}
.edit-page-link {
float: right;
font-size: 16px;
font-weight: normal;
line-height: 20px;
margin-top: 17px;
@include bp-medium {
float: left;
width: 100%;
}
}
/**
* Community
*/
.communityContent {
@include clearfix;
h3 {
margin-top: 30px;
}
padding-top: 20px;
blockquote {
padding: 5px 15px;
margin: 20px 0;
background-color: #f8f5ec;
border-left: 5px solid #f7ebc6;
}
th {
padding-right: 6px;
text-align: right;
vertical-align: top;
font-weight: normal;
@include code-typography;
}
td {
vertical-align: top;
text-align: left;
}
}
/* Blog */
.post-list-item + .post-list-item {
@@ -860,8 +572,8 @@ div.CodeMirror pre, div.CodeMirror-linenumber, code {
@include code-typography;
}
div.CodeMirror-linenumber {
text-align: right;
div.CodeMirror-linenumber:after {
content: '.';
}
.CodeMirror, div.CodeMirror-gutters, div.highlight {
@@ -881,12 +593,6 @@ p code {
padding: 1px 3px;
}
small a code,
li a code,
p a code {
color: inherit;
}
.cm-s-default span.cm-string-2 {
color: inherit;
}
@@ -921,8 +627,7 @@ p a code {
border-radius: 0 3px 3px 3px;
float: left;
overflow: hidden;
width: 100%;
max-width: $twoColumnWidth;
width: $twoColumnWidth;
}
.playgroundPreview {
@@ -931,7 +636,6 @@ p a code {
float: right;
padding: 15px 20px;
width: $columnWidth;
word-wrap: break-word;
}
.playgroundError {
@@ -944,11 +648,6 @@ p a code {
height: 100px
}
.MarkdownEditor .content {
white-space: pre-wrap;
word-break: break-word;
}
.hll {
background-color: #f7ebc6;
border-left: 5px solid #f7d87c;
@@ -981,17 +680,10 @@ p a code {
margin-bottom: 0;
background-color: transparent;
border: 0;
float: left;
min-width: 100%;
}
.highlight pre code {
/* Respect line-height defined in <code> styles above */
display: block;
/* Cancel out styles for `li code` in case we have a <pre> within an <li>. */
background: none;
padding: 0;
font-size: inherit;
}
.highlight pre .lineno {
@@ -1028,9 +720,9 @@ p a code {
text-decoration: none !important;
}
@include bp-large {
@media screen and (max-width: 960px) {
.nav-main {
position: relative;
position: static;
}
.container {
padding-top: 0;
@@ -1041,11 +733,6 @@ p a code {
margin-bottom: 30px;
}
.post img {
max-width: 100%;
height: auto;
}
.pagination {
margin-bottom: 30px;
@@ -1061,202 +748,4 @@ p a code {
// Twitter embeds. Need to !important because they inline margin on the iframe.
div[data-twttr-id] iframe {
margin: 10px auto !important;
width: 100% !important;
}
.fb_iframe_widget {
max-width: 100%;
* {
max-width: 100%;
}
}
#twitter-widget-0 {
@include bp-large {
display: none !important; // Need !important because they inline display on the iframe.
}
}
/* Acknowledgements */
.three-column {
@include clearfix;
}
.three-column > ul {
float: left;
margin-left: 30px;
width: 190px;
}
.three-column > ul:first-child {
margin-left: 20px;
}
/* Algolia Doc Search */
input#algolia-doc-search {
background: transparent url('/react/img/search.png') no-repeat 10px center;
background-size: 16px 16px;
position: relative;
vertical-align: top;
margin-left: 10px;
padding: 0 10px;
padding-left: 35px;
height: 30px;
margin-top: 10px;
font-size: 16px;
line-height: 20px;
background-color: #333;
border-radius: 4px;
color: white;
outline: none;
width: 170px;
transition: width .2s ease;
&:focus {
width: 240px;
}
@include bp-large {
background-color: transparent;
width: 0;
cursor: pointer;
&:focus {
width: 200px;
background-color: #333;
}
}
}
.algolia-autocomplete .aa-dropdown-menu {
margin-left: -110px;
margin-top: -4px;
}
.algolia-autocomplete {
vertical-align: top;
height: 53px;
}
.algolia-docsearch-suggestion {
border-bottom-color: #c05b4d;
}
.algolia-docsearch-suggestion--category-header {
background-color: #cc7a6f;
}
.algolia-docsearch-suggestion--highlight {
color: #c05b4d;
}
.algolia-docsearch-suggestion--category-header .algolia-docsearch-suggestion--highlight {
background-color: #c05b4d;
}
.aa-cursor .algolia-docsearch-suggestion--content {
color: #c05b4d;
}
.aa-cursor .algolia-docsearch-suggestion {
background: #f1f3f5;
}
/**
* Footer
*/
footer.nav-footer {
box-sizing: border-box;
border: none;
font-weight: 300;
color: #202020;
font-size: 15px;
line-height: 24px;
background: #2D2D2D;
box-shadow: inset 0 10px 10px -5px #0d1116;
padding-top: 2em;
padding-bottom: 2em;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
footer .sitemap {
display: flex;
display: -ms-flexbox;
justify-content: space-between;
max-width: 1080px;
margin: 0 auto 3em;
}
footer .sitemap div {
flex: 1;
-ms-flex: 1;
}
footer .sitemap .nav-home {
display: table;
margin: -12px 20px 0 0;
padding: 10px;
width: 60px;
height: 60px;
transition: opacity 0.15s ease-in-out;
background: url("../img/logo_small_gray.png") no-repeat content-box;
}
footer .sitemap .nav-home:hover,
footer .sitemap .nav-home:focus {
background-image: url("../img/logo_small.png");
}
@media screen and (max-width: 740px) {
footer .sitemap {
display: none;
}
}
footer .sitemap a {
color: white;
display: table;
margin: 2px -10px;
padding: 3px 10px;
}
footer .sitemap a:hover,
footer .sitemap a:focus {
color: #61dafb;
text-decoration: none;
}
footer .sitemap h6 > a:hover,
footer .sitemap h6 > a:focus {
color: #61dafb;
text-decoration: none;
}
footer .sitemap h5,
footer .sitemap h6 {
margin: 0 0 10px;
}
footer .sitemap h5,
footer .sitemap h6,
footer .sitemap h5 > a,
footer .sitemap h6 > a {
color: white;
}
footer .sitemap h5 > a,
footer .sitemap h6 > a {
margin: 0 -10px;
}
footer .fbOpenSource {
display: block;
margin: 1em auto;
opacity: 0.4;
transition: opacity 0.15s ease-in-out;
width: 170px;
}
footer .fbOpenSource:hover {
opacity: 1.0;
}
footer .copyright {
color: rgba(255, 255, 255, 0.4);
text-align: center;
}

View File

@@ -1,697 +0,0 @@
---
- - '839'
- Aaron Franks
- Aaron Gelter
- Adam Bloomston
- Adam Krebs
- Adam Mark
- Adam Solove
- Adam Timberlake
- Adam Zapletal
- Ahmad Wali Sidiqi
- Alan Plum
- Alan Souza
- Alan deLevie
- Alastair Hole
- Alex
- Alex Boatwright
- Alex Boyd
- Alex Dajani
- Alex Lopatin
- Alex Mykyta
- Alex Pien
- Alex Smith
- Alex Zelenskiy
- Alexander Shtuchkin
- Alexander Solovyov
- Alexander Tseung
- Alexandre Gaudencio
- Alexey Raspopov
- Alexey Shamrin
- Ali Ukani
- Andre Z Sanchez
- Andreas Savvides
- Andreas Svensson
- Andres Kalle
- Andres Suarez
- Andrew Clark
- Andrew Cobby
- Andrew Davey
- Andrew Henderson
- Andrew Kulakov
- Andrew Rasmussen
- Andrew Sokolov
- Andrew Zich
- Andrey Popp
- Anthony van der Hoorn
- Anto Aravinth
- Antonio Ruberto
- Antti Ahti
- Anuj Tomar
- AoDev
- April Arcus
- Areeb Malik
- Aria Buckles
- Aria Stewart
- Arian Faurtosh
- Artem Nezvigin
- Austin Wright
- Ayman Osman
- Baraa Hamodi
- Bartosz Kaszubowski
- Basarat Ali Syed
- Battaile Fauber
- Beau Smith
- Ben Anderson
- Ben Brooks
- Ben Foxall
- Ben Halpern
- Ben Jaffe
- Ben Moss
- Ben Newman
- Ben Ripkens
- Benjamin Keen
- Benjamin Leiken
- Benjamin Woodruff
- Benjy Cui
- Bill Blanchard
- Bill Fisher
- Blaine Hatab
- Blaine Kasten
- Bob Eagan
- Bob Ralian
- Bob Renwick
- Bobby
- Bojan Mihelac
- Bradley Spaulding
- Brandon Bloom
- Brandon Tilley
- Brenard Cubacub
- Brian Cooke
- Brian Holt
- Brian Hsu
- Brian Kim
- Brian Kung
- Brian Reavis
- Brian Rue
- Bruno Škvorc
- Cam Song
- Cam Spiers
- Cameron Chamberlain
- Cameron Matheson
- Carter Chung
- Cassus Adam Banko
- Cat Chen
- Cedric Sohrauer
- Cesar William Alvarenga
- Changsoon Bok
- Charles Marsh
- Chase Adams
- Cheng Lou
- Chitharanjan Das
- Chris Bolin
- Chris Grovers
- Chris Ha
- Chris Rebert
- Chris Sciolla
- Christian Alfoni
- Christian Oliff
- Christian Roman
- Christoffer Sawicki
- Christoph Pojer
- Christopher Monsanto
- Clay Allsopp
- Connor McSheffrey
- Conor Hastings
- Cory House
- Cotton Hou
- Craig Akimoto
- Cristovao Verstraeten
- Damien Pellier
- Dan Abramov
- Dan Fox
- Dan Schafer
- Daniel Carlsson
- Daniel Cousens
- Daniel Friesen
- Daniel Gasienica
- Daniel Hejl
- Daniel Hejl
- Daniel Lo Nigro
- Daniel Mané
- Daniel Miladinov
- Daniel Rodgers-Pryor
- Daniel Schonfeld
- Danny Ben-David
- Darcy
- Daryl Lau
- Darío Javier Cravero
- Dave Galbraith
- David Baker
- David Ed Mellum
- David Goldberg
- David Granado
- David Greenspan
- David Hellsing
- David Hu
- David Khourshid
- David Mininger
- David Neubauer
- David Percy
- Dean Shi
- Denis Sokolov
- Deniss Jacenko
- Dennis Johnson
- Devon Blandin
- Devon Harvey
- Dmitrii Abramov
- Dmitriy Rozhkov
- Dmitry Blues
- Dmitry Mazuro
- Domenico Matteo
- Don Abrams
- Dongsheng Liu
- Dustan Kasten
- Dustin Getz
- Dylan Harrington
- Eduardo Garcia
- Edvin Erikson
- Elaine Fang
- Enguerran
- Eric Clemmons
- Eric Eastwood
- Eric Florenzano
- Eric O'Connell
- Eric Schoffstall
- Erik Harper
- Espen Hovlandsdal
- Evan Coonrod
- Evan Vosberg
- Fabio M. Costa
- Federico Rampazzo
- Felipe Oliveira Carvalho
- Felix Gnass
- Felix Kling
- Fernando Correia
- Frankie Bagnardi
- François-Xavier Bois
- Fred Zhao
- Freddy Rangel
- Fyodor Ivanishchev
- G Scott Olson
- G. Kay Lee
- Gabe Levi
- Gajus Kuizinas
- Gareth Nicholson
- Garren Smith
- Gavin McQuistin
- Geert Pasteels
- Geert-Jan Brits
- George A Sisco III
- Georgii Dolzhykov
- Gilbert
- Glen Mailer
- Grant Timmerman
- Greg Hurrell
- Greg Perkins
- Greg Roodt
- Gregory
- Guangqiang Dong
- Guido Bouman
- Harry Hull
- Harry Marr
- Harry Moreno
- Harshad Sabne
- Hekar Khani
- Hendrik Swanepoel
- Henrik Nyh
- Henry Wong
- Henry Zhu
- Hideo Matsumoto
- Hou Chia
- Huang-Wei Chang
- - Hugo Agbonon
- Hugo Jobling
- Hyeock Kwon
- Héliton Nordt
- Ian Obermiller
- Ignacio Carbajo
- Igor Scekic
- Ilia Pavlenkov
- Ilya Shuklin
- Ilyá Belsky
- Ingvar Stepanyan
- Irae Carvalho
- Isaac Salier-Hellendag
- Iurii Kucherov
- Ivan Kozik
- Ivan Krechetov
- Ivan Vergiliev
- J. Andrew Brassington
- J. Renée Beach
- JD Isaacks
- JJ Weber
- JW
- Jack Zhang
- Jackie Wung
- Jacob Gable
- Jacob Greenleaf
- Jae Hun Ro
- Jaeho Lee
- Jaime Mingo
- Jake Worth
- Jakub Malinowski
- James
- James Brantly
- James Burnett
- James Friend
- James Ide
- James Long
- James Pearce
- James Seppi
- James South
- James Wen
- Jamie Wong
- Jamis Charles
- Jamison Dance
- Jan Hancic
- Jan Kassens
- Jan Raasch
- Jared Forsyth
- Jason
- Jason Bonta
- Jason Ly
- Jason Miller
- Jason Quense
- Jason Trill
- Jason Webster
- Jay Jaeho Lee
- Jean Lauliac
- Jed Watson
- Jeff Barczewski
- Jeff Carpenter
- Jeff Chan
- Jeff Hicken
- Jeff Kolesky
- Jeff Morrison
- Jeff Welch
- Jeffrey Lin
- Jeremy Fairbank
- Jesse Skinner
- Jignesh Kakadiya
- Jim OBrien
- Jim Sproch
- Jimmy Jea
- Jing Chen
- Jinwoo Oh
- Jinxiu Lee
- Jiyeon Seo
- Jody McIntyre
- Joe Critchley
- Joe Stein
- Joel Auterson
- Johannes Baiter
- Johannes Emerich
- Johannes Lumpe
- John Heroy
- John Ryan
- John Watson
- John-David Dalton
- Jon Beebe
- Jon Chester
- Jon Hester
- Jon Madison
- Jon Scott Clark
- Jon Tewksbury
- Jonas Enlund
- Jonas Gebhardt
- Jonathan Hsu
- Jonathan Persson
- Jordan Harband
- Jordan Walke
- Jorrit Schippers
- Joseph Nudell
- Joseph Savona
- Josh Bassett
- Josh Duck
- Josh Perez
- Josh Yudaken
- Joshua Evans
- Joshua Go
- Joshua Goldberg
- Joshua Ma
- João Valente
- Juan Serrano
- Julen Ruiz Aizpuru
- Julian Viereck
- Julien Bordellier
- Julio Lopez
- Jun Wu
- Juraj Dudak
- Justas Brazauskas
- Justin Jaffray
- Justin Robison
- Justin Woo
- Kale
- Kamron Batman
- Karl Mikkelsen
- Karpich Dmitry
- Keito Uchiyama
- Ken Powers
- Kent C. Dodds
- Kevin Cheng
- Kevin Coughlin
- Kevin Huang
- Kevin Lau
- Kevin Old
- Kevin Robinson
- Kewei Jiang
- Kier Borromeo
- KimCoding
- Kirk Steven Hansen
- Kit Randel
- Kohei TAKATA
- Koo Youngmin
- Krystian Karczewski
- Kunal Mehta
- Kurt Ruppel
- Kyle Kelley
- Kyle Mathews
- Laurence Rowe
- Laurent Etiemble
- Lee Byron
- Lee Jaeyoung
- Lei
- Leland Richardson
- Leon Fedotov
- Leon Yip
- Leonardo YongUk Kim
- Levi Buzolic
- Levi McCallum
- Lily
- Logan Allen
- Lovisa Svallingson
- Ludovico Fischer
- Luigy Leon
- Luke Horvat
- MIKAMI Yoshiyuki
- Maher Beg
- Manas
- Marcin K.
- Marcin Kwiatkowski
- Marcin Szczepanski
- Mariano Desanze
- Marjan
- Mark Anderson
- Mark Funk
- Mark Hintz
- Mark IJbema
- Mark Murphy
- Mark Richardson
- Mark Rushakoff
- Mark Sun
- Marlon Landaverde
- Marshall Roch
- Martin Andert
- Martin Hujer
- Martin Jul
- Martin Konicek
- Martin Mihaylov
- Masaki KOBAYASHI
- Mathieu M-Gosselin
- Mathieu Savy
- Matias Singers
- Matsunoki
- Matt Brookes
- Matt Dunn-Rankin
- Matt Harrison
- Matt Huggins
- Matt Stow
- Matt Zabriskie
- Matthew Dapena-Tretter
- Matthew Herbst
- Matthew Hodgson
- Matthew Johnston
- Matthew King
- Matthew Looi
- Matthew Miner
- Matthias Le Brun
- Matti Nelimarkka
- Mattijs Kneppers
- Max F. Albrecht
- Max Heiber
- Max Stoiber
- Maxi Ferreira
- Maxim Abramchuk
- Merrick Christensen
- Mert Kahyaoğlu
- Michael Chan
- Michael McDermott
- Michael Randers-Pehrson
- Michael Ridgway
- Michael Warner
- Michael Wiencek
- Michael Ziwisky
- Michal Srb
- Michelle Todd
- Mihai Parparita
- Mike D Pilsbury
- Mike Groseclose
- Mike Nordick
- Mikolaj Dadela
- Miles Johnson
- Minwe LUO
- Miorel Palii
- - Morhaus
- Moshe Kolodny
- Mouad Debbar
- Murad
- Murray M. Moss
- Nadeesha Cabral
- Naman Goel
- Nate Hunzaker
- Nate Lee
- Nathan Smith
- Nathan White
- Nee
- Neri Marschik
- Nguyen Truong Duy
- Nicholas Bergson-Shilcock
- Nicholas Clawson
- Nick Balestra
- Nick Fitzgerald
- Nick Gavalas
- Nick Merwin
- Nick Presta
- Nick Raienko
- Nick Thompson
- Nick Williams
- Niklas Boström
- Ning Xia
- Niole Nelson
- Oiva Eskola
- Oleg
- Oleksii Markhovskyi
- Oliver Zeigermann
- Olivier Tassinari
- Owen Coutts
- Pablo Lacerda de Miranda
- Paolo Moretti
- Pascal Hartig
- Patrick
- Patrick Laughlin
- Patrick Stapleton
- Paul Benigeri
- Paul Harper
- Paul OShannessy
- Paul Seiffert
- Paul Shen
- Pedro Nauck
- Pete Hunt
- Peter Blazejewicz
- Peter Cottle
- Peter Jaros
- Peter Newnham
- Petri Lehtinen
- Petri Lievonen
- Pieter Vanderwerff
- Pouja Nikray
- Prathamesh Sonpatki
- Prayag Verma
- Preston Parry
- Rafael
- Rafal Dittwald
- Rainer Oviir
- Rajat Sehgal
- Rajiv Tirumalareddy
- Ram Kaniyur
- Randall Randall
- Ray
- Raymond Ha
- Reed Loden
- Remko Tronçon
- Richard D. Worth
- Richard Feldman
- Richard Kho
- Richard Littauer
- Richard Livesey
- Richard Wood
- Rick Beerendonk
- Rick Ford
- Riley Tomasek
- Rob Arnold
- Robert Binna
- Robert Knight
- Robert Sedovsek
- Robin Berjon
- Robin Frischmann
- Roman Pominov
- Roman Vanesyan
- Russ
- Ryan Seddon
- Sahat Yalkabov
- Saif Hakim
- Saiichi Hashimoto
- Sam Beveridge
- Sam Saccone
- Sam Selikoff
- Samy Al Zahrani
- Sander Spies
- Scott Burch
- Scott Feeney
- Sean Kinsey
- Sebastian Markbåge
- Sebastian McKenzie
- Seoh Char
- Sercan Eraslan
- Serg
- Sergey Generalov
- Sergey Rubanov
- Seyi Adebajo
- Shane O'Sullivan
- Shaun Trennery
- ShihChi Huang
- Shim Won
- Shinnosuke Watanabe
- Shogun Sea
- Shota Kubota
- Shripad K
- Sibi
- Simen Bekkhus
- Simon Højberg
- Simon Welsh
- Simone Vittori
- Soichiro Kawamura
- Sophia Westwood
- Sophie Alpert
- Sota Ohara
- Spencer Handley
- Stefan Dombrowski
- Stephen Murphy
- Sterling Cobb
- Steve Baker
- Steven Luscher
- Steven Vachon
- Stoyan Stefanov
- Sundeep Malladi
- Sunny Juneja
- Sven Helmberger
- Sverre Johansen
- Sébastien Lorber
- Sławomir Laskowski
- Taeho Kim
- Tay Yang Shun
- Ted Kim
- Tengfei Guo
- Teodor Szente
- Thomas Aylott
- Thomas Boyt
- Thomas Broadley
- Thomas Reggi
- Thomas Röggla
- Thomas Shaddox
- Thomas Shafer
- ThomasCrvsr
- Tienchai Wirojsaksaree
- Tim Routowicz
- Tim Schaub
- Timothy Yung
- Timur Carpeev
- Tobias Reiss
- Tom Duncalf
- Tom Haggie
- Tom Hauburger
- Tom MacWright
- Tom Occhino
- Tomasz Kołodziejski
- Tomoya Suzuki
- Tony Spiro
- Toru Kobayashi
- Trinh Hoang Nhu
- Tsung Hung
- Tyler Brock
- Ustin Zarubin
- Vadim Chernysh
- Varun Rau
- Vasiliy Loginevskiy
- Victor Alvarez
- Victor Homyakov
- Victor Koenders
- Ville Immonen
- Vincent Riemer
- Vincent Siao
- Vipul A M
- Vitaly Kramskikh
- Vitor Balocco
- Vjeux
- Volkan Unsal
- Wander Wang
- Wayne Larsen
- WickyNilliams
- Wincent Colaiuta
- Wout Mertens
- Xavier Morel
- XuefengWu
- Yakov Dalinchuk
- Yasar icli
- YouBao Nong
- Yuichi Hagio
- Yuriy Dybskiy
- Yutaka Nakajima
- Yuval Dekel
- Zach Bruggeman
- Zach Ramaekers
- Zacharias
- Zeke Sikelianos
- Zhangjd
- adraeth
- arush
- brafdlog
- chen
- clariroid
- claudiopro
- cutbko
- davidxi
- dongmeng.ldm
- iamchenxin
- iamdoron
- iawia002
- imagentleman
- koh-taka
- kohashi85
- laiso
- leeyoungalias
- li.li
- maxprafferty
- rgarifullin
- songawee
- sugarshin
- wali-s
- yiminghe
- youmoo
- zhangjg
- zwhitchcox
- "Árni Hermann Reynisson"
- "元彦"
- "凌恒"
- "张敏"

View File

@@ -1,78 +0,0 @@
# Map of short name to more information. `name` will be used but if you don't
# want to use your real name, just use whatever. If url is included, your name
# will be a link to the provided url.
acdlite:
name: Andrew Clark
url: https://twitter.com/acdlite
benigeri:
name: Paul Benigeri
url: https://github.com/benigeri
chenglou:
name: Cheng Lou
url: https://twitter.com/_chenglou
Daniel15:
name: Daniel Lo Nigro
url: http://dan.cx/
fisherwebdev:
name: Bill Fisher
url: https://twitter.com/fisherwebdev
flarnie:
name: Flarnie Marchan
url: https://twitter.com/ProbablyFlarnie
gaearon:
name: Dan Abramov
url: https://twitter.com/dan_abramov
jaredly:
name: Jared Forsyth
url: https://twitter.com/jaredforsyth
jgebhardt:
name: Jonas Gebhardt
url: https://twitter.com/jonasgebhardt
jimfb:
name: Jim Sproch
url: http://www.jimsproch.com
jingc:
name: Jing Chen
url: https://twitter.com/jingc
josephsavona:
name: Joseph Savona
url: https://twitter.com/en_JS
keyanzhang:
name: Keyan Zhang
url: https://twitter.com/keyanzhang
kmeht:
name: Kunal Mehta
url: https://github.com/kmeht
LoukaN:
name: Lou Husson
url: https://twitter.com/loukan42
matthewjohnston4:
name: Matthew Johnston
url: https://github.com/matthewathome
nhunzaker:
name: Nathan Hunzaker
url: https://github.com/nhunzaker
petehunt:
name: Pete Hunt
url: https://twitter.com/floydophone
schrockn:
name: Nick Schrock
url: https://twitter.com/schrockn
sebmarkbage:
name: Sebastian Markbåge
url: https://twitter.com/sebmarkbage
sophiebits:
name: Sophie Alpert
url: https://sophiealpert.com
steveluscher:
name: Steven Luscher
url: https://twitter.com/steveluscher
vjeux:
name: Vjeux
url: https://twitter.com/vjeux
wincent:
name: Greg Hurrell
url: https://twitter.com/wincent
zpao:
name: Paul OShannessy
url: https://twitter.com/zpao

View File

@@ -1,14 +0,0 @@
- title: Community Resources
items:
- id: support
title: Where To Get Support
- id: conferences
title: Conferences
- id: videos
title: Videos
- id: complementary-tools
title: Complementary Tools
href: https://github.com/facebook/react/wiki/Complementary-Tools
- id: examples
title: Examples
href: https://github.com/facebook/react/wiki/Examples

View File

@@ -1,10 +0,0 @@
- title: Contributing
items:
- id: how-to-contribute
title: How to Contribute
- id: codebase-overview
title: Codebase Overview
- id: implementation-notes
title: Implementation Notes
- id: design-principles
title: Design Principles

View File

@@ -1,79 +1,67 @@
- title: Quick Start
items:
- id: installation
title: Installation
- id: hello-world
title: Hello World
- id: introducing-jsx
title: Introducing JSX
- id: rendering-elements
title: Rendering Elements
- id: components-and-props
title: Components and Props
- id: state-and-lifecycle
title: State and Lifecycle
- id: handling-events
title: Handling Events
- id: conditional-rendering
title: Conditional Rendering
- id: lists-and-keys
title: Lists and Keys
- id: forms
title: Forms
- id: lifting-state-up
title: Lifting State Up
- id: composition-vs-inheritance
title: Composition vs Inheritance
- id: thinking-in-react
title: Thinking In React
- title: Advanced Guides
- id: getting-started
title: Getting Started
- id: tutorial
title: Tutorial
- id: videos
title: Videos
- id: complementary-tools
title: Complementary tools
- id: example-apps
title: Example apps
- title: Guides
items:
- id: why-react
title: Why React?
- id: displaying-data
title: Displaying Data
subitems:
- id: jsx-in-depth
title: JSX In Depth
- id: typechecking-with-proptypes
title: Typechecking With PropTypes
- id: refs-and-the-dom
title: Refs and the DOM
- id: uncontrolled-components
title: Uncontrolled Components
- id: optimizing-performance
title: Optimizing Performance
- id: react-without-es6
title: React Without ES6
- id: react-without-jsx
title: React Without JSX
- id: reconciliation
title: Reconciliation
- id: context
title: Context
- id: web-components
title: Web Components
- id: higher-order-components
title: Higher-Order Components
- id: integrating-with-other-libraries
title: Integrating with Other Libraries
- id: accessibility
title: Accessibility
title: JSX in Depth
- id: jsx-gotchas
title: JSX Gotchas
- id: interactivity-and-dynamic-uis
title: Interactivity and Dynamic UIs
- id: multiple-components
title: Multiple Components
- id: reusable-components
title: Reusable Components
- id: forms
title: Forms
- id: working-with-the-browser
title: Working With the Browser
subitems:
- id: more-about-refs
title: More About Refs
- id: tooling-integration
title: Tooling Integration
- id: addons
title: Add-Ons
subitems:
- id: animation
title: Animation
- id: two-way-binding-helpers
title: Two-Way Binding Helpers
- id: class-name-manipulation
title: Class Name Manipulation
- id: examples
title: Examples
- title: Reference
items:
- id: react-api
title: React
subitems:
- id: react-component
title: React.Component
- id: react-dom
title: ReactDOM
- id: react-dom-server
title: ReactDOMServer
- id: react-dom-node-stream
title: ReactDOMNodeStream
- id: dom-elements
title: DOM Elements
- id: events
title: SyntheticEvent
- id: test-utils
title: Test Utilities
- id: shallow-renderer
title: Shallow Renderer
- id: test-renderer
title: Test Renderer
- id: top-level-api
title: Top-Level API
- id: component-api
title: Component API
- id: component-specs
title: Component Specs and Lifecycle
- id: tags-and-attributes
title: Supported Tags and Attributes
- id: events
title: Event System
- id: dom-differences
title: DOM Differences
- id: special-non-dom-attributes
title: Special Non-DOM attributes
- id: reconciliation
title: Reconciliation

32
docs/_data/nav_tips.yml Normal file
View File

@@ -0,0 +1,32 @@
- title: Tips
items:
- id: introduction
title: Introduction
- id: inline-styles
title: Inline Styles
- id: if-else-in-JSX
title: If-Else in JSX
- id: self-closing-tag
title: Self-Closing Tag
- id: maximum-number-of-jsx-root-nodes
title: Maximum Number of JSX Root Nodes
- id: style-props-value-px
title: Shorthand for Specifying Pixel Values in style props
- id: children-props-type
title: Type of the Children props
- id: controlled-input-null-value
title: Value of null for Controlled Input
- id: componentWillReceiveProps-not-triggered-after-mounting
title: componentWillReceiveProps Not Triggered After Mounting
- id: props-in-getInitialState-as-anti-pattern
title: Props in getInitialState Is an Anti-Pattern
- id: dom-event-listeners
title: DOM Event Listeners in a Component
- id: initial-ajax
title: Load Initial Data via AJAX
- id: false-in-jsx
title: False in JSX
- id: communicate-between-components
title: Communicate Between Components
- id: expose-component-functions
title: Expose Component Functions

View File

@@ -1,88 +0,0 @@
- title: Tutorial
items:
- id: tutorial
title: Before We Start
subitems:
- id: what-were-building
title: What We're Building
href: /react/tutorial/tutorial.html#what-were-building
forceInternal: true
- id: prerequisites
title: Prerequisites
href: /react/tutorial/tutorial.html#prerequisites
forceInternal: true
- id: how-to-follow-along
title: How to Follow Along
href: /react/tutorial/tutorial.html#how-to-follow-along
forceInternal: true
- id: help-im-stuck
title: Help, I'm Stuck!
href: /react/tutorial/tutorial.html#help-im-stuck
forceInternal: true
- id: overview
title: Overview
href: /react/tutorial/tutorial.html#overview
forceInternal: true
subitems:
- id: what-is-react
title: What is React?
href: /react/tutorial/tutorial.html#what-is-react
forceInternal: true
- id: getting-started
title: Getting Started
href: /react/tutorial/tutorial.html#getting-started
forceInternal: true
- id: passing-data-through-props
title: Passing Data Through Props
href: /react/tutorial/tutorial.html#passing-data-through-props
forceInternal: true
- id: an-interactive-component
title: An Interactive Component
href: /react/tutorial/tutorial.html#an-interactive-component
forceInternal: true
- id: developer-tools
title: Developer Tools
href: /react/tutorial/tutorial.html#developer-tools
forceInternal: true
- id: lifting-state-up
title: Lifting State Up
href: /react/tutorial/tutorial.html#lifting-state-up
forceInternal: true
subitems:
- id: why-immutability-is-important
title: Why Immutability Is Important
href: /react/tutorial/tutorial.html#why-immutability-is-important
forceInternal: true
- id: functional-components
title: Functional Components
href: /react/tutorial/tutorial.html#functional-components
forceInternal: true
- id: taking-turns
title: Taking Turns
href: /react/tutorial/tutorial.html#taking-turns
forceInternal: true
- id: declaring-a-winner
title: Declaring a Winner
href: /react/tutorial/tutorial.html#declaring-a-winner
forceInternal: true
- id: storing-a-history
title: Storing A History
href: /react/tutorial/tutorial.html#storing-a-history
forceInternal: true
subitems:
- id: showing-the-moves
title: Showing the Moves
href: /react/tutorial/tutorial.html#showing-the-moves
forceInternal: true
- id: keys
title: Keys
href: /react/tutorial/tutorial.html#keys
forceInternal: true
- id: implementing-time-travel
title: Implementing Time Travel
href: /react/tutorial/tutorial.html#implementing-time-travel
forceInternal: true
- id: wrapping-up
title: Wrapping Up
href: /react/tutorial/tutorial.html#wrapping-up
forceInternal: true

View File

@@ -1,32 +1,10 @@
{% assign page = include.page %}
<h1><a href="/react{{ page.url }}">{{ page.title }}</a></h1>
<p class="meta">{{ page.date | date_to_string }} by {{ page.author }}</p>
<h1>
{% if include.isPermalink %}
{{ page.title }}
<div id="post">
{% if content != '' %}
{{ page.excerpt }}
{% else %}
<a href="/react{{ page.url }}">{{ page.title }}</a>
{{ page.content }}
{% endif %}
</h1>
<p class="meta">
{{ page.date | date: "%B %e, %Y" }}
by
{% for author in page.authors %}
{% if author.url %}
<a href="{{author.url}}">{{ author.name }}</a>
{% else %}
{{ author.name }}
{% endif %}
{% if forloop.last == false %} and {% endif %}
{% endfor %}
</p>
<hr>
<div class="post">
{{ include.content }}
</div>
{% if include.isPermalink %}
<div class="fb-like" data-send="true" data-width="650" data-show-faces="false"></div>
{% endif %}

View File

@@ -1,41 +0,0 @@
<footer class="nav-footer">
<section class="sitemap">
<a href="/react/" class="nav-home">
</a>
<div>
<h5><a href="/react/docs/">Docs</a></h5>
<a href="/react/docs/hello-world.html">Quick Start</a>
<a href="/react/docs/thinking-in-react.html">Thinking in React</a>
<a href="/react/tutorial/tutorial.html">Tutorial</a>
<a href="/react/docs/jsx-in-depth.html">Advanced Guides</a>
</div>
<div>
<h5><a href="/react/community/support.html">Community</a></h5>
<a href="http://stackoverflow.com/questions/tagged/reactjs" target="_blank">Stack Overflow</a>
<a href="https://discuss.reactjs.org/" target="_blank">Discussion Forum</a>
<a href="https://discord.gg/0ZcbPKXt5bZjGY5n" target="_blank">Reactiflux Chat</a>
<a href="https://www.facebook.com/react" target="_blank">Facebook</a>
<a href="https://twitter.com/reactjs" target="_blank">Twitter</a>
</div>
<div>
<h5><a href="/react/community/support.html">Resources</a></h5>
<a href="/react/community/conferences.html">Conferences</a>
<a href="/react/community/videos.html">Videos</a>
<a href="https://github.com/facebook/react/wiki/Examples" target="_blank">Examples</a>
<a href="https://github.com/facebook/react/wiki/Complementary-Tools" target="_blank">Complementary Tools</a>
</div>
<div>
<h5>More</h5>
<a href="/react/blog/">Blog</a>
<a href="https://github.com/facebook/react" target="_blank">GitHub</a>
<a href="http://facebook.github.io/react-native/" target="_blank">React Native</a>
<a href="/react/acknowledgements.html">Acknowledgements</a>
</div>
</section>
<a href="https://code.facebook.com/projects/" target="_blank" class="fbOpenSource">
<img src="/react/img/oss_logo.png" alt="Facebook Open Source" width="170" height="45"/>
</a>
<section class="copyright">
Copyright © {{ site.time | date: '%Y' }} Facebook Inc.
</section>
</footer>

View File

@@ -1,13 +0,0 @@
<div class="hero">
<div class="wrap">
<div class="text"><strong>React</strong></div>
<div class="minitext">
A JavaScript library for building user interfaces
</div>
<div class="buttons-unit">
<a href="/react/docs/hello-world.html" class="button">Get Started</a>
<a href="/react/tutorial/tutorial.html" class="button">Take the Tutorial</a>
</div>
</div>
</div>

View File

@@ -1,24 +0,0 @@
<div class="nav-docs">
<!-- Community Nav -->
{% for section in site.data.nav_community %}
<div class="nav-docs-section">
<h3>{{ section.title }}</h3>
<ul>
{% for item in section.items %}
<li>
{{ item | community_sidebar_link }}
{% if item.subitems %}
<ul>
{% for subitem in item.subitems %}
<li>
{{ subitem | community_sidebar_link }}
</li>
{% endfor %}
</ul>
{% endif %}
</li>
{% endfor %}
</ul>
</div>
{% endfor %}
</div>

Some files were not shown because too many files have changed in this diff Show More