Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
Unitech committed Jun 14, 2016
2 parents 8a16994 + 37cd16b commit 30239e1
Show file tree
Hide file tree
Showing 29 changed files with 514 additions and 280 deletions.
22 changes: 11 additions & 11 deletions CONTRIBUTING.md → .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Contributing to PM2

## Pull-Requests

1. Fork pm2
2. Create a different branch to do your fixes/improvements if it's core-related.
3. Please add unit tests! There are lots of tests take examples from there!
4. Try to be as clear as possible in your commits
5. Pull request on the **development branch** from your fork

We 'd like to keep our master branch as clean as possible, please avoid PRs on master, thanks!

## Fire an issue

When you got an issue by using pm2, you will fire an issue on [github](https://github.com/Unitech/pm2). We'll be glad to help or to fix it but the more data you give the most fast it would be resolved.
Expand All @@ -21,20 +31,10 @@ Please try following these rules it will make the task easier for you and for us
If your issue is too specific we might not be able to help and stackoverflow might be a better place to seak for an answer

#### 5. Be clear and format issues with [markdown](http://daringfireball.net/projects/markdown/)
Note that we might understand english, german and french
Note that we might understand english, german and french but english is prefered.

#### 6. Use debugging functions:

```DEBUG=pm2:* PM2_DEBUG=true ./bin/pm2 --no-daemon start my-buggy-thing.js```

If your issue is flagged as `need data` be sure that there won't be any upgrade unless we can have enough data to reproduce.

## Pull-Requests

1. Fork pm2
2. Create a different branch to do your fixes/improvements if it's core-related.
3. Please add unit tests! There are lots of tests take examples from there!
4. Try to be as clear as possible in your commits
5. Pull request on the **development branch** from your fork

We 'd like to keep our master branch as clean as possible, please avoid PRs on master, thanks!
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
GitHub issues are for bugs / installation problems / feature requests. If you haven't read the [CONTRIBUTING](https://github.com/Unitech/pm2/blob/master/.github/CONTRIBUTING.md) documentation, please start there.
For general support from the community, see [StackOverflow](https://stackoverflow.com/questions/tagged/pm2).

If you want a more detailed output when trying to reproduce an issue, use pm2 in debug mode:

```
DEBUG="pm2:*" pm2 start --no-daemon my-bug.js
```

Logs located in `~/.pm2/pm2.log` are always a good place to seek for relevant informations!

For bugs or installation issues, please provide the following information:

### Environment info
Operating System:
Pm2 version:
Node version:
Shell: bash/zsh/fish/powershell

### Steps to reproduce
1.
2.
3.

### What have you tried?
1.

### Logs

```
head -n 100 ~/.pm2/pm2.log
```

(If logs are large, please upload as attachment).
13 changes: 13 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Please always submit pull requests on the development branch.

| Q | A
| ------------- | ---
| Bug fix? | yes/no
| New feature? | yes/no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #1234, #5678
| Doc PR | https://github.com/pm2-hive/pm2-hive.github.io/pulls

*Please update this template with something that matches your PR*
19 changes: 19 additions & 0 deletions .travis.yml.bckp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
language: node_js
branches:
only:
- master
- development
- travis
node_js:
- "0.12"
- "0.10"
- "4"
- "5"
- "6"
os:
- linux
before_install:
- sudo apt-get -qq update
- sudo apt-get install python3
- sudo apt-get install php5-cli
sudo: required
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

clean:
find node_modules \( -name "example" -o -name "examples" -o -name "docs" -o -name "jsdoc" -o -name "jsdocs" -o -name "test" -o -name "tests" -o -name "*\.md" -o -name "*\.html" -o -name "*\.eot" -o -name "*\.svg" -o -name "*\.woff" \) -print -exec rm -rf {} \;
find node_modules -type d \( -name "example" -o -name "examples" -o -name "docs" -o -name "jsdoc" -o -name "jsdocs" -o -name "test" -o -name "tests" -o -name "*\.md" -o -name "*\.html" -o -name "*\.eot" -o -name "*\.svg" -o -name "*\.woff" \) -print -exec rm -rf {} \;
34 changes: 10 additions & 24 deletions bin/pm2
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ var chalk = require('chalk');
var async = require('async');

var debug = require('debug')('pm2:cli');
var Satan = require('../lib/Satan');
var CLI = require('../lib/CLI');
var pkg = require('../package.json');
var tabtab = require('../lib/completion.js');
Expand Down Expand Up @@ -155,17 +154,17 @@ if (process.argv.indexOf('--no-daemon') > -1) {
// and starts daemon in the same process if it does not exists
//
console.log('pm2 launched in no-daemon mode (you can add DEBUG="*" env variable to get more messages)');
Satan.pingDaemon(function(ab) {
CLI.pingDaemon(function(ab) {
if (ab == true) {
console.error('>> pm2 is already daemonized ! You should kill it before launching it in no-daemon mode'.red);
}
Satan.start(true, function() {
CLI.connect(true, function() {
beginCommandProcessing();
});
});
}
else {
Satan.start(false, function() {
CLI.connect(false, function() {
if (process.argv.slice(2)[0] === 'completion') {
checkCompletion();
CLI.disconnect();
Expand Down Expand Up @@ -486,17 +485,12 @@ commander.command('web')
// Save processes to file
//
commander.command('dump')
.alias('save')
.description('dump all processes for resurrecting them later')
.action(failOnUnknown(function() {
CLI.dump();
}));

commander.command('save')
.description('(alias) dump all processes for resurrecting them later')
.action(failOnUnknown(function() {
CLI.dump();
}));

//
// Resurrect
//
Expand Down Expand Up @@ -574,16 +568,13 @@ commander.command('show <id>')
//
// List command
//
commander.command('list')
commander
.command('list')
.alias('ls')
.description('list all processes')
.option('--watch', 'constant refresh of process listing')
.action(function() {
CLI.list()
});

commander.command('ls')
.description('(alias) list all processes')
.action(function() {
CLI.list()
CLI.list(commander)
});

commander.command('l')
Expand Down Expand Up @@ -617,17 +608,12 @@ commander.command('prettylist')
// Monitoring command
//
commander.command('monit')
.alias('m')
.description('launch termcaps monitoring')
.action(function() {
CLI.monit();
});

commander.command('m')
.description('(alias) launch termcaps monitoring')
.action(function() {
CLI.monit();
});


//
// Flushing command
Expand Down
12 changes: 12 additions & 0 deletions examples/init-module/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

var pmx = require('pmx');

pmx.configureModule({
human_info : [
[ 'Description', 'Gridcontrol is now running, tasdkkals dk als dkl askdl\nasd lsdakl kdsald asdsd\nAnd hthis like that and bla blab\nYESY!' ],
[ 'Port', 8000],
[ 'Grid name', 'Sisi la grid']
]
});

setInterval(() => {}, 1000);
17 changes: 17 additions & 0 deletions examples/init-module/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "init-module",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"apps" : [{
"script" : "index.js",
"env" : {
"PM2_WAIT_FOR_INIT" : 500
}
}],
"author": "",
"license": "ISC"
}
Loading

0 comments on commit 30239e1

Please sign in to comment.