Skip to content

Commit

Permalink
feat(initial): Initial release via semantic-release
Browse files Browse the repository at this point in the history
  • Loading branch information
bahmutov committed Nov 29, 2015
1 parent 5a2a2dd commit 96e45d9
Show file tree
Hide file tree
Showing 4 changed files with 123 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules/
npm-debug.log
22 changes: 22 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
sudo: false
language: node_js
cache:
directories:
- node_modules
notifications:
email: false
node_js:
- '4'
- '0.12'
before_install:
- npm i -g npm@^2.0.0
before_script:
- npm prune
after_success:
- 'curl -Lo travis_after_all.py https://git.io/travis_after_all'
- python travis_after_all.py
- 'export $(cat .to_export_back) &> /dev/null'
- npm run semantic-release
branches:
except:
- "/^v\\d+\\.\\d+\\.\\d+$/"
75 changes: 75 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,79 @@

> Simple help and sanity checks for Node CLI bin scripts
[![NPM][simple-bin-help-icon] ][simple-bin-help-url]

[![Build status][simple-bin-help-ci-image] ][simple-bin-help-ci-url]
[![dependencies][simple-bin-help-dependencies-image] ][simple-bin-help-dependencies-url]
[![devdependencies][simple-bin-help-devdependencies-image] ][simple-bin-help-devdependencies-url]
[![semantic-release][semantic-image] ][semantic-url]

## Install

npm install --save simple-bin-help

## Use example

Imagine for example that your bin script needs at least a single string argument, like
this `my-tool "foo"`. Then we can output simple help like this

```js
#!/usr/bin/env node

require('simple-bin-help')({
minArguments: 3,
packagePath: __dirname + '/../package.json',
help: 'use: my-tool <a string>'
});
```

### Small print

Author: Gleb Bahmutov &copy; 2015

* [@bahmutov](https://twitter.com/bahmutov)
* [glebbahmutov.com](http://glebbahmutov.com)
* [blog](http://glebbahmutov.com/blog/)

License: MIT - do anything with the code, but don't blame me if it does not work.

Spread the word: tweet, star on github, etc.

Support: if you find any problems with this module, email / tweet /
[open issue](https://github.com/bahmutov/simple-bin-help/issues) on Github

## MIT License

Copyright (c) 2015 Gleb Bahmutov

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.

[simple-bin-help-icon]: https://nodei.co/npm/simple-bin-help.png?downloads=true
[simple-bin-help-url]: https://npmjs.org/package/simple-bin-help
[simple-bin-help-ci-image]: https://travis-ci.org/bahmutov/simple-bin-help.png?branch=master
[simple-bin-help-ci-url]: https://travis-ci.org/bahmutov/simple-bin-help
[simple-bin-help-dependencies-image]: https://david-dm.org/bahmutov/simple-bin-help.png
[simple-bin-help-dependencies-url]: https://david-dm.org/bahmutov/simple-bin-help
[simple-bin-help-devdependencies-image]: https://david-dm.org/bahmutov/simple-bin-help/dev-status.png
[simple-bin-help-devdependencies-url]: https://david-dm.org/bahmutov/simple-bin-help#info=devDependencies
[semantic-image]: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg
[semantic-url]: https://github.com/semantic-release/semantic-release
29 changes: 25 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
{
"name": "simple-bin-help",
"version": "1.0.0",
"description": "Simple help and sanity checks for Node CLI bin scripts",
"main": "index.js",
"version": "0.0.0-semantic-release",
"scripts": {
"test": "mocha spec"
"test": "mocha spec",
"semantic-release": "semantic-release pre && npm publish && semantic-release post",
"commit": "git-issues && commit-wizard",
"issues": "git-issues",
"size": "t=\"$(npm pack .)\"; wc -c \"${t}\"; tar tvf \"${t}\"; rm \"${t}\";"
},
"files": ["index.js"],
"repository": {
"type": "git",
"url": "git+https://github.com/bahmutov/simple-bin-help.git"
"url": "https://github.com/bahmutov/simple-bin-help.git"
},
"keywords": [
"npm",
Expand All @@ -28,7 +33,23 @@
"homepage": "https://github.com/bahmutov/simple-bin-help#readme",
"devDependencies": {
"check-more-types": "2.2.0",
"git-issues": "1.2.0",
"lazy-ass": "1.1.0",
"mocha": "2.3.4"
"mocha": "2.3.4",
"pre-git": "1.4.0",
"semantic-release": "4.3.5"
},
"config": {
"pre-git": {
"commit-msg": "validate-commit-msg",
"pre-commit": [
"npm test"
],
"pre-push": [
"npm run size"
],
"post-commit": [],
"post-merge": []
}
}
}

0 comments on commit 96e45d9

Please sign in to comment.