FLUENT_REACT_UPGRADING (946B)
1 [//]: # ( 2 This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 3 ) 4 5 # Upgrading @fluent/react 6 7 ## Getting the Source 8 9 ```bash 10 git clone https://github.com/projectfluent/fluent.js 11 cd fluent.js 12 ``` 13 14 Then checkout the version/tag you want, e.g. `@fluent/react@0.10.0`. 15 16 ## Building fluent-react 17 18 ```bash 19 npm install 20 cd fluent-gecko 21 make fluent-react.js 22 cp dist/fluent-react.js <gecko-dev>/devtools/client/shared/vendor/fluent-react.js 23 ``` 24 25 ## Patching fluent-react 26 27 - Open `fluent-react.js` 28 - Replace `require('react')` with `require('resource://devtools/client/shared/vendor/react.js')` 29 - Replace `require('prop-types')` with `require('resource://devtools/client/shared/vendor/react-prop-types.js')` 30 31 ## Update the version: 32 33 The current version is 0.10.0. Update this version number everywhere in this file.