diff --git a/.gitignore b/.gitignore index 786fd3b8..10cec989 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,7 @@ demo-app/.enum_manifest.json demo-app/.source_strings.json demo-app/.src_manifest.json demo-app/output +demo-app/source_strings.json demo-app/src/translatedFbts.json demo-app/yarn-error.log @@ -25,6 +26,8 @@ live-demo-app/yarn-error.log # Publisehd NPM modules fbt-runtime/** +!fbt-runtime/.yarnrc +!fbt-runtime/package.json # documentation build artifacts website/build/ diff --git a/CHANGELOG.md b/CHANGELOG.md index 955cdd3e..4606e0a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,9 +7,9 @@ We haven't had the best track record of code/feature changes before this date, b ## TOC -- [fbt versions](#fbt versions) -- [babel-plugin-fbt versions](#babel-plugin-fbt versions) -- [babel-plugin-fbt-runtime versions](#babel-plugin-fbt-runtime versions) +- [fbt versions](#fbt-versions) +- [babel-plugin-fbt versions](#babel-plugin-fbt-versions) +- [babel-plugin-fbt-runtime versions](#babel-plugin-fbt-runtime-versions) ### fbt versions diff --git a/README.md b/README.md index 5c58911e..7933b5e1 100644 --- a/README.md +++ b/README.md @@ -50,5 +50,25 @@ https://facebookincubator.github.io/fbt See the [CONTRIBUTING](CONTRIBUTING.md) file for how to help out. +## List of npm modules published from this repo: + +- [fbt](https://www.npmjs.com/package/fbt) (client-side) + - See [package.json](fbt-runtime/package.json) config +- [babel-plugin-fbt](https://www.npmjs.com/package/babel-plugin-fbt) (server-side) + - See [package.json](transform/babel-plugin-fbt/package.json) config +- [babel-plugin-fbt-runtime](https://www.npmjs.com/package/babel-plugin-fbt-runtime) (server-side) + - See [package.json](transform/babel-plugin-fbt-runtime/package.json) config +- [fb-babel-plugin-utils](https://www.npmjs.com/package/fb-babel-plugin-utils) (server-side, used by `babel-plugin-fbt-runtime`) + - See [package.json](transform/fb-babel-plugin-utils/package.json) config + +## How to release a new npm version + +Example for the `fbt` npm module: + +``` +cd fbt-runtime/ +yarn publish_to_npm_latest +``` + ## License FBT is MIT licensed, as found in the [LICENSE](LICENSE) file. diff --git a/fbt-runtime/.yarnrc b/fbt-runtime/.yarnrc new file mode 100644 index 00000000..8d8de014 --- /dev/null +++ b/fbt-runtime/.yarnrc @@ -0,0 +1 @@ +version-tag-prefix "fbt-v" diff --git a/fbt-runtime/package.json b/fbt-runtime/package.json index f08e9161..44ca6e6f 100644 --- a/fbt-runtime/package.json +++ b/fbt-runtime/package.json @@ -1,6 +1,5 @@ { "//": "Copyright (c) Facebook, Inc. and its affiliates.", - "private": "false", "name": "fbt", "description": "The fbt i18n framework JS runtime.", "//version": "Follow SemVer specs at https://semver.org/", @@ -26,16 +25,17 @@ "style": "dist/fbt.css", "repository": "facebookincubator/fbt", "license": "MIT", - "dependencies": { - }, + "dependencies": {}, "peerDependencies": { "babel-plugin-fbt": "^0.9.14", "babel-plugin-fbt-runtime": "^0.9.4" }, - "devDependencies": { - }, + "devDependencies": {}, "devEngines": { "node": "6.x || 7.x || 8.x || 9.x || 10.x || 11.x", "npm": "6.x" + }, + "scripts": { + "publish_to_npm_latest": "yarn publish . && git push --tags && git push" } } diff --git a/transform/babel-plugin-fbt-runtime/.yarnrc b/transform/babel-plugin-fbt-runtime/.yarnrc new file mode 100644 index 00000000..8d8de014 --- /dev/null +++ b/transform/babel-plugin-fbt-runtime/.yarnrc @@ -0,0 +1 @@ +version-tag-prefix "fbt-v" diff --git a/transform/babel-plugin-fbt-runtime/package.json b/transform/babel-plugin-fbt-runtime/package.json index 93ceb8d3..fb88be80 100644 --- a/transform/babel-plugin-fbt-runtime/package.json +++ b/transform/babel-plugin-fbt-runtime/package.json @@ -12,5 +12,8 @@ }, "peerDependencies": { "babel-plugin-fbt": "^0.9.14" + }, + "scripts": { + "publish_to_npm_latest": "yarn publish . && git push --tags && git push" } } diff --git a/transform/babel-plugin-fbt/.yarnrc b/transform/babel-plugin-fbt/.yarnrc new file mode 100644 index 00000000..1e51a347 --- /dev/null +++ b/transform/babel-plugin-fbt/.yarnrc @@ -0,0 +1 @@ +version-tag-prefix "babel-plugin-fbt-v" diff --git a/transform/babel-plugin-fbt/package.json b/transform/babel-plugin-fbt/package.json index 513cff82..7bdd258c 100644 --- a/transform/babel-plugin-fbt/package.json +++ b/transform/babel-plugin-fbt/package.json @@ -14,5 +14,8 @@ "jest-docblock": "^24.3.0", "fbjs": "^1.0.0", "shelljs": "^0.7.8" + }, + "scripts": { + "publish_to_npm_latest": "yarn publish . && git push --tags && git push" } } diff --git a/transform/fb-babel-plugin-utils/package.json b/transform/fb-babel-plugin-utils/package.json index 8b2eae63..5b4f15fa 100644 --- a/transform/fb-babel-plugin-utils/package.json +++ b/transform/fb-babel-plugin-utils/package.json @@ -16,5 +16,8 @@ "@babel/plugin-syntax-object-rest-spread": "^7.0.0", "@babel/plugin-syntax-optional-catch-binding": "^7.0.0", "@babel/plugin-syntax-optional-chaining": "^7.0.0" + }, + "scripts": { + "publish_to_npm_latest": "yarn publish . && git push --tags && git push" } }