docs: include .github templates

This commit is contained in:
Remy Sharp
2017-12-05 12:54:18 +00:00
parent 2e1b496fa3
commit 17ad4b9f1a
4 changed files with 58 additions and 13 deletions

17
.github/ISSUE_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,17 @@
- `nodemon -v`:
- `node -v`:
- Command you ran:
### Expected behaviour
### Actual behaviour
### Steps to reproduce
---
If applicable, please append the `--dump` flag on your command and include the output here **ensuring to remove any sensitive/personal details or tokens.

20
.github/stale.yml vendored Normal file
View File

@@ -0,0 +1,20 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 60
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- security
# Label to use when marking an issue as stale
staleLabel: wontfix
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as idle and stale because it hasn't
had any recent activity. It will be automtically closed if no further activity
occurs. If you think this is wrong, or the problem still persists, just pop
a reply in the comments and @remy will (try!) to follow up.
Thank you for contributing <3
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: true

View File

@@ -1,14 +1,14 @@
'use strict';
/*global describe:true, it: true */
var cli = require('../../lib/cli/'),
exec = require('../../lib/config/exec'),
pkg = require('../../package'),
assert = require('assert'),
command = require('../../lib/config/command'),
utils = require('../../lib/utils');
exec = require('../../lib/config/exec'),
pkg = require('../../package'),
assert = require('assert'),
command = require('../../lib/config/command'),
utils = require('../../lib/utils');
function asCLI(cmd) {
return ('node nodemon ' + (cmd|| '')).trim();
return ('node nodemon ' + (cmd || '')).trim();
}
function parse(cmd) {
@@ -50,14 +50,14 @@ describe('nodemon CLI parser', function () {
it('should parse the help examples #1', function () {
var settings = parse(asCLI('test/fixtures/app.js')),
cmd = commandToString(command(settings));
cmd = commandToString(command(settings));
assert(cmd === 'node test/fixtures/app.js', 'node test/fixtures/app.js: ' + cmd);
});
it('should parse the help examples #2', function () {
var settings = parse(asCLI('-w ../lib test/fixtures/app.js apparg1 apparg2')),
cmd = commandToString(command(settings));
cmd = commandToString(command(settings));
assert.deepEqual(settings.watch, ['../lib'], 'watching ../lib: ' + settings.watch);
assert.deepEqual(settings.execOptions.args, ['apparg1', 'apparg2'], 'args are corr ' + settings.execOptions.args);
@@ -66,7 +66,7 @@ describe('nodemon CLI parser', function () {
it('should parse the help examples #3', function () {
var settings = parse(asCLI('--exec python app.py')),
cmd = commandToString(command(settings));
cmd = commandToString(command(settings));
assert(cmd === 'python app.py', 'command is ' + cmd);
assert(settings.execOptions.exec === 'python', 'exec is python');
@@ -74,7 +74,7 @@ describe('nodemon CLI parser', function () {
it('should parse the help examples #4', function () {
var settings = parse(asCLI('--exec "make build" -e "styl hbs"')),
cmd = commandToString(command(settings));
cmd = commandToString(command(settings));
assert(cmd === 'make build', 'command is ' + cmd);
assert.deepEqual(settings.execOptions.ext.split(','), ['styl', 'hbs'], 'correct extensions being watched: ' + settings.execOptions.ext);
@@ -82,7 +82,7 @@ describe('nodemon CLI parser', function () {
it('should parse the help examples #5', function () {
var settings = parse(asCLI('test/fixtures/app.js -- -L')),
cmd = commandToString(command(settings));
cmd = commandToString(command(settings));
assert(cmd === 'node test/fixtures/app.js -L', 'command is ' + cmd);
});
@@ -91,7 +91,7 @@ describe('nodemon CLI parser', function () {
var pwd = process.cwd();
process.chdir('test/fixtures'); // allows us to load text/fixtures/package.json
var settings = parse(asCLI('--harmony')),
cmd = commandToString(command(settings));
cmd = commandToString(command(settings));
process.chdir(pwd);
assert(cmd === 'node --harmony app.js', 'command is ' + cmd);
@@ -113,7 +113,7 @@ describe('nodemon CLI parser', function () {
var pwd = process.cwd();
process.chdir('test/fixtures/packages/express4'); // allows us to load text/fixtures/package.json
var settings = parse(asCLI()),
cmd = commandToString(command(settings));
cmd = commandToString(command(settings));
process.chdir(pwd);
@@ -274,6 +274,14 @@ describe('nodemon respects custom "ext" and "execMap"', function () {
});
});
describe('nodemon should slurp properly', () => {
it('should read quotes as a single entity', () => {
const settings = parse(asCLI('notindex.js -- -b "hello - world"'));
assert(settings.execOptions.exec === 'node', 'node is exec');
assert(settings.args.length === 3, 'only has 3 arguments to node');
});
});
describe('nodemon with CoffeeScript', function () {
it('should not add --nodejs by default', function () {
var settings = parse(asCLI('test/fixtures/app.coffee'));