react/fixtures/packaging
Dan Abramov d9c1dbd617 Use Yarn Workspaces (#11252)
* Enable Yarn workspaces for packages/*

* Move src/isomorphic/* into packages/react/src/*

* Create index.js stubs for all packages in packages/*

This makes the test pass again, but breaks the build because npm/ folders aren't used yet.
I'm not sure if we'll keep this structure--I'll just keep working and fix the build after it settles down.

* Put FB entry point for react-dom into packages/*

* Move src/renderers/testing/* into packages/react-test-renderer/src/*

Note that this is currently broken because Jest ignores node_modules,
and so Yarn linking makes Jest skip React source when transforming.

* Remove src/node_modules

It is now unnecessary. Some tests fail though.

* Add a hacky workaround for Jest/Workspaces issue

Jest sees node_modules and thinks it's third party code.

This is a hacky way to teach Jest to still transform anything in node_modules/react*
if it resolves outside of node_modules (such as to our packages/*) folder.

I'm not very happy with this and we should revisit.

* Add a fake react-native package

* Move src/renderers/art/* into packages/react-art/src/*

* Move src/renderers/noop/* into packages/react-noop-renderer/src/*

* Move src/renderers/dom/* into packages/react-dom/src/*

* Move src/renderers/shared/fiber/* into packages/react-reconciler/src/*

* Move DOM/reconciler tests I previously forgot to move

* Move src/renderers/native-*/* into packages/react-native-*/src/*

* Move shared code into packages/shared

It's not super clear how to organize this properly yet.

* Add back files that somehow got lost

* Fix the build

* Prettier

* Add missing license headers

* Fix an issue that caused mocks to get included into build

* Update other references to src/

* Re-run Prettier

* Fix lint

* Fix weird Flow violation

I didn't change this file but Flow started complaining.
Caleb said this annotation was unnecessarily using $Abstract though so I removed it.

* Update sizes

* Fix stats script

* Fix packaging fixtures

Use file: instead of NODE_PATH since NODE_PATH.
NODE_PATH trick only worked because we had no react/react-dom in root node_modules, but now we do.

file: dependency only works as I expect in Yarn, so I moved the packaging fixtures to use Yarn and committed lockfiles.
Verified that the page shows up.

* Fix art fixture

* Fix reconciler fixture

* Fix SSR fixture

* Rename native packages
2017-10-19 00:22:21 +01:00
..
babel-standalone Convert current build system to Rollup and adopt flat bundles (#9327) 2017-04-05 16:47:29 +01:00
browserify Use Yarn Workspaces (#11252) 2017-10-19 00:22:21 +01:00
brunch Use Yarn Workspaces (#11252) 2017-10-19 00:22:21 +01:00
globals Convert current build system to Rollup and adopt flat bundles (#9327) 2017-04-05 16:47:29 +01:00
requirejs Convert current build system to Rollup and adopt flat bundles (#9327) 2017-04-05 16:47:29 +01:00
rjs Use Yarn Workspaces (#11252) 2017-10-19 00:22:21 +01:00
systemjs Convert current build system to Rollup and adopt flat bundles (#9327) 2017-04-05 16:47:29 +01:00
systemjs-builder Use Yarn Workspaces (#11252) 2017-10-19 00:22:21 +01:00
webpack Use Yarn Workspaces (#11252) 2017-10-19 00:22:21 +01:00
webpack-alias Use Yarn Workspaces (#11252) 2017-10-19 00:22:21 +01:00
README.md Fix typos (#11204) 2017-10-14 16:26:10 -04:00
build-all.js Use Yarn Workspaces (#11252) 2017-10-19 00:22:21 +01:00
index.html Convert current build system to Rollup and adopt flat bundles (#9327) 2017-04-05 16:47:29 +01:00

README.md

Manual Testing Fixtures

This folder exists for React contributors only.
If you use React, you don't need to worry about it.

These fixtures verify that the built React distributions are usable in different environments.
They are not running automatically. (At least not yet. Feel free to contribute to automate them.)

Run them when you make changes to how we package React and ReactDOM.

How to Run

First, build React and the fixtures:

cd react
npm run build

cd fixtures/packaging
node build-all.js

Then run a local server at the root of the repo, e.g.

npm i -g pushstate-server
cd ../..
pushstate-server .

(Too complicated? Send a PR to simplify this :-)).

Then open the following URL in your browser:

open http://localhost:9000/fixtures/packaging/index.html

You should see two things:

  • "Hello World" is rendered in each iframe.
  • No errors in the console.