-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 7376455
Showing
18 changed files
with
278 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"extends": [ | ||
"@jedwards1211/eslint-config-es5", "@jedwards1211/eslint-config-flow" | ||
], | ||
"ecmaVersion": 5, | ||
"env": { | ||
"es6": false, | ||
"shared-node-browser": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[ignore] | ||
.*/node_modules/.*/tests?/.*\.json | ||
|
||
[include] | ||
./src | ||
./test | ||
|
||
[libs] | ||
|
||
[options] | ||
module.system=node | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
coverage | ||
.nyc_output | ||
node_modules | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
coverage | ||
.nyc_output | ||
test | ||
node_modules | ||
.eslintrc | ||
.flowconfig | ||
.travis.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
language: node_js | ||
cache: | ||
directories: | ||
- node_modules | ||
notifications: | ||
email: false | ||
node_js: | ||
- '7' | ||
- '6' | ||
- '4' | ||
before_script: | ||
- npm prune | ||
script: | ||
- cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js | ||
after_success: | ||
- npm run semantic-release | ||
branches: | ||
except: | ||
- /^v\d+\.\d+\.\d+$/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2016-present Andy Edwards | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2016-present {{ author }} | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# {{ name }} | ||
|
||
[![Build Status](https://travis-ci.org/{{ organization }}/{{ name }}.svg?branch=master)](https://travis-ci.org/{{ organization }}/{{ name }}) | ||
[![Coverage Status](https://coveralls.io/repos/github/{{ organization }}/{{ name }}/badge.svg?branch=master)](https://coveralls.io/github/{{ organization }}/{{ name }}?branch=master) | ||
[![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) | ||
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/) | ||
|
||
{{ description }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"name": "{{ name }}", | ||
"version": "0.0.0-development", | ||
"description": "{{ description }}", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/{{ organization }}/{{ name }}.git" | ||
}, | ||
"author": "{{ author }}", | ||
"bugs": { | ||
"url": "https://github.com/{{ organization }}/{{ name }}/issues" | ||
}, | ||
"homepage": "https://github.com/{{ organization }}/{{ name }}#readme" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# es5-library-skeleton | ||
|
||
[![Build Status](https://travis-ci.org/jedwards1211/es5-library-skeleton.svg?branch=master)](https://travis-ci.org/jedwards1211/es5-library-skeleton) | ||
[![Coverage Status](https://coveralls.io/repos/github/jedwards1211/es5-library-skeleton/badge.svg?branch=master)](https://coveralls.io/github/jedwards1211/es5-library-skeleton?branch=master) | ||
[![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) | ||
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/) | ||
|
||
This is my personal skeleton for creating an ES5 library npm package. You are welcome to use it. | ||
|
||
## Quick start | ||
|
||
```sh | ||
# this PR of mine will hopefully be merged soon | ||
npm i -g howardroark/pollinate#keep-history | ||
pollinate https://github.com/jedwards1211/es5-library-skeleton.git --name <package name> --author <your name> --organization <github organization> --description <package description> | ||
cd <package name> | ||
npm i | ||
``` | ||
|
||
## Tools used | ||
|
||
* mocha | ||
* chai | ||
* istanbul | ||
* nyc | ||
* eslint | ||
* eslint-watch | ||
* flow | ||
* flow-watch | ||
* pre-commit (runs eslnt and flow) | ||
* semantic-release | ||
* Travis CI | ||
* Coveralls | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
git remote rename origin skeleton | ||
npm i lodash.merge | ||
./merge-package-json.js | ||
npm rm lodash.merge | ||
rm merge-package-json.js PROJECT-package.json complete.sh | ||
git add --all . | ||
git commit -n -m 'pollinate project' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/* eslint-disable no-console, no-undef */ | ||
console.log('Hello world!') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// @flow | ||
|
||
declare module.exports: {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env node | ||
|
||
var merge = require('lodash.merge') | ||
var fs = require('fs') | ||
var merged = merge(require('./package.json'), require('./PROJECT-package.json')) | ||
fs.writeFileSync('./package.json', JSON.stringify(merged, null, 2), 'utf8') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
{ | ||
"name": "es5-library-skeleton", | ||
"version": "0.0.0-development", | ||
"description": "my personal ES5 library project skeleton", | ||
"main": "lib/index.js", | ||
"scripts": { | ||
"lint": "eslint lib test", | ||
"lint:fix": "eslint --fix lib test", | ||
"lint:watch": "esw --watch lib test", | ||
"flow": "flow", | ||
"flow:coverage": "for file in lib/**.js test/**.js; do echo $file; flow coverage $file; done", | ||
"flow:watch": "flow-watch -e js,js.flow,flowconfig --ignore lib/ --ignore node_modules/ --watch .flowconfig --watch lib/ --watch test/", | ||
"test": "NODE_ENV=production BABEL_ENV=test nyc --reporter=lcov --reporter=text mocha $npm_package_config_mocha", | ||
"commitmsg": "validate-commit-msg", | ||
"precommit": "npm run lint && flow", | ||
"prepush": "npm test", | ||
"prepublish": "npm run lint && flow && npm test", | ||
"open:coverage": "open coverage/lcov-report/index.html", | ||
"semantic-release": "semantic-release pre && npm publish && semantic-release post" | ||
}, | ||
"config": { | ||
"mocha": "./test/**/*.js", | ||
"commitizen": { | ||
"path": "cz-conventional-changelog" | ||
} | ||
}, | ||
"nyc": { | ||
"include": [ | ||
"lib/**/*.js" | ||
] | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/jedwards1211/es5-library-skeleton.git" | ||
}, | ||
"keywords": [ | ||
"es5" | ||
], | ||
"author": "Andy Edwards", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/jedwards1211/es5-library-skeleton/issues" | ||
}, | ||
"homepage": "https://github.com/jedwards1211/es5-library-skeleton#readme", | ||
"devDependencies": { | ||
"@jedwards1211/eslint-config-es5": "^1.0.0", | ||
"@jedwards1211/eslint-config-flow": "^1.0.0", | ||
"chai": "^3.5.0", | ||
"copy": "^0.3.0", | ||
"coveralls": "^2.11.16", | ||
"eslint": "^3.13.1", | ||
"eslint-plugin-flowtype": "^2.30.0", | ||
"eslint-watch": "^3.0.0", | ||
"flow-bin": "^0.39.0", | ||
"flow-watch": "^1.1.0", | ||
"husky": "^0.13.1", | ||
"istanbul": "^0.4.5", | ||
"mocha": "^3.2.0", | ||
"nyc": "^10.1.2", | ||
"rimraf": "^2.5.4", | ||
"semantic-release": "^6.3.6", | ||
"validate-commit-msg": "^2.8.2" | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"organization": "jedwards1211", | ||
"name": "es5-library-skeleton", | ||
"description": "my personal skeleton for ES5 library NPM packages", | ||
"author": "Andy Edwards", | ||
"parse": [ | ||
"PROJECT-README", | ||
"PROJECT-LICENSE", | ||
"PROJECT-package.json" | ||
], | ||
"discard": [ | ||
"README.md", | ||
"LICENSE.md", | ||
"template.json" | ||
], | ||
"move": [ | ||
{ "PROJECT-README": "README.md" }, | ||
{ "PROJECT-LICENSE": "LICENSE.md" } | ||
], | ||
"complete": "cd {{ name }} && ./complete.sh" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"env": { | ||
"mocha": true, | ||
"commonjs": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
require('../lib') | ||
|
||
describe('test setup', function () { | ||
it('works', function () { | ||
|
||
}) | ||
}) | ||
|