Permalink
Browse files

Bump version to 1.9.0, new theme, new version of Alertify, etc.

  • Loading branch information...
1 parent a256619 commit 7e28d222f89cb7a0dd56d46c92598f4ea16a3542 @bitpshr committed Mar 13, 2013
View
@@ -18,15 +18,26 @@ module.exports = function(grunt) {
src: '<%= concat.dist.dest %>',
dest: 'dist/<%= pkg.name %>-client.min.js'
}
+ },
+ cssmin: {
+ compress: {
+ files: {
+ 'dist/themes/<%= pkg.name %>.css': [
+ 'vendor/alertify/themes/alertify.core.css',
+ 'vendor/alertify/themes/alertify.bootstrap.css'
+ ]
+ }
+ }
}
});
// Load the plugin that provides the "uglify" task.
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-concat');
+ grunt.loadNpmTasks('grunt-contrib-cssmin');
// Default task(s).
- grunt.registerTask('default', ['jshint', 'concat', 'uglify']);
+ grunt.registerTask('default', ['jshint', 'concat', 'uglify', 'cssmin']);
};
View
@@ -12,7 +12,13 @@ Holler is built with <a href="http://nodejs.org/">Node</a> and is distributed as
npm install holler -g
```
-###2. Add a script tag
+###2. Include Holler
+
+**New!** Be sure to include the <code>holler.css</code> stylesheet as of v1.9.0:
+```html
+<link href="PATH/TO/holler/css" rel="stylesheet"/>
+```
+
On the client, Holler can be easily configured to use a specific host and port regardless of the app's http server. This is done via a global <code>hollerConfig</code> object. The <code>holler-client.js</code> script tag should then be included:
```html
<script>
View
@@ -5,39 +5,47 @@
// description : real-time, in-app notifications from the command line
//
-// make sure we have the right number of options
-if(process.argv.length<4){
- console.error("usage: holler [url:port] [type] [message|redirectUrl]?");
- process.exit();
+// TODO: definitely handle this better using something
+// like https://github.com/substack/node-optimist
+if(process.argv.length < 4){
+ console.error("usage: holler [url:port] [type] [message|redirectUrl]?");
+ process.exit();
}
// define everything
-var faye = require('faye'),
- os = require("os"),
- p = process.argv[2],
- type = process.argv[3],
- url = p.substring(p.length-1) == "/" ? p.substring(0,p.length-1) : p;
+var faye = require('faye'),
+ os = require("os"),
+ p = process.argv[2],
+ type = process.argv[3],
+ url = p.substring(p.length-1) == "/" ? p.substring(0,p.length-1) : p,
+ ops = {
+ "log" : 1,
+ "success" : 1,
+ "error" : 1,
+ "refresh" : 1,
+ "redirect" : 1
+ };
// validate notification type
-if(type!="log" && type!="success" && type!="error" && type!="refresh" && type!="redirect"){
- console.error("uh oh: [type] must be one of [log, success, error, refresh, redirect]");
- process.exit();
+if(!ops[type]){
+ console.error("uh oh: [type] must be one of [log, success, error, refresh, redirect]");
+ process.exit();
}
// create a regular old client just like a browser would
var client = new faye.Client(url+'/faye');
var notification = client.publish('/holler', {
- type: type,
- message: type != "refresh" ? process.argv[4] : null
+ type: type,
+ message: type != "refresh" ? process.argv[4] : null
});
// when done, kill this sucker
notification.callback(function() {
- process.exit();
+ process.exit();
});
// if we error out, kill this still
notification.errback(function(error) {
- alert('uh oh: ' + error.message);
- process.exit();
+ alert('uh oh: ' + error.message);
+ process.exit();
});
View
@@ -7,11 +7,13 @@
// make sure we have only one arg
if(process.argv.length>3){
- console.error("usage: holler-server [port]");
- process.exit();
+ console.error("usage: holler-server [port]");
+ process.exit();
}
// define our ish
+// TODO: definitely handle this better using something
+// like https://github.com/substack/node-optimist
var port = process.argv.length==3 ? process.argv[2] : 1337,
http = require('http'),
faye = require('faye');
View
Binary file not shown.
View
Binary file not shown.
View
@@ -168,198 +168,4 @@ h3{
.sectionTitle{
font-size:40px !important;
}
-}
-
-.alertify-show,
-.alertify-log {
- -webkit-transition: all 500ms cubic-bezier(0.175, 0.885, 0.320, 1); /* older webkit */
- -webkit-transition: all 500ms cubic-bezier(0.175, 0.885, 0.320, 1.275);
- -moz-transition: all 500ms cubic-bezier(0.175, 0.885, 0.320, 1.275);
- -ms-transition: all 500ms cubic-bezier(0.175, 0.885, 0.320, 1.275);
- -o-transition: all 500ms cubic-bezier(0.175, 0.885, 0.320, 1.275);
- transition: all 500ms cubic-bezier(0.175, 0.885, 0.320, 1.275); /* easeOutBack */
-}
-.alertify-hide {
- -webkit-transition: all 250ms cubic-bezier(0.600, 0, 0.735, 0.045); /* older webkit */
- -webkit-transition: all 250ms cubic-bezier(0.600, -0.280, 0.735, 0.045);
- -moz-transition: all 250ms cubic-bezier(0.600, -0.280, 0.735, 0.045);
- -ms-transition: all 250ms cubic-bezier(0.600, -0.280, 0.735, 0.045);
- -o-transition: all 250ms cubic-bezier(0.600, -0.280, 0.735, 0.045);
- transition: all 250ms cubic-bezier(0.600, -0.280, 0.735, 0.045); /* easeInBack */
-}
-.alertify-log-hide {
- -webkit-transition: all 500ms cubic-bezier(0.600, 0, 0.735, 0.045); /* older webkit */
- -webkit-transition: all 500ms cubic-bezier(0.600, -0.280, 0.735, 0.045);
- -moz-transition: all 500ms cubic-bezier(0.600, -0.280, 0.735, 0.045);
- -ms-transition: all 500ms cubic-bezier(0.600, -0.280, 0.735, 0.045);
- -o-transition: all 500ms cubic-bezier(0.600, -0.280, 0.735, 0.045);
- transition: all 500ms cubic-bezier(0.600, -0.280, 0.735, 0.045); /* easeInBack */
-}
-.alertify-cover {
- position: fixed; z-index: 99999;
- top: 0; right: 0; bottom: 0; left: 0;
-}
-.alertify {
- position: fixed; z-index: 99999;
- top: 50px; left: 50%;
- width: 550px;
- margin-left: -275px;
-}
- .alertify-hidden {
- -webkit-transform: translate(0,-150px);
- -moz-transform: translate(0,-150px);
- -ms-transform: translate(0,-150px);
- -o-transform: translate(0,-150px);
- transform: translate(0,-150px);
- visibility: hidden;
- }
-.alertify-logs {
- position: fixed;
- z-index: 5000;
- bottom: 10px;
- right: 10px;
- width: 300px;
-}
- .alertify-log {
- display: block;
- margin-top: 10px;
- position: relative;
- right: -300px;
- opacity: 0;
- }
- .alertify-log-show {
- right: 0;
- opacity: 1;
- }
- .alertify-log-hide {
- -webkit-transform: translate(300px, 0);
- -moz-transform: translate(300px, 0);
- -ms-transform: translate(300px, 0);
- -o-transform: translate(300px, 0);
- transform: translate(300px, 0);
- opacity: 0;
- }
- .alertify-dialog {
- padding: 25px;
- }
- .alertify-resetFocus {
- border: 0;
- clip: rect(0 0 0 0);
- height: 1px;
- margin: -1px;
- overflow: hidden;
- padding: 0;
- position: absolute;
- width: 1px;
- }
- .alertify-inner {
- text-align: center;
- }
- .alertify-text {
- margin-bottom: 15px;
- width: 100%;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- font-size: 100%;
- }
- .alertify-buttons {
- }
- .alertify-button {
- /* line-height and font-size for input button */
- line-height: 1.5;
- font-size: 100%;
- display: inline-block;
- cursor: pointer;
- margin-left: 5px;
- }
-
-@media only screen and (max-width: 680px) {
- .alertify,
- .alertify-logs {
- width: 90%;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- }
- .alertify {
- left: 5%;
- margin: 0;
- }
-}
-
-/**
- * Default Look and Feel
- */
-.alertify,
-.alertify-log {
- font-family: sans-serif;
-}
-.alertify {
- background: #FFF;
- border: 10px solid #333; /* browsers that don't support rgba */
- border: 10px solid rgba(0,0,0,.7);
- border-radius: 8px;
- box-shadow: 0 3px 3px rgba(0,0,0,.3);
- -webkit-background-clip: padding; /* Safari 4? Chrome 6? */
- -moz-background-clip: padding; /* Firefox 3.6 */
- background-clip: padding-box; /* Firefox 4, Safari 5, Opera 10, IE 9 */
-}
- .alertify-text {
- border: 1px solid #CCC;
- padding: 10px;
- border-radius: 4px;
- }
- .alertify-button {
- border-radius: 4px;
- color: #FFF;
- font-weight: bold;
- padding: 6px 15px;
- text-decoration: none;
- text-shadow: 1px 1px 0 rgba(0,0,0,.5);
- box-shadow: inset 0 1px 0 0 rgba(255,255,255,.5);
- background-image: -webkit-linear-gradient(top, rgba(255,255,255,.3), rgba(255,255,255,0));
- background-image: -moz-linear-gradient(top, rgba(255,255,255,.3), rgba(255,255,255,0));
- background-image: -ms-linear-gradient(top, rgba(255,255,255,.3), rgba(255,255,255,0));
- background-image: -o-linear-gradient(top, rgba(255,255,255,.3), rgba(255,255,255,0));
- background-image: linear-gradient(top, rgba(255,255,255,.3), rgba(255,255,255,0));
- }
- .alertify-button:hover,
- .alertify-button:focus {
- outline: none;
- box-shadow: 0 0 15px #2B72D5;
- background-image: -webkit-linear-gradient(top, rgba(0,0,0,.1), rgba(0,0,0,0));
- background-image: -moz-linear-gradient(top, rgba(0,0,0,.1), rgba(0,0,0,0));
- background-image: -ms-linear-gradient(top, rgba(0,0,0,.1), rgba(0,0,0,0));
- background-image: -o-linear-gradient(top, rgba(0,0,0,.1), rgba(0,0,0,0));
- background-image: linear-gradient(top, rgba(0,0,0,.1), rgba(0,0,0,0));
- }
- .alertify-button:active {
- position: relative;
- top: 1px;
- }
- .alertify-button-cancel {
- background-color: #FE1A00;
- border: 1px solid #D83526;
- }
- .alertify-button-ok {
- background-color: #5CB811;
- border: 1px solid #3B7808;
- }
-
-.alertify-log {
- background: #1F1F1F;
- background: rgba(0,0,0,.9);
- padding: 15px;
- border-radius: 4px;
- color: #FFF;
- text-shadow: -1px -1px 0 rgba(0,0,0,.5);
-}
- .alertify-log-error {
- background: #FE1A00;
- background: rgba(254,26,0,.9);
- }
- .alertify-log-success {
- background: #5CB811;
- background: rgba(92,184,17,.9);
- }
+}
View
Binary file not shown.
View
BIN demo/css/img/error.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN demo/css/img/log.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN demo/css/img/success.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
@@ -8,6 +8,7 @@
<meta name="author" content="Paul Bouchon">
<title>holler.js</title>
<link href="../vendor/bootstrap/bootstrap/css/bootstrap.css" rel="stylesheet">
+ <link href="../dist/themes/holler.css" rel="stylesheet">
<link href="css/app.css" rel="stylesheet">
<link href="../vendor/bootstrap/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
@@ -44,7 +45,13 @@ <h1 class="sectionTitle"><span class="accent">1.</span> Install a module</h1>
<div class="container-fluid light">
<div class="container-narrow">
- <h1 class="sectionTitle"><span class="accent">2.</span> Add a script tag</h1>
+ <h1 class="sectionTitle"><span class="accent">2.</span> Include holler</h1>
+ <p>
+ <span class="label label-info">New!</span> Be sure to include the <code>holler.css</code> stylesheet as of v1.9.0:
+ </p>
+ <p>
+<pre>&lt;link href="PATH/TO/holler.css" rel="stylesheet"/&gt;</pre>
+ </p>
<p>
On the client, Holler can be easily configured to use a specific host and port regardless of the app's http server. This is done via a global <code>hollerConfig</code> object. The <code>holler-client.js</code> script tag should then be included:
</p>
@@ -58,7 +65,7 @@ <h1 class="sectionTitle"><span class="accent">2.</span> Add a script tag</h1>
&lt;script type="text/javascript" src="PATH/TO/holler-client.min.js"&gt;&lt;/script&gt;</pre>
</p>
<p>
- <span class="label label-info">Heads up!</span> The hollerConfig object is optional. If it is not defined, the host will default to 127.0.0.1 and the port will default to 1337.
+ The hollerConfig object is optional. If it is not defined, the host will default to 127.0.0.1 and the port will default to 1337.
</p>
</div>
</div>
Oops, something went wrong.

0 comments on commit 7e28d22

Please sign in to comment.