Commit Graph
108 Commits
Author SHA1 Message Date
Dan AbramovandGitHub 5472c94996 Add Fiber Debugger (#8033)
* Build react-noop as a package

This lets us consume it from the debugger.

* Add instrumentation to Fiber

* Check in Fiber Debugger
2016-10-25 08:36:37 +01:00
Sebastian MarkbågeandGitHub 390d72adfc Build React DOM Fiber package (#7173)
This builds a `react-dom-fiber.js` bundle which exposes ReactDOMFiber.
This allows early experiments with the new Fiber reconciler.

I also expose it in the npm package through `react-dom/fiber`.
2016-08-10 18:45:14 -07:00
Sebastian MarkbågeandGitHub 63e1203674 Bundle DOM renderers into their individual UMD bundles (#7164)
* Cut out isomorphic dependencies from the renderers

These files reaches into isomorphic files.

The ReactElement functions are exposed on the React object anyway
so I can just use those instead.

I also found some files that are not shared that should be in
renderers shared.

* Found a few more shared dependencies

renderSubtreeIntoContainer is only used by the DOM renderer.
It's not an addon.

ReactClass isn't needed as a dependency since injection doesn't
happen anymore.

* Use a shim file to load addons' dependencies on DOM

By replacing this intermediate file we can do the lazy loading
without needing any lazy requires. This set up works with ES
modules.

We could also replace the globalShim thing with aliased files
instead for consistency.

* Bundle DOM renderers into their individual UMD bundles

Instead of exposing the entire DOM renderer on the react.js
package, I only expose CurrentOwner and ComponentTreeDevtool which
are currently the only two modules that share __state__ with the
renderers.

Then I package each renderer in its own package. That could allow
us to drop more server dependencies from the client package. It
will also allow us to ship fiber as a separate renderer.

Unminified DEV            after     before
react.js                  123kb     696kb
react-with-addons.js      227kb     774kb
react-dom.js              668kb     1kb
react-dom-server.js       638kb     1kb

Minified PROD             after     before
react.min.js               24kb     154kb
react-with-addons.min.js   37kb     166kb
react-dom.min.js          149kb     1kb
react-dom-server.min.js   144kb     1kb

The total size for react.min.js + react-dom.min.js is +19kb larger
because of the overlap between them right now. I'd like to see
what an optimizing compiler can do to this. Some of that is fbjs
stuff. There shouldn't need to be that much overlap so that's
something we can hunt. We should keep isomorphic absolutely
minimal so there's no reason for other React clones not to use it.
There will be less overlap with Fiber.

However, another strategy that we could do is package the
isomorphic package into each renderer bundle and conditionally
initialize it if it hasn't already been initialized. That way
you only pay an overlap tax when there are two renderers on the
page but not without it. It's also easier to just pull in one
package. The downside is the versioning stuff that the separate
npm package would solve. That applies to CDNs as well.

ReactWithAddons is a bit weird because it is packaged into the
isomorphic package but has a bunch of DOM dependencies. So we have
to load them lazily since the DOM package gets initialized after.
2016-08-09 12:39:03 -07:00
Dustan KastenandPaul O’Shannessy e7c6417da2 ReactTestRenderer package (#7362) 2016-07-28 21:39:05 -07:00
Marshall BowersandPaul O’Shannessy 6031037eee Gulp: lint, flow, and version-check (#7174)
* Add plugin loading for gulp

* Convert `lint` task to gulp

* Convert `flow` task to gulp

* Convert `version-check` task to gulp

* Add missing semicolons
2016-07-05 13:30:09 -07:00
Paul O’Shannessy 1dc7dac68d Setup grunt flow task and run on travis (#6684) 2016-05-03 18:16:38 -07:00
Sebastian Markbage e7b3efb987 Ensure react-native-renderer package gets copied 2016-04-20 03:35:31 +01:00
Sebastian Markbage 3a2138d04f Build an dedicated npm package for react-native-renderer 2016-04-20 03:35:30 +01:00
Paul O’Shannessy af2c9fac21 Remove jsx task & jsx-internal script
These haven't been used in a long time so it's time to get rid of them.
2016-04-05 10:18:42 -07:00
Paul O’Shannessy a292f19cdc Revert "Change release to multi task"
This reverts commit 9869a269d2.
2016-03-07 17:02:10 -08:00
Shinnosuke Watanabe 740bfe557d Do not get process object by using require
Because `process` object is globally available in Node.js.
2016-02-09 01:41:24 +09:00
Paul O’Shannessy ff3fccf40a Clean up ununsed devDeps
Also removed object-assign. We only support building with node v4+ which has Object.assign.
2016-01-22 10:17:30 -08:00
Paul O’Shannessy eb9622b01e Split jest task into two
This ensures that we don't make jest do the additional tracking it needs to make coverage work.
2015-12-22 10:25:34 -08:00
zwhitchcox 9869a269d2 Change release to multi task
More concise and consistent with the other multitasks
2015-12-04 13:29:58 -05:00
Paul O’Shannessy 31049d4b61 Make sure react-dom-server is shipped in release process
Also removed some duplicated code to simplify a bit
2015-11-18 13:08:44 -08:00
Paul O’Shannessy eb5598e363 Merge pull request #5381 from kevinrobinson/react-dom-server-package
Add additional secret property to build artifact for react-dom-server
2015-11-17 16:48:08 -08:00
chico cdaa48e719 review fixes 2015-11-05 05:11:39 +03:00
chico 96af5176c4 remove eslint-disable when possible and update eslint version 2015-11-05 05:11:39 +03:00
Kevin Robinson 9259e24012 Add additional secret property and build for react-dom-server
Update eslintrc, travis build and add task to Gruntfile
2015-11-03 16:39:58 -05:00
Paul O’Shannessy fe098530dd Use the right gulp executable on Windows 2015-10-12 10:01:23 -07:00
Paul O’Shannessy 0402f941be Build ReactDOM browser builds into react-dom/dist 2015-09-18 14:02:31 -07:00
Paul O’ShannessyandBen Alpert 4733d111c9 Stop building JSXTransformer
Pick of/closes #4148.
2015-09-10 08:45:04 -07:00
Paul O’Shannessy fd2c524686 Actually build react-dom file with the build 2015-09-08 22:18:44 -07:00
Leon Yip 0bb2198ed8 Update Gruntfile.js
Added punctuation to make the comment consistent with other comments.
2015-08-21 18:06:55 -07:00
Toru Kobayashi 3035c312f1 Remove fasttest task. fasttest is not fast 2015-08-05 19:00:23 +09:00
Paul O’Shannessy c47bad9251 Remove react-tools completely 2015-07-30 10:15:36 -07:00
Paul O’Shannessy 5782db2ed1 Fix gulp 2015-07-24 14:41:34 -07:00
Paul O’Shannessy 719a35560c Replace grunt-jest with our own runner
This gives us more control
2015-07-23 17:52:58 -07:00
Paul O’Shannessy 1c5742119a Use fbjs package from npm, gulp
This reworks a few things in building and distributing React. The biggest change is using fbjs to share dependencies with other libraries. We're also using Gulp for some build steps.
2015-07-23 15:48:02 -07:00
Paul O’Shannessy c10fb6a473 Merge pull request #4092 from mking/remove-react-source-gem
Stop building react-source gem
2015-07-20 15:18:26 -07:00
Paul O’Shannessy 5d41533bcc Remove in-browser unit testing
Rely on jest for now until we get a better and less hacky solution to running tests in the browser, probably a totally different test suite with different behavior/goals.
2015-07-17 00:13:16 -07:00
Benjamin Woodruff beb263aad8 Run eslint tests with jest
Turns out eslint-tester works with jest (!)

We take advantage of this internally at FB, so we'll do it here too.

Fixes #4328
2015-07-09 15:59:59 -07:00
Matthew King f03bf836be Stop building react-source gem
fixes #4069
2015-06-27 13:44:08 -07:00
Paul O’Shannessy 6e7df2e480 Build standalone react-addons packages 2015-06-21 20:01:21 +08:00
Paul O’Shannessy b9a09ab474 Build react-dom package 2015-06-15 11:01:39 -07:00
Ben Alpert e658ddedb0 Inline requires in Gruntfile
I think this makes it quite a bit easier to understand.
2015-06-11 15:00:30 -07:00
Paul O’Shannessy 6dd978e4fb Merge pull request #3416 from koba04/remove-jshint
Remove the codes relating to jshint
2015-06-03 19:45:51 -07:00
Toru Kobayashi f647496b06 Remove the codes relating to jshint 2015-06-04 09:32:37 +09:00
Benjamin Woodruff 4c6c012de5 Add custom eslint rule for warning and invariant
See #2869

Checks that the *second* argument of warning and invariant are a literal
string, or a concatination of literal strings, and that the number of
arguments is correct based on the number of %s substrings.

This commit also fixes a few places where the existing code had broken
error messages!

The rule itself is pretty straightforward, although adding the tests
ended up being a bit painful, as eslint-tester depends on mocha, and
therefore needs to be run in a separate grunt task.
2015-06-03 17:19:32 -07:00
Benjamin Woodruff 3e6b56c25b Switch to using comma-dangle: always-multiline
This is a machine-generated codemod, but it's pretty safe since it was
generated by hooking into eslint's own report.

A few files had to be touched up by hand because there were existing
formatting issues with nested arrays/objects:

src/shared/utils/__tests__/OrderedMap-test.js
src/shared/utils/__tests__/Transaction-test.js
src/shared/utils/__tests__/traverseAllChildren-test.js
src/isomorphic/children/__tests__/ReactChildren-test.js
2015-06-02 16:57:26 -07:00
Ben Alpert 8eec321665 Remove web worker test 2015-05-27 10:52:32 -07:00
Jack Zhang c7fe17e768 Missing punctuations in comments.
Added periods to two comment lines to ensure uniform format.
2015-04-25 20:50:30 -07:00
Ben Alpert 781fa91eef Keep docs/js/{react,JSXTransformer}.js in repo
This way we don't need to rebuild them each time for the website.
2015-03-28 14:56:54 -07:00
PNikray cdfa8f0413 Removed build:test from test:coverage.
This was a duplicate task for build:withCodeCoverageLogging.
It should now properly output the lines which are not covered.
2015-03-23 21:32:49 +01:00
cpojer 7cc4bb2f15 Remove perf folder 2015-03-17 13:40:11 -07:00
chico 955e8307eb eslint 2015-02-13 02:43:42 +03:00
Paul O’Shannessy cff4eae11d Fix lint on travis
PR #2852 was not quite correct
2015-01-13 16:55:10 -08:00
Paul O’Shannessy 5fd9d3c3a6 Add eslint grunt task, fail travis for it
This is it...
2015-01-13 16:11:42 -08:00
Martin Jul 3aa7471475 Added missing semicolon after statement. 2014-10-22 23:46:54 +02:00
Paul O’Shannessy 520c4f96d4 Move react-source gem out of project root
Now it requires a build step. At least the confusing lib directory is
gone though.
2014-07-21 22:56:32 -07:00