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

Switching everything to Gulp & renaming #17

Merged
merged 9 commits into from
Aug 6, 2014
Merged
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
desktop-notify.nw
*.nw
.idea/
*.iml
media/
node_modules/
webkitbuilds/
webkitbuilds/
cache/
*.log
24 changes: 0 additions & 24 deletions Gruntfile.js

This file was deleted.

30 changes: 18 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,45 +8,51 @@ Simple cross platform desktop notifications for [node-webkit](https://github.com

## Getting Started

1. Include the javascript `nw-desktop-notifications.js` in your application
1. Include the javascript `nodeifications.js` in your application

2. Include the HTML template `nw-desktop-notifications.html` in your application
2. Include the HTML template `nodeifications.html` in your application

3. Create a notification using the API: `DEA.notifications.create(options, callback);`

## Running the demo

(1) Clone this project

(2) cd into the project /src
(2) Run `npm install`

(3) Make the nw zip file by running the bash script
(3) Make the nw zip file by running the default gulp task

./make-nw.sh
gulp

(4) Run the nw application
(4) `cd` into the project `/src`

node-webkit desktop-notify.nw
(5) Run the nw application

nodewebkit nodeifications.nw

## Building for Production

From the root of the project:

npm install

grunt build
gulp build

Then run the executable/app from /webkitbuilds/release/NW Desktop Notifications Demo
Then run the executable/app from inside `/webkitbuilds`

## Application Flow

1. Call the API to create a new notification.

2. `nw-desktop-notifications.js` creates the HTML template using the user provided content
2. `nodeifications.js` creates the HTML template using the user provided content

3. `nodeifications.js` created the notification and appends the template to the created notification window.

4. `nodeifications.html` is simply the container for the content. It handles closing itself and sending off interaction events back to the parent who initiated the notification.

3. `nw-desktop-notifications.js` created the notification and appends the template to the created notification window.
## Notes

4. `nw-desktop-notifications.html` is simply the container for the content. It handles closing itself and sending off interaction events back to the parent who initiated the notification.
- node-webkit version `0.9.2` or later is required for this example (because [`Window.setShowInTaskbar`](https://github.com/rogerwang/node-webkit/wiki/Window#windowsetshowintaskbarboolean-show) is used).


## Notification Types
Expand Down
29 changes: 29 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
var gulp = require('gulp');
var $ = require('gulp-load-plugins')();

var paths = {
sourceFiles: './src/**/**'
};

// setup up node-webkit-builder
var nw = new (require('node-webkit-builder'))({
buildDir: './webkitbuilds',
files: paths.sourceFiles,
platforms: ['win', 'osx', 'linux32', 'linux64']
});

// tasks:

gulp.task('default', ['generate-nw']);

gulp.task('build', function(done){
nw.build()
.then(done)
.catch(done);
});

gulp.task('generate-nw', function(){
return gulp.src(paths.sourceFiles, {dot: true})
.pipe($.zip('nodeifications.nw'))
.pipe(gulp.dest('./src'));
});
37 changes: 19 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
{
"name": "nw-desktop-notifications",
"version": "0.1.0",
"description": "custom node-webkit notifications",
"devDependencies": {
"matchdep": "~0.1.2",
"grunt": "~0.4.4",
"grunt-node-webkit-builder": "~0.1.20"
},
"repository": {
"type": "git",
"url": "https://github.com/pbojinov/nw-desktop-notifications.git"
},
"author": "Petar Bojinov <petarbojinov@gmail.com> (http://pbojinov.com/)",
"license": "MIT",
"bugs": {
"url": "https://github.com/pbojinov/nw-desktop-notifications/issues"
},
"homepage": "https://github.com/pbojinov/nw-desktop-notifications"
"name": "nodeifications",
"version": "0.1.0",
"description": "custom node-webkit notifications",
"devDependencies": {
"gulp": "^3.8.7",
"gulp-load-plugins": "^0.5.3",
"gulp-zip": "^0.5.0",
"node-webkit-builder": "^0.1.0"
},
"repository": {
"type": "git",
"url": "https://github.com/pbojinov/nodeifications.git"
},
"author": "Petar Bojinov <petarbojinov@gmail.com> (http://pbojinov.com/)",
"license": "MIT",
"bugs": {
"url": "https://github.com/pbojinov/nodeifications/issues"
},
"homepage": "https://github.com/pbojinov/nodeifications"
}
2 changes: 1 addition & 1 deletion src/bower.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "nw-custom-desktop-notifications",
"name": "nodeifications",
"version": "0.0.0",
"dependencies": {
"jquery": "~2.1.0",
Expand Down
14 changes: 14 additions & 0 deletions src/bower_components/flat-ui-official/.bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "flat-ui-official",
"homepage": "https://github.com/designmodo/Flat-UI",
"version": "2.1.3",
"_release": "2.1.3",
"_resolution": {
"type": "version",
"tag": "2.1.3",
"commit": "46a5b5a49c578a5dcfc395b4c93715ca3908b887"
},
"_source": "git://github.com/designmodo/Flat-UI.git",
"_target": "~2.1.3",
"_originalSource": "flat-ui-official"
}
14 changes: 14 additions & 0 deletions src/bower_components/flat-ui-official/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# editorconfig.org

root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.py]
indent_size = 4
6 changes: 6 additions & 0 deletions src/bower_components/flat-ui-official/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*.swp
*.swo
.sass-cache
.local
*.DS_Store

141 changes: 141 additions & 0 deletions src/bower_components/flat-ui-official/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
Flat UI Free 2.1.3
=======

Flat UI Free is licensed under a Creative Commons Attribution 3.0 Unported (CC BY 3.0) (http://creativecommons.org/licenses/by/3.0/) and MIT License - http://opensource.org/licenses/mit-license.html.

You are allowed to use these elements anywhere you want, however we’ll highly appreciate if you will link to our [website](http://designmodo.com).

## Links:

+ [Demo Page](http://designmodo.github.io/Flat-UI/)
+ [Download HTML](https://github.com/designmodo/Flat-UI/archive/master.zip) (for developers)
+ [Download PSD](http://designmodo.com/flat-free/) (for designers)
+ [Flat UI Pro 1.2.5](http://designmodo.com/flat/) (from $39)

## Changelog

+ 2.1.3
* Bootstrap upgraded to stable 3.1.0;
* Respond.js upgraded to v1.4.2;
* Optimized file indentations, 2 spaces are now used instead of tabs, ```.editorconfig``` file is added;
* Added variables font-path, font-name and font-id(https://github.com/twbs/bootstrap/issues/12164) for local fonts and glyphicons;
* Added the ability to change the navbar height through the variables ```@navbar-height-base``` and ```@navbar-height-large```;
* Add ```@grid-float-breakpoint-max``` to better link navbar behavior across viewports and improve customization when setting ```@grid-float-breakpoint```(https://github.com/twbs/bootstrap/issues/11610);
* Add ```.small``` support to blockquote citations(https://github.com/twbs/bootstrap/pull/11414);
* Reorder the headings with body text and text emphasis classes(https://github.com/twbs/bootstrap/issues/11515);
* Remove color from outline reset for improved outlines on focus(https://github.com/twbs/bootstrap/pull/11551);
* Remove unnecessary prefixes for gradient mixins given our stated browser support(https://github.com/twbs/bootstrap/pull/11694);
* Add line-height to progress bar for proper text alignment within(https://github.com/twbs/bootstrap/issues/10407);
* Use ```@screen-xx-xx``` variables instead of hardcoded pixel values in modules;
* Enable use of form validation class on ```.radio```, ```.checkbox```, ```.radio-inline```, and ```.checkbox-inline```(https://github.com/twbs/bootstrap/issues/10522);
* Add ```<kbd>``` element styles to indicate user input via keyboard(https://github.com/twbs/bootstrap/issues/11193);
* Add ```.animation()``` mixins(https://github.com/twbs/bootstrap/issues/11244);
* Prevent the double borders between multiple buttons in an input group(https://github.com/twbs/bootstrap/issues/11435);
* Updated ```.scale()``` mixin so that it accepts optional vertical scale as second parameter(https://github.com/twbs/bootstrap/issues/11748);
* Don't set ```@headings-font-family``` to the same font stack as the ```<body>```; instead, just use inherit for same default CSS(https://github.com/twbs/bootstrap/issues/11741);
* Add ```.make-xs-column``` mixins to complement the recently added extra small predefined grid classes(https://github.com/twbs/bootstrap/issues/11829);
* Add and use ```.text-emphasis-variant()``` mixin for emphasis classes(https://github.com/twbs/bootstrap/issues/12247);
* Add and use ```.bg-variant()``` mixin to generate background classes(https://github.com/twbs/bootstrap/issues/12248);
* Reset height on ```select[multiple]``` in ```.input-size()``` mixin(https://github.com/twbs/bootstrap/issues/12422);
* Account for badges within buttons by matching background to text color and text color to background(https://github.com/twbs/bootstrap/issues/11268);
* Drop the abbr element from the ```.initialism``` selector(https://github.com/twbs/bootstrap/issues/11277);
* Add ```.small``` support to blockquote citations(https://github.com/twbs/bootstrap/issues/11414);
* Various small bugfixes and improvements.

+ 2.1.2
* Bootstrap upgraded to 3.0.3;
* Navbar completely rewriten, added new states (default, inverse, embossed, large, fixed-top, fixed-bottom, static-top), now you can use basic navbar elements: ```.navbar-form```, ```.navbar-btn```, ```.navbar-text```, ```.navbar-link```;
* Forms: added support for ```legend```, ```.help-block```, fixed rounded serch form on iOS, fixed desabled input background and opacity, added support for input-groups;
* Slider: added vertical orientation;
* Various small bugfixes and improvements.
+ 2.1.1
* Typography improved (new global variables, padding and margins changed for basic elements, global default font-size now is 18px, with a line-height of 1.722, added support for ```<abbr>```, ```<address>```, ```<code>```, ```<pre>```, right-aligned ```<blockquote>```);
* Buttons module completely rewritten (new global variables, buttons now require a .btn-default for the standard version, added support for .btn-link);
* Fixed some bugs in ```.navbar```;
* Mixins updated (added standard mixins from Bootstrap 3);
* Layout updated for stylized select and dropdown menu;
* Various small bugfixes and improvements.
+ 2.1
* Bootstrap upgraded to 3.0;
* Added support for better box model;
* Update html5 video player to version 4.1;
* Added components documentation and sturt-up template;
* Various small bugfixes and improvements.
+ 2.0 Compatibility with Flat UI Pro (Less instead of Sass), Bootstrap upgraded to 2.3.1, grids refinements, various Less compiler bugfixes, Video module bugfix, various small bugfixes.
+ 1.1 New icons, Login screen implemented to a real HTML one. Small bug fixes and refinements.
+ 1.0 Fixed several small IE bugs



## Authors

**Sergey Shmidt**

+ [http://shmidt.in](http://shmidt.in)
+ [http://twitter.com/monstercritic](http://twitter.com/monstercritic)

**Sergii Iurevych**

+ [http://twitter.com/iurevych](http://twitter.com/iurevych)
+ [http://github.com/iurevych](http://github.com/iurevych)

**Dmitry Pytkin**

+ [http://twitter.com/pytkin](http://twitter.com/pytkin)
+ [http://github.com/pytkin](http://github.com/pytkin)

## Typeface
Flat UI Free is made using the Lato typeface, which can be downloaded for free here: http://www.google.com/webfonts/specimen/Lato

##Useful Links (How To)

How to Use UI Kits, Beginners Video Tips: [http://designmodo.com/how-to-use/](http://designmodo.com/how-to-use/)


UI Kit Benefits: [http://designmodo.com/benefits/](http://designmodo.com/benefits/)


Create a Website using UI Packs (PSD to HTML) – Day 1: [http://designmodo.com/create-website-day-1](http://designmodo.com/create-website-day-1)

Create a Website using UI Packs (PSD to HTML) – Day 2: [http://designmodo.com/create-website-day-2](http://designmodo.com/create-website-day-2)

Create a Website using UI Packs (PSD to HTML) – Day 3: [http://designmodo.com/create-website-day-3](http://designmodo.com/create-website-day-3)

Create a Website Design using The Bricks UI: [http://designmodo.com/website-design-bricks-ui/](http://designmodo.com/website-design-bricks-ui/)

What is UI Kit and Why You Should Use it: [http://designmodo.com/ui-kit-use](http://designmodo.com/ui-kit-use)

How Companies can Save Time and Money Using UI Kits: [http://designmodo.com/save-time-money-using-ui-kits](http://designmodo.com/save-time-money-using-ui-kits)

UI Kits for Developers – Prototyping and Homemade Design: [http://designmodo.com/ui-kits-developers](http://designmodo.com/ui-kits-developers)


More productsfrom Designmodo:

[http://designmodo.com/shop/](http://designmodo.com/shop/)


Tutorials:

[http://designmodo.com/tutorials/](http://designmodo.com/tutorials/)


Freebies:

[http://designmodo.com/freebies/](http://designmodo.com/freebies/)


Affiliate Program (earn money):

[http://designmodo.com/affiliates/](http://designmodo.com/affiliates/)


Social Media:

Twitter: [http://www.twitter.com/designmodo](http://www.twitter.com/designmodo)

Facebook: [http://www.facebook.com/designmodo](http://www.facebook.com/designmodo)

RSS: [http://feeds.feedburner.com/designmodo](http://feeds.feedburner.com/designmodo)

Google+: [https://www.google.com/+DesignModo](https://www.google.com/+DesignModo)
Loading