Skip to content
A JavaScript Internationalization Framework
JavaScript Java CSS Ruby Objective-C++ Objective-C
Branch: master
Clone or download

Latest commit

kayhadrin and facebook-github-bot fix: update node version used by Travis to install Prettier (#147)
Summary:
The bug happens because we added Prettier as a new dependency but our Travis build setup is using an outdated node version.

https://travis-ci.com/github/facebook/fbt/jobs/344162645
```
$ node --version
v10.4.0
$ npm --version
6.1.0
$ nvm --version
0.35.3
$ yarn --version
1.15.2
before_install.1
2.67s$ curl -o- -L https://yarnpkg.com/install.sh | bash
before_install.2
0.00s$ export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
20.92s$ yarn --frozen-lockfile
yarn install v1.22.4
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
warning file-loader@2.0.0: Invalid bin field for "file-loader".
info fsevents@1.2.11: The platform "linux" is incompatible with this module.
info "fsevents@1.2.11" is an optional dependency and failed compatibility check. Excluding it from installation.
error prettier@2.0.5: The engine "node" is incompatible with this module. Expected version ">=10.13.0". Got "10.4.0"
error Found incompatible module.
```

Updating the node version to something compatible with it.

Fixing T68062657.
Pull Request resolved: #147

Test Plan:
Let Travis run.
Successful Travis build: https://github.com/facebook/fbt/pull/147/checks?check_run_id=743551691

Reviewed By: jrwats

Differential Revision: D21910403

Pulled By: kayhadrin

fbshipit-source-id: b1b3e32ef583d162df28e708e8a6de7acbcd3518
Latest commit d25a6b4 Jun 6, 2020

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github `s/facebookincubator/facebook` Feb 27, 2020
demo-app feat(fbt): Add ability to provide your own ViewerContext dynamically May 28, 2020
docs feat(fbt): document new getViewerContext() hook API May 28, 2020
flow-types fix: sync babelTypeShims.js to GitHub Jun 5, 2020
packages fix(babel-plugin-fbt): fix test case for <fbt> within template literals Jun 5, 2020
runtime
website docs: fix "Docs" landing page Apr 20, 2020
.flowconfig feat(fbt): Add ability to provide your own ViewerContext dynamically May 28, 2020
.gitignore migrated docusaurus from v1 to v2 (#113) Dec 1, 2019
.travis.yml fix: update node version used by Travis to install Prettier (#147) Jun 6, 2020
CHANGELOG.md fix(babel-plugin-fbt): avoid throwing errors during string extraction… Jun 5, 2020
CODE_OF_CONDUCT.md Adopt Contributor Covenant Aug 29, 2019
CONTRIBUTING.md Add a manifest generator for OSS Dec 22, 2018
LICENSE Sync with internal: Update to MIT LICENSE, fix lint errors Dec 19, 2018
README.md Updating README and CHANGELOG files Mar 3, 2020
babelPresets.js fix(fbt): fix merge issue in babelPresets.js May 5, 2020
gulpfile.js fix(fbt): Rewrite our required modules in `*.js.flow` Mar 5, 2020
jest-preprocessor.js refactor: make generated code flow strict Nov 6, 2019
jest.config.js chore: Fix clownly regex in jest config Nov 16, 2019
moduleMap.js fix(fbt): invariant dependency in fbt Mar 5, 2020
package.json refactor(babel-plugin-fbt): use prettier to store output test code sn… Jun 5, 2020
yarn.lock refactor(babel-plugin-fbt): use prettier to store output test code sn… Jun 5, 2020

README.md

Travis CI Twitter Follow Discord Chat Facebook Group

FBT

FBT is an internationalization framework for JavaScript designed to be not just powerful and flexible, but also simple and intuitive. It helps with the following:

  • Organizing your source text for translation
  • Composing grammatically correct translatable UI
  • Eliminating verbose boilerplate for generating UI

Examples

See our demo here See our React Native demo here

Requirements

Building the fbt library

git clone git@github.com:facebook/fbt.git
cd fbt
yarn install

NOTE: if you make changes to the fbt runtime that you'd like to test in the demo-app, be sure to run this command to rebuild the JS code:

yarn build-runtime

Using fbt

See how to use the source directly with Babel and Webpack in our demo-app.

How FBT works

FBT works by transforming your <fbt> and fbt(...) constructs via Babel plugins. These plugins serve to extract strings from source and lookup translated payloads generated at build-time. FBT creates tables of all possible variations for the given fbt phrase and accesses this at runtime.

Full documentation

https://facebook.github.io/fbt

Join the fbt community

See the CONTRIBUTING file for how to help out.

Change log

See CHANGELOG.

List of npm modules published from this repo:

How to release a new npm version

# Go to the module's folder (where package.json is located)
cd fbt-runtime/
# or
# cd packages/babel-plugin-fbt/
# cd packages/babel-plugin-runtime/

# publishes to npm and push new git tag to Github
yarn publish_to_npm_latest

License

FBT is MIT licensed, as found in the LICENSE file.

You can’t perform that action at this time.