Skip to content

Commit

Permalink
publish to npm
Browse files Browse the repository at this point in the history
  • Loading branch information
Kiikurage committed Apr 14, 2018
1 parent caeb1bb commit 876293b
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 20 deletions.
20 changes: 4 additions & 16 deletions README.md
@@ -1,29 +1,18 @@
# babel-plugin-flow-to-typescript

<span color="red">**Work In Progress**</span>

[Babel] plugin to convert [Flow] code into [TypeScript]

## How to use

```shell
#--------------------------------------------
# 1. Clone and Build

$ git clone https://github.com/Kiikurage/babel-plugin-flow-to-typescript
$ yarn install
$ yarn run build

#--------------------------------------------
# 2. Use with Babel

$ yarn global add @babel/core @babel/cli
$ yarn global add @babel/cli
$ yarn add babel-plugin-flow-to-typescript

# you must use babel@^7.x.x
$ babel --version
> 7.0.0-beta.44 (@babel/core 7.0.0-beta.44)
7.0.0-beta.44 (@babel/core 7.0.0-beta.44)

$ babel --plugins ${ABS_PATH_TO_THIS_DIR}/dist ${SRC_FLOW_FILE} -o ${DEST_TS_FILE}
$ babel --plugins babel-plugin-flow-to-typescript ${SRC_FLOW_FILE} -o ${DEST_TS_FILE}
```

## Implementation status
Expand Down Expand Up @@ -51,7 +40,6 @@ $ babel --plugins ${ABS_PATH_TO_THIS_DIR}/dist ${SRC_FLOW_FILE} -o ${DEST_TS_FIL
|| $ElementType| `$ElementType<T, k>` | `T[k]` |

- [ ] add CLI
- [ ] publish to npm

[Babel]: https://github.com/babel/babel
[Flow]: https://github.com/facebook/flow
Expand Down
29 changes: 26 additions & 3 deletions package.json
@@ -1,14 +1,37 @@
{
"name": "babel-plugin-flow-to-typescript",
"version": "0.0.1",
"description": "Babel plugin to convert Flow into TypeScript",
"author": {
"name": "Yuichiro Kikura",
"email": "y.kikura@gmail.com",
"url": "https://github.com/Kiikurage"
},
"files": [
"dist",
"README.md"
],
"version": "0.1.0",
"scripts": {
"test": "jest --watch",
"test": "jest",
"test-watch": "jest --watch",
"build": "tsc"
},
"keywords": [
"babel",
"flow",
"typescript"
],
"main": "dist/index.js",
"repository": {
"type": "git",
"url": "https://github.com/Kiikurage/babel-plugin-flow-to-typescript.git"
},
"dependencies": {
"@babel/core": "^7.0.0-beta.44",
"@babel/traverse": "^7.0.0-beta.44",
"@babel/types": "^7.0.0-beta.44",
"@babel/types": "^7.0.0-beta.44"
},
"devDependencies": {
"@types/babel-core": "^6.25.3",
"@types/babel-types": "^7.0.1",
"@types/node": "^9.6.2",
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"declaration": false,
"declaration": true,
"lib": [
"es2018",
"dom"
Expand Down

0 comments on commit 876293b

Please sign in to comment.