From bd03dedc5655803349c495e60209183e0f563dc0 Mon Sep 17 00:00:00 2001 From: Juho Teperi Date: Wed, 14 Mar 2018 00:54:51 +0200 Subject: [PATCH] Update 0.8-upgrade.md --- docs/0.8-upgrade.md | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/docs/0.8-upgrade.md b/docs/0.8-upgrade.md index be7c505..d4976ee 100644 --- a/docs/0.8-upgrade.md +++ b/docs/0.8-upgrade.md @@ -3,22 +3,26 @@ The necessary changes depend on what environment you target, and how you want to provide React. +| | Build | Browser | Node | +|---|---|---|---| +| Cljsjs | `:none` | Supported | Requires Cljs 1.10.145+ | +| Cljsjs | `:advanced` | Supported | Requires Cljs 1.10.145+ | +| `node modules` | `:none` | Supported | Supported | +| `node modules` | `:advanced` | Supported | Partially supported
(`ReactDOM/server` currently broken) | + ## Browser - Cljsjs -Using Reagent itself with Cljsjs packages doesn't require changes, -other than making sure you depend on the latest Cljsjs React packages, +Using Reagent with Cljsjs packages doesn't require changes, +other than making sure you update Cljsjs React dependencies, if you have direct dependencies to them. ## Browser - node modules -You can use `:npm-deps` and `:install-deps` compiler options to -install the packages automatically. - If `react`, `react-dom` and `create-react-class` are available in `node_modules` -directory, ClojureScript compiler will use these with Reagent. **This -doesn't depend on use of `:npm-deps` option!** `:npm-deps` option is only about -installing the dependencies, if packages are available in `node_modules` -directory, they will be used. +directory, ClojureScript compiler will use these with Reagent. To disable this by adding `:npm-deps false` compiler option. + +If you don't want to call `npm` and manage `package.json`, you can use `:npm-deps` and `:install-deps` compiler options to +install the packages automatically. You can use `:process-shim` compiler option to provide `process.env.NODE_ENV` constant which is used by JS code to enable development and production @@ -52,6 +56,8 @@ If your bundle provides other libraries, you could extern `:provides` and `:glob Requires https://github.com/clojure/clojurescript/commit/f7d611d87f6ea8a605eae7c0339f30b79a840b49 +Available in 1.0.46+ + Reagent should use Cljsjs libraries by default even when running on Node. ## NodeJS - node modules