Skip to content

Commit c91c0bf

Browse files
committed
Merge branch 'pollinate'
2 parents 40d04f0 + 7a999b1 commit c91c0bf

File tree

9 files changed

+133
-8
lines changed

9 files changed

+133
-8
lines changed

.travis.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,8 @@ before_script:
1212
- npm prune
1313
script:
1414
- cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
15-
15+
after_success:
16+
- npm run semantic-release
17+
branches:
18+
except:
19+
- /^v\d+\.\d+\.\d+$/

PROJECT-LICENSE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2016-present {{ author }}
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
22+

PROJECT-README

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# {{ name }}
2+
3+
[![Build Status](https://travis-ci.org/{{ organization }}/{{ name }}.svg?branch=master)](https://travis-ci.org/{{ organization }}/{{ name }})
4+
[![Coverage Status](https://coveralls.io/repos/github/{{ organization }}/{{ name }}/badge.svg?branch=master)](https://coveralls.io/github/{{ organization }}/{{ name }}?branch=master)
5+
[![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)
6+
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
7+
8+
{{ description }}
9+
10+
## Usage
11+
12+
```sh
13+
npm install --save {% if scope %}@{{ scope }}/{% endif %}{{ name }}
14+
```
15+

PROJECT-package.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "{% if scope %}@{{ scope }}/{% endif %}{{ name }}",
3+
"version": "0.0.0-development",
4+
"description": "{{ description }}",
5+
"repository": {
6+
"type": "git",
7+
"url": "https://github.com/{{ organization }}/{{ name }}.git"
8+
},
9+
"author": "{{ author }}",
10+
"bugs": {
11+
"url": "https://github.com/{{ organization }}/{{ name }}/issues"
12+
},
13+
"homepage": "https://github.com/{{ organization }}/{{ name }}#readme"
14+
}
15+

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,21 @@
22

33
[![Build Status](https://travis-ci.org/jedwards1211/react-library-skeleton.svg?branch=master)](https://travis-ci.org/jedwards1211/react-library-skeleton)
44
[![Coverage Status](https://coveralls.io/repos/github/jedwards1211/react-library-skeleton/badge.svg?branch=master)](https://coveralls.io/github/jedwards1211/react-library-skeleton?branch=master)
5+
[![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)
56
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
67

78
This is my personal skeleton for creating a React library npm package. You are welcome to use it.
89

10+
## Quick start
11+
12+
```sh
13+
# this PR of mine will hopefully be merged soon
14+
npm i -g howardroark/pollinate#keep-history
15+
pollinate https://github.com/jedwards1211/react-library-skeleton.git#pollinate --name <package name> --author <your name> --organization <github organization> --description <package description>
16+
cd <package name>
17+
npm i
18+
```
19+
920
## Tools used
1021

1122
* babel 6
@@ -24,6 +35,7 @@ This is my personal skeleton for creating a React library npm package. You are
2435
* commitmsg: uses validate-commit-msg
2536
* precommit: runs lint and flow
2637
* prepush: runs test
38+
* semantic-release
2739
* Travis CI
2840
* Coveralls
2941

complete.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env bash
2+
set -e
3+
4+
git remote rename origin skeleton
5+
git branch -D master
6+
git checkout -b master
7+
rm complete.sh
8+
git add --all .
9+
git commit -n -m 'pollinate project'
10+

package.json

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-library-skeleton",
3-
"version": "5.0.0",
3+
"version": "0.0.0-development",
44
"description": "my personal skeleton for React library NPM packages",
55
"main": "lib/index.js",
66
"scripts": {
@@ -14,13 +14,13 @@
1414
"copy-flow-files": "cd src; copy *.js.flow **/*.js.flow ../lib",
1515
"build": "rimraf lib && babel src --out-dir lib",
1616
"test": "NODE_ENV=production BABEL_ENV=test nyc --reporter=lcov --reporter=text mocha $npm_package_config_mocha",
17+
"test:watch": "mocha --watch $npm_package_config_mocha",
1718
"commitmsg": "validate-commit-msg",
1819
"precommit": "npm run lint && flow",
1920
"prepush": "npm test",
2021
"prepublish": "npm run lint && flow && npm test && npm run build && npm run copy-flow-files",
21-
"storybook": "start-storybook -p 6006",
22-
"build-storybook": "build-storybook",
23-
"open:coverage": "open coverage/lcov-report/index.html"
22+
"open:coverage": "open coverage/lcov-report/index.html",
23+
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
2424
},
2525
"config": {
2626
"mocha": "--compilers js:babel-core/register -r jsdom-global/register ./test/**.js",
@@ -74,8 +74,21 @@
7474
"copy": "^0.3.0",
7575
"coveralls": "^2.11.15",
7676
"enzyme": "^2.7.0",
77-
"eslint": "^3.13.0",
78-
"eslint-plugin-flowtype": "^2.29.2",
77+
"babel-cli": "^6.22.2",
78+
"babel-core": "^6.22.1",
79+
"babel-eslint": "^7.1.1",
80+
"babel-plugin-istanbul": "^4.0.0",
81+
"babel-plugin-transform-runtime": "^6.22.0",
82+
"babel-preset-es2015": "^6.22.0",
83+
"babel-preset-flow": "^6.23.0",
84+
"babel-preset-stage-1": "^6.22.0",
85+
"babel-register": "^6.22.0",
86+
"babel-runtime": "^6.22.0",
87+
"chai": "^3.5.0",
88+
"copy": "^0.3.0",
89+
"coveralls": "^2.11.16",
90+
"eslint": "^3.13.1",
91+
"eslint-plugin-flowtype": "^2.30.0",
7992
"eslint-plugin-react": "^6.8.0",
8093
"eslint-watch": "^3.0.0",
8194
"flow-bin": "^0.41.0",
@@ -85,12 +98,13 @@
8598
"jsdom": "^9.9.1",
8699
"jsdom-global": "^2.1.1",
87100
"mocha": "^3.2.0",
88-
"nyc": "^10.0.0",
101+
"nyc": "^10.1.2",
89102
"react": "^15.4.2",
90103
"react-addons-test-utils": "^15.4.2",
91104
"react-dom": "^15.4.2",
92105
"react-hot-loader": "^3.0.0-beta.2",
93106
"rimraf": "^2.5.4",
107+
"semantic-release": "^6.3.6",
94108
"validate-commit-msg": "^2.8.2"
95109
},
96110
"peerDependencies": {

template.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"organization": "jedwards1211",
3+
"scope": "",
4+
"name": "react-library-skeleton",
5+
"description": "my personal skeleton for React library NPM packages",
6+
"author": "Andy Edwards",
7+
"parse": [
8+
"PROJECT-README",
9+
"PROJECT-LICENSE",
10+
"PROJECT-package.json"
11+
],
12+
"merge": [
13+
["package.json", "PROJECT-package.json"]
14+
],
15+
"discard": [
16+
"README.md",
17+
"LICENSE.md",
18+
"PROJECT-package.json",
19+
"template.json"
20+
],
21+
"move": [
22+
{ "PROJECT-README": "README.md" },
23+
{ "PROJECT-LICENSE": "LICENSE.md" }
24+
],
25+
"complete": "cd {{ name }} && ./complete.sh"
26+
}
27+

test/clearConsole.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/* eslint-env node */
2+
3+
if (process.argv.indexOf('--watch') >= 0) {
4+
before(() => process.stdout.write('\u001b[2J\u001b[1;1H\u001b[3J'))
5+
}
6+

0 commit comments

Comments
 (0)