Skip to content

Commit 50a603b

Browse files
committed
fix: convert to poly package
BREAKING CHANGE: if building for legacy browsers with webpack or similar bundlers, you may need to add a rule to transpile this package to ES5.
2 parents 99e8b91 + 83bcb67 commit 50a603b

File tree

64 files changed

+10245
-10452
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+10245
-10452
lines changed

.babelrc

Lines changed: 40 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,45 @@
11
{
2-
presets: [
3-
'es2015',
4-
'stage-1',
2+
"plugins": [
3+
"syntax-dynamic-import",
4+
"transform-class-properties",
5+
"transform-export-extensions",
6+
"transform-object-rest-spread",
7+
"lodash"
58
],
6-
plugins: [
7-
'transform-runtime',
8-
'syntax-flow',
9-
'transform-flow-comments',
10-
'lodash',
9+
"presets": [
10+
"flow"
1111
],
12-
env: {
13-
test: {
14-
plugins: [
15-
'istanbul',
16-
'lodash',
12+
"env": {
13+
"test": {
14+
"presets": [
15+
["env", {"targets": {"node": "current"}}],
16+
"flow"
1717
],
18+
"plugins": [
19+
"transform-runtime",
20+
"lodash"
21+
]
1822
},
19-
},
20-
}
23+
"coverage": {
24+
"presets": [
25+
["env", {"targets": {"node": "current"}}],
26+
"flow"
27+
],
28+
"plugins": [
29+
"transform-runtime",
30+
"istanbul",
31+
"lodash"
32+
]
33+
},
34+
"es5": {
35+
"presets": [
36+
["env", {"forceAllTransforms": true}],
37+
"stage-1", "flow"
38+
],
39+
"plugins": [
40+
"transform-runtime",
41+
"lodash"
42+
]
43+
},
44+
}
45+
}

.eslintrc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
{
22
"extends": [
33
"@jedwards1211/eslint-config", "@jedwards1211/eslint-config-flow"
4-
]
4+
],
5+
"parser": "babel-eslint",
6+
"env": {
7+
"es6": true
8+
}
59
}

.flowconfig

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
[ignore]
22
<PROJECT_ROOT>/lib/.*
3-
.*/node_modules/.*/tests?/.*\.json
3+
<PROJECT_ROOT>/es/.*
4+
<PROJECT_ROOT>/node_modules/fbjs/.*
5+
<PROJECT_ROOT>/node_modules/.*/fbjs/.*
6+
<PROJECT_ROOT>/node_modules/findup/test/.*
47

58
[include]
69
./src
@@ -11,8 +14,5 @@
1114

1215
[options]
1316
module.system=node
14-
module.name_mapper='.*\.sass$' -> 'empty/object'
15-
module.name_mapper='.*\.scss$' -> 'empty/object'
16-
module.name_mapper='.*\.css$' -> 'empty/object'
1717
esproposal.class_static_fields=enable
1818
esproposal.class_instance_fields=enable

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,9 @@ coverage
22
.nyc_output
33
node_modules
44
lib
5+
<<<<<<< HEAD
56

7+
=======
8+
es
9+
.eslintcache
10+
>>>>>>> 83bcb673fd60bdafcfecf3dbf166a0dcb2a5340b

.npmignore

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
11
coverage
22
.nyc_output
3+
src
4+
lib
35
test
46
scripts
57
node_modules
68
.babelrc
79
.eslintrc
8-
.flowconfig
910
.travis.yml
11+
<<<<<<< HEAD
1012
flowlib
1113

14+
=======
15+
.eslintcache
16+
.idea
17+
solano.yml
18+
renovate.json
19+
commitlint.config.js
20+
flow-typed
21+
>>>>>>> 83bcb673fd60bdafcfecf3dbf166a0dcb2a5340b

.travis.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,16 @@ cache:
55
notifications:
66
email: false
77
node_js:
8+
- '8'
89
- '7'
910
- '6'
10-
- '4'
11-
before_script:
12-
- npm prune
11+
install:
12+
- yarn install --ignore-engines --check-files --frozen-lockfile
1313
script:
14-
- cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
14+
- yarn run prepublishOnly
1515
after_success:
16-
- npm run semantic-release
16+
- npm run codecov
17+
- npm run travis-deploy-once "npm run semantic-release"
1718
branches:
1819
except:
1920
- /^v\d+\.\d+\.\d+$/

README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# redux-features
22

3+
<<<<<<< HEAD
34
[![npm](https://badge.fury.io/js/redux-features.svg)](https://badge.fury.io/js/redux-features)
45
[![Build Status](https://travis-ci.org/jcoreio/redux-features.svg?branch=master)](https://travis-ci.org/jcoreio/redux-features)
56
[![Coverage Status](https://coveralls.io/repos/github/jcoreio/redux-features/badge.svg?branch=master)](https://coveralls.io/github/jcoreio/redux-features?branch=master)
@@ -555,4 +556,39 @@ store.dispatch(loadInitialFeatures())
555556
document.getElementById('root')
556557
))
557558
```
559+
=======
560+
[![Build Status](https://travis-ci.org/jedwards1211/es2015-library-skeleton.svg?branch=master)](https://travis-ci.org/jedwards1211/es2015-library-skeleton)
561+
[![Coverage Status](https://codecov.io/gh/jedwards1211/es2015-library-skeleton/branch/master/graph/badge.svg)](https://codecov.io/gh/jedwards1211/es2015-library-skeleton)
562+
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
563+
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
564+
565+
This is my personal skeleton for creating an ES2015 library npm package. You are welcome to use it.
566+
567+
## Quick start
568+
569+
```sh
570+
npm i -g howardroark/pollinate
571+
pollinate https://github.com/jedwards1211/es2015-library-skeleton.git --keep-history --name <package name> --author <your name> --organization <github organization> --description <package description>
572+
cd <package name>
573+
npm i
574+
```
575+
576+
## Tools used
577+
578+
* babel 6
579+
* babel-preset-env
580+
* mocha
581+
* chai
582+
* istanbul
583+
* nyc
584+
* babel-plugin-istanbul
585+
* eslint
586+
* eslint-watch
587+
* flow
588+
* flow-watch
589+
* pre-commit (runs eslnt and flow)
590+
* semantic-release
591+
* Travis CI
592+
* Coveralls
593+
>>>>>>> 83bcb673fd60bdafcfecf3dbf166a0dcb2a5340b
558594
Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
// flow-typed signature: 6683e317b86cbc6e4f7ba2ed155c1f4e
2+
// flow-typed version: <<STUB>>/@commitlint/cli_v^6.0.2/flow_v0.74.0
3+
4+
/**
5+
* This is an autogenerated libdef stub for:
6+
*
7+
* '@commitlint/cli'
8+
*
9+
* Fill this stub out by replacing all the `any` types.
10+
*
11+
* Once filled out, we encourage you to share your work with the
12+
* community by sending a pull request to:
13+
* https://github.com/flowtype/flow-typed
14+
*/
15+
16+
declare module '@commitlint/cli' {
17+
declare module.exports: any;
18+
}
19+
20+
/**
21+
* We include stubs for each file inside this npm package in case you need to
22+
* require those files directly. Feel free to delete any files that aren't
23+
* needed.
24+
*/
25+
declare module '@commitlint/cli/fixtures/empty/commitlint.config' {
26+
declare module.exports: any;
27+
}
28+
29+
declare module '@commitlint/cli/fixtures/extends-root/extended' {
30+
declare module.exports: any;
31+
}
32+
33+
declare module '@commitlint/cli/fixtures/inner-scope/commitlint.config' {
34+
declare module.exports: any;
35+
}
36+
37+
declare module '@commitlint/cli/fixtures/inner-scope/inner-scope/commitlint.config' {
38+
declare module.exports: any;
39+
}
40+
41+
declare module '@commitlint/cli/fixtures/issue-prefixes/commitlint.config' {
42+
declare module.exports: any;
43+
}
44+
45+
declare module '@commitlint/cli/fixtures/outer-scope/commitlint.config' {
46+
declare module.exports: any;
47+
}
48+
49+
declare module '@commitlint/cli/fixtures/parser-preset/commitlint.config' {
50+
declare module.exports: any;
51+
}
52+
53+
declare module '@commitlint/cli/fixtures/parser-preset/parser-preset' {
54+
declare module.exports: any;
55+
}
56+
57+
declare module '@commitlint/cli/fixtures/signoff/commitlint.config' {
58+
declare module.exports: any;
59+
}
60+
61+
declare module '@commitlint/cli/fixtures/simple/commitlint.config' {
62+
declare module.exports: any;
63+
}
64+
65+
declare module '@commitlint/cli/lib/cli' {
66+
declare module.exports: any;
67+
}
68+
69+
declare module '@commitlint/cli/lib/cli.test' {
70+
declare module.exports: any;
71+
}
72+
73+
declare module '@commitlint/cli/lib/help' {
74+
declare module.exports: any;
75+
}
76+
77+
declare module '@commitlint/cli/src/cli' {
78+
declare module.exports: any;
79+
}
80+
81+
declare module '@commitlint/cli/src/cli.test' {
82+
declare module.exports: any;
83+
}
84+
85+
declare module '@commitlint/cli/src/help' {
86+
declare module.exports: any;
87+
}
88+
89+
// Filename aliases
90+
declare module '@commitlint/cli/fixtures/empty/commitlint.config.js' {
91+
declare module.exports: $Exports<'@commitlint/cli/fixtures/empty/commitlint.config'>;
92+
}
93+
declare module '@commitlint/cli/fixtures/extends-root/extended.js' {
94+
declare module.exports: $Exports<'@commitlint/cli/fixtures/extends-root/extended'>;
95+
}
96+
declare module '@commitlint/cli/fixtures/inner-scope/commitlint.config.js' {
97+
declare module.exports: $Exports<'@commitlint/cli/fixtures/inner-scope/commitlint.config'>;
98+
}
99+
declare module '@commitlint/cli/fixtures/inner-scope/inner-scope/commitlint.config.js' {
100+
declare module.exports: $Exports<'@commitlint/cli/fixtures/inner-scope/inner-scope/commitlint.config'>;
101+
}
102+
declare module '@commitlint/cli/fixtures/issue-prefixes/commitlint.config.js' {
103+
declare module.exports: $Exports<'@commitlint/cli/fixtures/issue-prefixes/commitlint.config'>;
104+
}
105+
declare module '@commitlint/cli/fixtures/outer-scope/commitlint.config.js' {
106+
declare module.exports: $Exports<'@commitlint/cli/fixtures/outer-scope/commitlint.config'>;
107+
}
108+
declare module '@commitlint/cli/fixtures/parser-preset/commitlint.config.js' {
109+
declare module.exports: $Exports<'@commitlint/cli/fixtures/parser-preset/commitlint.config'>;
110+
}
111+
declare module '@commitlint/cli/fixtures/parser-preset/parser-preset.js' {
112+
declare module.exports: $Exports<'@commitlint/cli/fixtures/parser-preset/parser-preset'>;
113+
}
114+
declare module '@commitlint/cli/fixtures/signoff/commitlint.config.js' {
115+
declare module.exports: $Exports<'@commitlint/cli/fixtures/signoff/commitlint.config'>;
116+
}
117+
declare module '@commitlint/cli/fixtures/simple/commitlint.config.js' {
118+
declare module.exports: $Exports<'@commitlint/cli/fixtures/simple/commitlint.config'>;
119+
}
120+
declare module '@commitlint/cli/index' {
121+
declare module.exports: $Exports<'@commitlint/cli'>;
122+
}
123+
declare module '@commitlint/cli/index.js' {
124+
declare module.exports: $Exports<'@commitlint/cli'>;
125+
}
126+
declare module '@commitlint/cli/lib/cli.js' {
127+
declare module.exports: $Exports<'@commitlint/cli/lib/cli'>;
128+
}
129+
declare module '@commitlint/cli/lib/cli.test.js' {
130+
declare module.exports: $Exports<'@commitlint/cli/lib/cli.test'>;
131+
}
132+
declare module '@commitlint/cli/lib/help.js' {
133+
declare module.exports: $Exports<'@commitlint/cli/lib/help'>;
134+
}
135+
declare module '@commitlint/cli/src/cli.js' {
136+
declare module.exports: $Exports<'@commitlint/cli/src/cli'>;
137+
}
138+
declare module '@commitlint/cli/src/cli.test.js' {
139+
declare module.exports: $Exports<'@commitlint/cli/src/cli.test'>;
140+
}
141+
declare module '@commitlint/cli/src/help.js' {
142+
declare module.exports: $Exports<'@commitlint/cli/src/help'>;
143+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// flow-typed signature: 12857df53d6bf6d09eb4234e7d8f816c
2+
// flow-typed version: <<STUB>>/@commitlint/config-conventional_v^6.0.2/flow_v0.74.0
3+
4+
/**
5+
* This is an autogenerated libdef stub for:
6+
*
7+
* '@commitlint/config-conventional'
8+
*
9+
* Fill this stub out by replacing all the `any` types.
10+
*
11+
* Once filled out, we encourage you to share your work with the
12+
* community by sending a pull request to:
13+
* https://github.com/flowtype/flow-typed
14+
*/
15+
16+
declare module '@commitlint/config-conventional' {
17+
declare module.exports: any;
18+
}
19+
20+
/**
21+
* We include stubs for each file inside this npm package in case you need to
22+
* require those files directly. Feel free to delete any files that aren't
23+
* needed.
24+
*/
25+
26+
27+
// Filename aliases
28+
declare module '@commitlint/config-conventional/index' {
29+
declare module.exports: $Exports<'@commitlint/config-conventional'>;
30+
}
31+
declare module '@commitlint/config-conventional/index.js' {
32+
declare module.exports: $Exports<'@commitlint/config-conventional'>;
33+
}

0 commit comments

Comments
 (0)