Skip to content

Commit

Permalink
chore: merge 'feature/clean-up2'
Browse files Browse the repository at this point in the history
  • Loading branch information
remy committed Sep 12, 2015
2 parents 4e63f92 + d675c8b commit 0a8b986
Show file tree
Hide file tree
Showing 49 changed files with 712 additions and 1,090 deletions.
13 changes: 13 additions & 0 deletions .jscsrc
@@ -0,0 +1,13 @@
{
"preset": "node-style-guide",
"requireCapitalizedComments": null,
"requireSpacesInAnonymousFunctionExpression": {
"beforeOpeningCurlyBrace": true,
"beforeOpeningRoundBrace": true
},
"disallowSpacesInNamedFunctionExpression": {
"beforeOpeningRoundBrace": true
},
"excludeFiles": ["node_modules/**"],
"disallowSpacesInFunction": null
}
4 changes: 3 additions & 1 deletion .jshintrc
Expand Up @@ -10,5 +10,7 @@
"node": true,
"quotmark": "single",
"undef": true,
"strict": false,
"unused": true
}
}

26 changes: 18 additions & 8 deletions .travis.yml
@@ -1,13 +1,23 @@
sudo: false
language: node_js
cache:
directories:
- node_modules
notifications:
email: false
node_js:
- "0.12"
- "0.11"
- "0.10"
- "0.8"
- 4
# - iojs-v3
# - iojs-v2
# - iojs-v1
- '0.12'
- '0.10'
before_install:
- npm install -g npm
- npm i -g npm@^2.0.0
before_script:
- npm install
notifications:
email: false
- npm prune
- 'curl -Lo travis_after_all.py https://git.io/vLSON'
after_success:
- python travis_after_all.py
- export $(cat .to_export_back)
- npm run semantic-release
29 changes: 22 additions & 7 deletions CONTRIBUTING.md
@@ -1,20 +1,35 @@
# Contributing

-WIP - but here's the TL;DR
## Commit messages

## Issues
Commit messages must follow the [Angular-style](https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#commit-message-format) commit format (but excluding the scope).

- Please include the output from `nodemon --dump` for diagnosis
- If there's a script that nodemon is having trouble with or is causing nodemon to throw exceptions, please include it in your filed issue to allow me to replicate the issue.
i.e:

```text
fix: minified scripts being removed
Also includes tests
```

This will allow for the automatic changelog to generate correctly.

## Code standards

Ensure that your code adheres to the included `.jshintrc` and `.jscsrc` configs.

## Sending pull requests

- use the .jshintrc (in the root of the project)
- ensure style is consistent
- new command line options are generally discouraged unless there's a *really* good reason
- add tests for newly added code (and try to mirror directory and file structure if possible)
- spell check
- PRs will not be code reviewed unless all tests are passing

*Important:* when fixing a bug, please commit a **failing test** first so that Travis CI (or I can) can show the code failing. Once that commit is in place, then commit the bug fix, so that we can test *before* and *after*.

Remember that you're developing for multiple platforms and versions of node, so if the tests pass on your Mac or Linux or Windows machine, it *may* not pass elsewhere. I personally have Mac and Linux coverage, I need help with Windows tests.
Remember that you're developing for multiple platforms and versions of node, so if the tests pass on your Mac or Linux or Windows machine, it *may* not pass elsewhere. I personally have Mac and Linux coverage, I need help with Windows tests.

## Issues

- Please include the output from `nodemon --dump` for diagnosis
- If there's a script that nodemon is having trouble with or is causing nodemon to throw exceptions, please include it in your filed issue to allow me to replicate the issue.
22 changes: 22 additions & 0 deletions Dockerfile
@@ -0,0 +1,22 @@
FROM ubuntu:12.04
MAINTAINER Remy Sharp <remy@leftlogic.com>

RUN rm /bin/sh && ln -s /bin/bash /bin/sh
RUN apt-get update && apt-get install curl npm -y

ENV NVM_DIR /usr/local/nvm
ENV NODE_VERSION iojs
ENV NVM_VERSION 0.26.1
ENV TRAVIS TRUE

# # Install nvm with node and npm
RUN curl https://raw.githubusercontent.com/creationix/nvm/v$NVM_VERSION/install.sh | bash \
&& source $NVM_DIR/nvm.sh \
&& nvm install 0.10 \
&& nvm install 0.12 \
&& nvm install iojs-v1 \
&& nvm install iojs-v2 \
&& nvm install iojs-v3 \
&& nvm install 4.0 \
&& nvm alias default $NODE_VERSION \
&& nvm use default
24 changes: 12 additions & 12 deletions bin/nodemon.js
@@ -1,17 +1,17 @@
#!/usr/bin/env node
'use strict';
var cli = require('../lib/cli'),
nodemon = require('../lib/'),
updateNotifier = require('update-notifier'),
pkg = require('../package.json'),
// checks for available update and returns an instance
notifier = updateNotifier({ pkg: pkg });
var cli = require('../lib/cli');
var nodemon = require('../lib/');
var options = cli.parse(process.argv);

if (notifier.update) {
// notify using the built-in convenience method
notifier.notify();
}
nodemon(options);

var options = cli.parse(process.argv);
var fs = require('fs');

// checks for available update and returns an instance
var defaults = require('lodash.defaults');
var pkg = JSON.parse(fs.readFileSync(__dirname + '/../package.json'));

nodemon(options);
require('update-notifier')({
pkg: defaults(pkg, { version: '0.0.0' }),
}).notify();
4 changes: 1 addition & 3 deletions doc/cli/help.txt
Expand Up @@ -12,8 +12,6 @@
-I, --no-stdin ........... don't try to read from stdin.
-C, --on-change-only ..... execute script on change only, not startup
-d, --delay n ............ debounce restart for "n" seconds.
-L, --legacy-watch ....... Forces node to use the most compatible version
for watching file changes.
--exitcrash .............. exit on crash, allows use of nodemon with daemon
tools like forever.js.
-v, --version ............ current nodemon version.
Expand All @@ -35,6 +33,6 @@
$ PORT=8000 nodemon --debug-brk server.js
$ nodemon --exec python app.py
$ nodemon --exec "make build" -e "styl hbs"
$ nodemon app.js -- -L
$ nodemon app.js -- -v

For more details see http://github.com/remy/nodemon/
19 changes: 10 additions & 9 deletions lib/cli/index.js
@@ -1,22 +1,23 @@
'use strict';
var parse = require('./parse');

/**
* Converts a string to command line args, in particular
* groups together quoted values
* groups together quoted values.
* This is a utility function to allow calling nodemon as a required
* library, but with the CLI args passed in (instead of an object).
*
* @param {String} string
* @return {Array}
*/
function stringToArgs(string) {
var args = [];

var parts = string.split(' '),
length = parts.length,
i = 0,
open = false,
grouped = '',
lead = '';
var parts = string.split(' ');
var length = parts.length;
var i = 0;
var open = false;
var grouped = '';
var lead = '';

for (; i < length; i++) {
lead = parts[i].substring(0, 1);
Expand Down Expand Up @@ -44,5 +45,5 @@ module.exports = {
}

return parse(argv);
}
},
};

0 comments on commit 0a8b986

Please sign in to comment.