diff --git a/README.md b/README.md index f794c27..61c51c8 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,9 @@ This is a guideline to how new repos and commits should be styled The guides are intended to be as simple and concise as possible. -__[Javascript Guide](javascript.md)__ +### [Javascript Guide](javascript.md) -__[Documentation Guide](documentation.md)__ +### [Module Template](template) ## Contributing diff --git a/template/.gitignore b/template/.gitignore new file mode 100644 index 0000000..275dac7 --- /dev/null +++ b/template/.gitignore @@ -0,0 +1,17 @@ +# OS generated files +##### +.DS_Store* +ehthumbs.db +Icon? +Thumbs.db + + +# npm +##### +node_modules +*.log + + +# Editors +##### +*.sublime* diff --git a/template/LICENSE b/template/LICENSE new file mode 100644 index 0000000..3791174 --- /dev/null +++ b/template/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2014 Your Name with optional email + +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. diff --git a/documentation.md b/template/README.md similarity index 86% rename from documentation.md rename to template/README.md index 75df74b..2803e69 100644 --- a/documentation.md +++ b/template/README.md @@ -5,6 +5,12 @@ [![Build Status](http://img.shields.io/travis/expressjs/style-guide.svg?style=flat)](https://travis-ci.org/expressjs/style-guide) [![Coverage Status](https://img.shields.io/coveralls/expressjs/style-guide.svg?style=flat)](https://coveralls.io/r/expressjs/style-guide) + +> #### You can directly copy this folder to create a new module! + +> NOTE: The "files" in package.json is a whitelist you may have to add to. + + This document provides a general guideline for creating a README in an [expressjs](https://github.com/expressjs) repository. When writing content for a README, keep these two guidelines in mind: @@ -29,18 +35,14 @@ $ npm install ## API ```js -var express = require('express') -var module = require('npm-name') - -var app = express() -app.use(module()) +var module = require('npm-name') ``` ### module(options) #### Options -- `option1` - asdf. (default `true`) +- `option1` - asdf. (default: `true`) - `option2` - cats. - `option10` - always 42. - `option9000` - epic. @@ -76,6 +78,8 @@ existing_object.object.property // => example value from description ## Example(s) -Full examples go here. +```js +// Full examples go here. +``` ### [MIT Licensed](LICENSE) diff --git a/template/index.js b/template/index.js new file mode 100644 index 0000000..1b38899 --- /dev/null +++ b/template/index.js @@ -0,0 +1,17 @@ +/*! + * npm-name + * Copyright (c) 2014 Your Name + * MIT Licensed + */ + +/** + * Module dependencies. + */ + +var module = require('module') + +/** + * Expose `Thingy`. + */ + +module.exports = Thingy diff --git a/template/package.json b/template/package.json new file mode 100644 index 0000000..7ba735b --- /dev/null +++ b/template/package.json @@ -0,0 +1,24 @@ +{ + "name": "npm-name", + "description": "describe this module", + "version": "0.0.0", + "author": "author name (optional website)", + "license": "MIT", + "repository": "github_username/repo", + "dependencies": { + }, + "devDependencies": { + }, + "engines": { + "node": ">= 0.8.0" + }, + "files": [ + "LICENSE" + "index.js" + ], + "scripts": { + "test": "mocha --reporter spec --bail --check-leaks --require should test/", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks --require should test/", + "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks --require should test/" + } +}