154 Commits

Author SHA1 Message Date
Paul O’Shannessy df17c7efe3 v0.3.3 v0.3.3 2013-06-20 15:14:18 -07:00
CommitSyncScript 2af5be4c4c Support rendering different components into same node
var container = ...; // some DOM node
React.renderComponent(<div />, container);
React.renderComponent(<span />, container);

This should replace the rendered <div> with a <span>, effectively
reconciling at the root level.
(cherry picked from commit 100af48f53)
2013-06-20 10:57:26 -07:00
Paul O’Shannessy e105cb56e7 Improve JSXTransformer
The biggest improvement is that we'll now insert each parsed JSX script
back into a `<script>` tag with the body set. This allows the browser to
execute these scripts normally. Using `Function(functionBody)` or
`eval(functionBody)` both execute in window scope, but `var` assignments
don't actually get set on window (unlike everywhere else).

I also did some cleanup to make the code a little bit more readable.
In my minimal test cases this didn't break anything (scripts loaded in
the right order).
(cherry picked from commit c79a59b599)
2013-06-19 17:29:05 -07:00
Paul O’Shannessy 9757f0a7e7 Use github tarball link for esprima dependency
It turns out that (at least for local development) npm has a long
standing bug where it doesn't recognize changing dependencies stored as
git urls (see https://github.com/isaacs/npm/issues/1727). Luckily npm
understand tarballs and GitHub provides tarballs for every commit, so
the workaround is easy, though unfortunate.
(cherry picked from commit bd044fc919)
2013-06-19 17:29:05 -07:00
Ben Newman 2d677b78ba Upgrade Recast to 0.4.8 to fix options.writeback bug.
Bug introduced by: https://github.com/benjamn/recast/commit/e913b22f8f
Bug fixed by: https://github.com/benjamn/recast/commit/170e18091e
(cherry picked from commit 2383fd8813)
2013-06-19 17:29:04 -07:00
Ben Newman 3624afaade Upgrade Commoner and Recast to latest versions.
The Commoner upgrade is a big one because it makes bin/jsx no longer
rewrite module identifiers to be relative by default, which should
reduce confusion for people trying to use it as a standalone
transformer.

Closes #80.
(cherry picked from commit 15360056bd)
2013-06-19 17:29:04 -07:00
Paul O’Shannessy 0fbf7ad4e5 Ignore .module-cache directories
(cherry picked from commit 5bd449c157)
2013-06-19 17:29:04 -07:00
Ben Newman 9b810bd7b9 Cache modules for jsx grunt tasks in react-tools/.module-cache.
As of Commoner v0.6.11, the default is to put the cache files in
output/.module-cache, which used to be build/modules/.module-cache
before this commit. That still happens when you run bin/jsx directly,
just not for grunt tasks anymore.

The module cache needs to be cleared much less often than
build/modules, so it doesn't make sense to throw away all that work.
(cherry picked from commit 880ada0a1c)
2013-06-19 17:29:04 -07:00
Vjeux 1c486c40d0 Community Roundup #2 2013-06-19 12:33:14 -07:00
Christopher Chedeau 376045b401 Fix dangerouslySetInnerHTML 2013-06-19 12:32:50 -07:00
Paul O’Shannessy 267c97b14f Use absolute URLs for FB comments box 2013-06-18 10:21:28 -07:00
petehunt 9eed65d7db Update jsx-is-not-html.md 2013-06-17 17:18:48 -07:00
Ben Alpert f09a068c74 Link to my own blog 2013-06-17 17:18:42 -07:00
Greg Roodt 8eb46be792 Minor grammar. 2013-06-17 17:18:36 -07:00
Greg Roodt 7bbe9baf6f Minor typo. 2013-06-17 17:18:29 -07:00
Greg Roodt da9ddffb3a Update tutorial.md
The ajax call happens every 5 seconds, not every 60 seconds.
2013-06-17 17:18:23 -07:00
Vjeux 388c8a505d Adding JSX pitfalls section in the docs 2013-06-17 17:17:20 -07:00
Vjeux dadb3f79cd Facebook comments integration on Docs and Blog 2013-06-17 17:17:07 -07:00
Vjeux dcd85395fd Using markdown instead of html 2013-06-12 14:05:33 -07:00
Vjeux c2b4d338ab Integrate twitter in the support page 2013-06-12 14:05:21 -07:00
petehunt b148b1235e Fixed width/height on React logo 2013-06-12 14:00:33 -07:00
Vjeux 83e1dc5618 Community round-up blog post 2013-06-12 14:00:22 -07:00
jordow 92b795da6a Make todo example shorter and not rely on the DOM. 2013-06-07 15:40:09 -07:00
petehunt 3204135a46 Update 2013-06-05-why-react.md 2013-06-05 12:51:17 -06:00
Paul O’Shannessy a64faf7bf7 Fix broken link in Why React post 2013-06-05 10:02:11 -07:00
petehunt 4a79a718a3 Rename and fix typo 2013-06-05 08:46:51 -07:00
petehunt e293f998a1 Update 2013-06-04-why-react.md 2013-06-04 18:03:32 -06:00
Paul O’Shannessy dbfaa81ee0 Update links in readme to 0.3.2 2013-06-04 16:58:01 -06:00
petehunt 0f67f7a782 Merge pull request #56 from petehunt/blogpost
Bring in the last few edits
2013-06-04 13:55:01 -07:00
petehunt 4201ddaf4e Bring in the last few edits 2013-06-04 13:09:20 -07:00
petehunt 14f1f8f53a edits from the committee 2013-06-04 14:00:18 -06:00
petehunt 61b5bd81d8 update date 2013-06-04 01:54:15 -07:00
petehunt b441dcd6f0 Merge pull request #55 from spicyj/docs-fix-2
"nuts and bolts" isn't hyphenated
2013-06-04 00:57:09 -07:00
Ben Alpert 17d368910f "nuts and bolts" isn't hyphenated 2013-06-04 00:54:49 -07:00
petehunt 321e7e1175 Merge pull request #53 from yungsters/master
Revise "Why React" content.
2013-06-03 21:12:50 -07:00
yungsters bef3dd6760 Another pass over "Why React". 2013-06-03 15:54:26 -07:00
yungsters 3ded55f9f7 Revise "Why React" content. 2013-06-03 15:00:08 -07:00
Paul O’Shannessy 962cebf7c5 Merge pull request #43 from vjeux/jsfiddle
Add JSFiddle to the getting started section
2013-06-03 14:26:31 -07:00
Paul O’Shannessy 4081678f2e Merge pull request #49 from paulshen/jekyllrss
[docs] Add RSS feed.xml for blog posts
2013-06-03 14:12:54 -07:00
petehunt b202569c83 Merge pull request #52 from zpao/blog-tweaks
Improve blog setup
2013-06-03 13:59:29 -07:00
Paul O’Shannessy 55a8339781 Improve blog setup
* All posts under blog/
* Index @ blog/index.html
* Only show excerpt on index with "continue reading" link
* Date, name formatting improvements (better for humans)

It could probably still use some style tweaks but I feel better about
it.

Moving forward, we'll use the "excerpt" feature of Jekyll with the
default separator, which is just 2 newlines. So the first paragraph will
be special. Alternatively you can specify excerpt, but we'll want to fix
the layout so that gets added in.
2013-06-03 13:51:44 -07:00
petehunt a6707f158b Merge pull request #41 from divad12/homepage-examples-autobind
Consistently use autoBind on homepage examples
2013-06-03 12:53:26 -07:00
petehunt 96a5fe9e15 Merge pull request #51 from dschafer/patch-1
Highlight additional change in tutorial12.js
2013-06-03 12:51:12 -07:00
dschafer 24f523a351 Highlight additional change in tutorial12.js
tutorial12.js switches from using this.props to this.state. Let's highlight the change on line 10 as well to make that clear.
2013-06-03 13:48:14 -06:00
petehunt 065f8abfe3 Merge pull request #48 from petehunt/add-blog
Add "Why React"
2013-06-03 12:46:48 -07:00
petehunt 7b5602d00a @jeffreylin 2013-06-03 12:09:14 -07:00
Paul Shen 2bb7e15773 [docs] RSS: Pass title through xml_escape 2013-06-03 11:36:04 -07:00
Paul Shen cb9cc5de5c [docs] Use date_to_xmlschema in feed.xml 2013-06-03 11:34:42 -07:00
petehunt 0244123a52 Break lines 2013-06-03 11:19:51 -07:00
petehunt 1897bb3d2e @vjeux @benjamn 2013-06-03 11:16:38 -07:00