Skip to content

Commit f42d881

Browse files
committedDec 12, 2017
Add babel as required for flow
1 parent 15aff25 commit f42d881

File tree

5 files changed

+1765
-14
lines changed

5 files changed

+1765
-14
lines changed
 

‎.babelrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"presets": ["flow"]
3+
}

‎.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ bower_components
2929
# node-waf configuration
3030
.lock-wscript
3131

32+
# Transpiled ES6 to ES5
33+
dist/
34+
3235
# Compiled binary addons (http://nodejs.org/api/addons.html)
3336
build/Release
3437

‎package-lock.json

+1,749-12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+6-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
"name": "wukanac-ci-base-nodejs-travis",
33
"version": "1.0.0",
44
"description": "CI with NodeJs and TravisCI",
5-
"main": "index.js",
5+
"main": "dist/index.js",
66
"scripts": {
7-
"test": "mocha --recursive --timeout=10000"
7+
"test": "mocha --recursive --timeout=10000",
8+
"build": "babel src/ -d dist/",
9+
"prepublish": "npm run build"
810
},
911
"repository": {
1012
"type": "git",
@@ -22,6 +24,8 @@
2224
},
2325
"homepage": "https://github.com/vukanac/ci-base-nodejs#readme",
2426
"devDependencies": {
27+
"babel-cli": "^6.26.0",
28+
"babel-preset-flow": "^6.23.0",
2529
"chai": "^4.1.2",
2630
"eslint": "^4.13.1",
2731
"eslint-config-airbnb": "^16.1.0",

‎src/index.js

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
type Person = {
2+
name: string,
3+
age: number
4+
};

0 commit comments

Comments
 (0)
Please sign in to comment.