express-humans
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -46,3 +46,3 @@ 'use strict'; | ||
var getContent = function () { | ||
var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee() { | ||
var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee() { | ||
var content; | ||
@@ -49,0 +49,0 @@ return _regenerator2.default.wrap(function _callee$(_context) { |
{ | ||
"name": "express-humans", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Express middleware for generating/responding a humans.txt file.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
# express-humans | ||
![stability-wip](https://img.shields.io/badge/stability-work_in_progress-lightgrey.svg) | ||
![stability-stable](https://img.shields.io/badge/stability-stable-green.svg) | ||
@@ -16,7 +16,55 @@ [![npm version][version-badge]][version-url] | ||
*Development in progress ...* | ||
## Usage | ||
First run `npm install express-humans`, then : | ||
```javascript | ||
const humans = require('express-humans'); | ||
const express = require('express'); | ||
const app = express(); | ||
app.use(humans({ | ||
team: [ | ||
{ | ||
'Original developer': 'Hayden Bleasel', | ||
Twitter: '@haydenbleasel' | ||
}, { | ||
Maintainer: 'Alexis Paques', | ||
Github: '@AlexisTM' | ||
} | ||
], | ||
thanks: [ | ||
'Node', | ||
'Gulp' | ||
], | ||
site: { | ||
'Standards': 'HTML5, CSS3', | ||
'Components': 'jQuery, Normalize.css', | ||
'Softwares': 'Atom, SublimeText' | ||
}, | ||
note: 'Built with love by Hayden Bleasel.' | ||
})); | ||
app.listen(3000); | ||
``` | ||
or : | ||
```javascript | ||
// Using the path of the humans.rxr file | ||
app.use(humans('./humans.txt')); | ||
``` | ||
## API | ||
`humans(options)` | ||
* `options` : `String` or `Object` | ||
* if `String` : the path of the humans.txt file to serve | ||
* if `Object` : [the `humans-generator` package config](https://www.npmjs.com/package/humans-generator) | ||
## Development | ||
``` | ||
```bash | ||
npm run build # Or "yarn run build" | ||
@@ -23,0 +71,0 @@ npm test # Or "yarn test" |
Sorry, the diff of this file is not supported yet
91
8506
94