Skip to content

Commit c425bb5

Browse files
committed
Merge branch 'master' of /Users/andy/es2015-library-skeleton
2 parents e225721 + 7846964 commit c425bb5

File tree

11 files changed

+93
-55
lines changed

11 files changed

+93
-55
lines changed

.babelrc

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,31 @@
11
{
2-
"presets": ["es2015", "stage-1", "flow", "react"],
3-
"plugins": ["transform-runtime", "flow-react-proptypes"],
2+
"presets": [
3+
"flow",
4+
"react"
5+
],
6+
"plugins": [
7+
"flow-react-proptypes"
8+
],
49
"env": {
510
"test": {
11+
"presets": [
12+
["env", {"node": "current"}]
13+
],
614
"plugins": ["istanbul"]
715
},
16+
"es5": {
17+
"presets": [
18+
["env", {"forceAllTransforms": true}]
19+
],
20+
"plugins": [
21+
"transform-runtime",
22+
"transform-react-constant-elements"
23+
]
24+
},
825
"production": {
9-
"plugins": ["transform-react-constant-elements"]
26+
"plugins": [
27+
"transform-react-constant-elements"
28+
]
1029
}
1130
}
1231
}

.eslintrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
2+
"env": {
3+
"es6": true
4+
},
25
"extends": [
36
"@jedwards1211/eslint-config-react", "@jedwards1211/eslint-config-flow"
47
],

.flowconfig

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[ignore]
22
<PROJECT_ROOT>/lib/.*
3+
<PROJECT_ROOT>/es5/.*
34
<PROJECT_ROOT>/node_modules/fbjs/.*
4-
<PROJECT_ROOT>/node_modules/.*/tests?/.*\.json
55

66
[include]
77
./src
@@ -13,4 +13,3 @@
1313
module.system=node
1414
esproposal.class_static_fields=enable
1515
esproposal.class_instance_fields=enable
16-

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
coverage
33
node_modules
44
lib
5+
es5
56
.eslintcache

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ npm i
1919
## Tools used
2020

2121
* babel 6
22+
* babel-preset-env
2223
* mocha
2324
* chai
2425
* istanbul

TEMPLATE-README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@
77

88
{{ description }}
99

10-
## Usage
10+
## Installation
1111

1212
```sh
1313
npm install --save {% if scope %}@{{ scope }}/{% endif %}{{ name }}
1414
```
15-

TEMPLATE-package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"url": "https://github.com/{{ organization }}/{{ name }}.git"
88
},
99
"author": "{{ author }}",
10+
"keywords": [],
1011
"bugs": {
1112
"url": "https://github.com/{{ organization }}/{{ name }}/issues"
1213
},

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"flow": "flow",
1111
"flow:coverage": "for file in src/**.js test/**.js; do echo $file; flow coverage $file; done",
1212
"flow:watch": "flow-watch -e js,js.flow,flowconfig --ignore lib/ --ignore node_modules/ --watch .flowconfig --watch src/ --watch test/",
13-
"build": "rimraf lib && babel src --out-dir lib && flow-copy-source -v src/ lib",
14-
"test": "NODE_ENV=production BABEL_ENV=test nyc --reporter=lcov --reporter=text mocha $npm_package_config_mocha",
13+
"build": "rimraf lib && BABEL_ENV=production babel src --out-dir lib && flow-copy-source -v src/ lib && rimraf es5 && BABEL_ENV=es5 babel src --out-dir es5 && flow-copy-source -v src/ es5",
14+
"test": "NODE_ENV=production BABEL_ENV=es5 mocha $npm_package_config_mocha && NODE_ENV=production BABEL_ENV=test nyc --reporter=lcov --reporter=text mocha $npm_package_config_mocha",
1515
"test:watch": "mocha --watch $npm_package_config_mocha",
1616
"codecov": "nyc report --reporter=text-lcov > coverage.lcov; codecov",
1717
"commitmsg": "commitlint -e $GIT_PARAMS",
@@ -68,8 +68,8 @@
6868
"babel-plugin-flow-react-proptypes": "^17.0.0",
6969
"babel-plugin-istanbul": "^4.0.0",
7070
"babel-plugin-transform-react-constant-elements": "^6.9.1",
71-
"babel-plugin-transform-runtime": "^6.22.0",
72-
"babel-preset-es2015": "^6.22.0",
71+
"babel-plugin-transform-runtime": "^6.23.0",
72+
"babel-preset-env": "^1.7.0",
7373
"babel-preset-flow": "^6.23.0",
7474
"babel-preset-react": "^6.16.0",
7575
"babel-preset-stage-1": "^6.22.0",

src/.eslintrc

Lines changed: 0 additions & 5 deletions
This file was deleted.

test/.eslintrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"env": {
3-
"es6": true,
43
"mocha": true
54
}
65
}

0 commit comments

Comments
 (0)