Commit Graph

108 Commits

Author SHA1 Message Date
Dan Abramov
83d0dc4989 Remove unused build tasks 2017-06-15 00:22:06 +01:00
Dan Abramov
1f56a6d5c9 Replace Starter Kit with doc link (#8682)
* Replace Starter Kit with doc link

* https in Babel link
2017-01-04 17:52:12 +00:00
Sebastian Markbåge
5c2a88a9a1 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`.
(cherry picked from commit f7e0db9a18)
2016-10-03 16:18:51 -07:00
Sebastian Markbåge
7ae3bbee25 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.

(cherry picked from commit 8ef00dbb7d)
2016-10-03 16:08:27 -07:00
Dustan Kasten
396ab3eba1 ReactTestRenderer package (#7362)
(cherry picked from commit 7e874f59f5)
2016-07-28 21:42:42 -07:00
Marshall Bowers
67cc922747 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

(cherry picked from commit 69703e04d5)
2016-07-08 10:56:29 -07:00
Paul O’Shannessy
440543aa88 Setup grunt flow task and run on travis (#6684)
(cherry picked from commit c9504d99a5)
2016-06-14 15:29:35 -07:00
Sebastian Markbåge
5b4b6e7999 Merge pull request #6338 from sebmarkbage/reactnative2
Move React Core Integration and Injection to the Core Repo
(cherry picked from commit c84ad52ddb)
2016-04-20 09:39:50 -07:00
Paul O’Shannessy
90856ee61b 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
e61e6dd4ed Revert "Change release to multi task"
This reverts commit c77f0b2fc5.
2016-03-07 17:02:10 -08:00
Shinnosuke Watanabe
38bf3583cb 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
7c52b802b4 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
f3dbc40261 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
c77f0b2fc5 Change release to multi task
More concise and consistent with the other multitasks
2015-12-04 13:29:58 -05:00
Paul O’Shannessy
5a80b20017 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
c07b304c76 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
4a7456a136 review fixes 2015-11-05 05:11:39 +03:00
chico
8987522a2a remove eslint-disable when possible and update eslint version 2015-11-05 05:11:39 +03:00
Kevin Robinson
45c612ed7a 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
227ba42f81 Use the right gulp executable on Windows 2015-10-12 10:01:23 -07:00
Paul O’Shannessy
ff542de59d Build ReactDOM browser builds into react-dom/dist 2015-09-18 14:02:31 -07:00
Paul O’Shannessy
31f25255b9 Stop building JSXTransformer
Pick of/closes #4148.
2015-09-10 08:45:04 -07:00
Paul O’Shannessy
b2ca3349c2 Actually build react-dom file with the build 2015-09-08 22:18:44 -07:00
Leon Yip
e99e8b66b2 Update Gruntfile.js
Added punctuation to make the comment consistent with other comments.
2015-08-21 18:06:55 -07:00
Toru Kobayashi
656c2ef173 Remove fasttest task. fasttest is not fast 2015-08-05 19:00:23 +09:00
Paul O’Shannessy
94bc29b400 Remove react-tools completely 2015-07-30 10:15:36 -07:00
Paul O’Shannessy
7b37f8ac36 Fix gulp 2015-07-24 14:41:34 -07:00
Paul O’Shannessy
83c88578e9 Replace grunt-jest with our own runner
This gives us more control
2015-07-23 17:52:58 -07:00
Paul O’Shannessy
1d0c1b1817 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
3ca5c15c1e 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
5da408297f 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
fc0b42dc07 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
fc63cebd29 Stop building react-source gem
fixes #4069
2015-06-27 13:44:08 -07:00
Paul O’Shannessy
79561342c3 Build standalone react-addons packages 2015-06-21 20:01:21 +08:00
Paul O’Shannessy
3bae8f5f35 Build react-dom package 2015-06-15 11:01:39 -07:00
Ben Alpert
67a98468b2 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
6b79977c31 Merge pull request #3416 from koba04/remove-jshint
Remove the codes relating to jshint
2015-06-03 19:45:51 -07:00
Toru Kobayashi
ce46068def Remove the codes relating to jshint 2015-06-04 09:32:37 +09:00
Benjamin Woodruff
17e7046754 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
c089eece50 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
12ea09a03c Remove web worker test 2015-05-27 10:52:32 -07:00
Jack Zhang
f7a9a6c480 Missing punctuations in comments.
Added periods to two comment lines to ensure uniform format.
2015-04-25 20:50:30 -07:00
Ben Alpert
0b6c7c29fe 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
e931aaab4a 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
7291942550 Remove perf folder 2015-03-17 13:40:11 -07:00
chico
1511fff598 eslint 2015-02-13 02:43:42 +03:00
Paul O’Shannessy
892f0a59fe Fix lint on travis
PR #2852 was not quite correct
2015-01-13 16:55:10 -08:00
Paul O’Shannessy
84c83dca2d Add eslint grunt task, fail travis for it
This is it...
2015-01-13 16:11:42 -08:00
Martin Jul
70fdd5a287 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