Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for #6 and added GulpJS to manage zipping on any platform #7

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
desktop-notify.nw
.idea
*.iml
node_modules
*.nw
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,21 @@ By including nw-desktop-notifications.js and nw-desktop-notifications.html in yo

(2) cd into the project

(3) make the nw zip file
(3) install dependencies

./make-nw
npm install

(4) Run the nw application
(4) make the nw zip file

nw desktop-notify.nw
gulp

(This assumes you have nw aliased to node-webkit)
(5) Run the nw application

alias nw='~/Applications/node-webkit.app/Contents/MacOS/node-webkit'
npm start

(This assumes you have node-webkit and GulpJS installed on your path)


##Update the Look-and-Feel

You can update the look and feel of the desktop notifications by updating the css embedded (via style tag) in nw-desktop-notifications.html.
You can update the look and feel of the desktop notifications by updating the css embedded (via style tag) in nw-desktop-notifications.html.
10 changes: 10 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
var gulp = require('gulp');
var zip = require('gulp-zip');

gulp.task('default', ['package']);

gulp.task('package', function(){
gulp.src('./*')
.pipe(zip('desktop-notify.nw'))
.pipe(gulp.dest('./'));
});
2 changes: 0 additions & 2 deletions make-nw.sh

This file was deleted.

3 changes: 2 additions & 1 deletion nw-desktop-notifications.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
(function(){
var requireNode = window.require;
var WINDOW_WIDTH = 290;
var WINDOW_HEIGHT = 200;
var gui = null;
var counter = 0;
if(requireNode){
Expand All @@ -18,7 +19,7 @@
frame: false,
toolbar: false,
width: WINDOW_WIDTH,
height: 0,
height: WINDOW_HEIGHT,
'always-on-top': true,
show: false,
resizable: false
Expand Down
49 changes: 31 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,32 @@
{
"main": "index.html",
"name": "NW Desktop Notifications Demo",
"description": "A demo of desktop notifications",
"version": "0.1",
"keywords": [ "node-webkit", "Desktop Notifications" ],
"window": {
"toolbar": false,
"width": 640,
"height": 480,
"position": "mouse",
"min_width": 400,
"min_height": 200
},
"webkit": {
"plugin": true, //turns off browser plugins
"page-cache": false
}
}
"main": "index.html",
"name": "nw-desktop-notifications",
"description": "A demo of desktop notifications",
"version": "0.0.1",
"keywords": [
"node-webkit",
"Desktop Notifications"
],
"window": {
"toolbar": false,
"width": 640,
"height": 480,
"position": "mouse",
"min_width": 400,
"min_height": 200
},
"webkit": {
"plugin": true,
"page-cache": false
},
"dependencies" : {
"nodewebkit": "~0.9.2"
},
"devDependencies": {
"gulp": "~3.5.5",
"gulp-zip": "~0.1.2"
},
"scripts": {
"start": "nodewebkit desktop-notify.nw"
}
}