Skip to content

Commit

Permalink
Feat/add doc and config to publish to npm
Browse files Browse the repository at this point in the history
Summary: Pull Request resolved: #75

Differential Revision: D17177673

Pulled By: kayhadrin

fbshipit-source-id: 326509263e855126f09cc59009ae195f72e2f396
  • Loading branch information
kayhadrin authored and facebook-github-bot committed Sep 9, 2019
1 parent e9c591f commit 65e4555
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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/
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,25 @@ See the [CONTRIBUTING](CONTRIBUTING.md) file for how to help out.
## Change log
See [CHANGELOG](CHANGELOG.md).

## 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.
1 change: 1 addition & 0 deletions fbt-runtime/.yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
version-tag-prefix "fbt-v"
10 changes: 5 additions & 5 deletions fbt-runtime/package.json
Original file line number Diff line number Diff line change
@@ -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/",
Expand All @@ -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"
}
}
1 change: 1 addition & 0 deletions transform/babel-plugin-fbt-runtime/.yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
version-tag-prefix "fbt-v"
3 changes: 3 additions & 0 deletions transform/babel-plugin-fbt-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,8 @@
},
"peerDependencies": {
"babel-plugin-fbt": "^0.9.14"
},
"scripts": {
"publish_to_npm_latest": "yarn publish . && git push --tags && git push"
}
}
1 change: 1 addition & 0 deletions transform/babel-plugin-fbt/.yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
version-tag-prefix "babel-plugin-fbt-v"
3 changes: 3 additions & 0 deletions transform/babel-plugin-fbt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
3 changes: 3 additions & 0 deletions transform/fb-babel-plugin-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}

0 comments on commit 65e4555

Please sign in to comment.