-
Notifications
You must be signed in to change notification settings - Fork 322
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
41 changed files
with
5,980 additions
and
5,091 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
"printWidth": 80, | ||
"singleQuote": true | ||
"singleQuote": true, | ||
"trailingComma": "none" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
language: node_js | ||
node_js: | ||
- "9" | ||
- "8" | ||
- "7" | ||
- "6" | ||
- "5" | ||
- "4" | ||
- 'node' | ||
- '10' | ||
install: npm install |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const notifier = require('../index'); | ||
const balloon = notifier.WindowsBalloon(); | ||
balloon | ||
.notify({ message: 'Hello' }, function(err, data) { | ||
console.log(err, data); | ||
}) | ||
.on('click', function() { | ||
console.log(arguments); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
const notifier = require('../index'); | ||
const path = require('path'); | ||
|
||
notifier.notify( | ||
{ | ||
message: 'Are you sure you want to continue?', | ||
icon: path.join(__dirname, 'coulson.jpg'), | ||
actions: ['OK', 'Cancel'] | ||
}, | ||
(err, data) => { | ||
// Will also wait until notification is closed. | ||
console.log('Waited'); | ||
console.log(JSON.stringify({ err, data }, null, '\t')); | ||
} | ||
); | ||
|
||
// Built-in actions: | ||
notifier.on('timeout', () => { | ||
console.log('Timed out!'); | ||
}); | ||
notifier.on('activate', () => { | ||
console.log('Clicked!'); | ||
}); | ||
notifier.on('dismissed', () => { | ||
console.log('Dismissed!'); | ||
}); | ||
|
||
// Buttons actions (lower-case): | ||
notifier.on('ok', () => { | ||
console.log('"Ok" was pressed'); | ||
}); | ||
notifier.on('cancel', () => { | ||
console.log('"Cancel" was pressed'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,23 @@ | ||
var notifier = require('../index'); | ||
var path = require('path'); | ||
const notifier = require('../index'); | ||
const path = require('path'); | ||
|
||
notifier.notify( | ||
{ | ||
message: 'Hello. This is a longer text\nWith "some" newlines.', | ||
wait: true, | ||
icon: path.join(__dirname, 'coulson.jpg'), | ||
sound: true | ||
}, | ||
function(err, data) { | ||
// Will also wait until notification is closed. | ||
console.log('Waited'); | ||
console.log(err, data); | ||
console.log(JSON.stringify({ err, data })); | ||
} | ||
); | ||
|
||
notifier.on('timeout', function() { | ||
notifier.on('timeout', () => { | ||
console.log('Timed out!'); | ||
}); | ||
|
||
notifier.on('click', function() { | ||
notifier.on('click', () => { | ||
console.log('Clicked!'); | ||
}); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.