Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/add doc and config to publish to npm #75

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
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"
}
}