Skip to content
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
33 changes: 33 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Logs
logs
*.log
npm-debug.log*

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directory
node_modules

# Optional npm cache directory
.npm

# Optional REPL history
.node_repl_history
31 changes: 24 additions & 7 deletions js/dialogFx.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,28 @@
* Copyright 2014, Codrops
* http://www.codrops.com
*/
;( function( window ) {


(function (root, factory) {
var Modernizr = {
prefixed: function () {
return 'animation';
},
cssanimations: true,
};

if (typeof module === 'object' && module.exports) {
var classie = require('classie');
try {
require('browsernizr/test/css/animations');
Modernizr = require('browsernizr');
} catch(e) {}
module.exports = factory(classie, Modernizr);
} else {
// Browser globals (root is window)
root.DialogFx = factory(root.classie, root.Modernizr || Modernizr);
}
}(this, function (classie, Modernizr) {

'use strict';

var support = { animations : Modernizr.cssanimations },
Expand Down Expand Up @@ -151,8 +171,5 @@

this.isOpen = !this.isOpen;
};

// add to global namespace
window.DialogFx = DialogFx;

})( window );
return DialogFx;
}));
28 changes: 28 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "dialog-fx",
"version": "0.0.2",
"description": "A small collection of dialog effects using CSS animations for your inspiration.",
"main": "js/dialogFx.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/codrops/DialogEffects.git"
},
"keywords": [
"dialog",
"effect",
"animation",
"css"
],
"author": "codrops",
"license": "MIT",
"bugs": {
"url": "https://github.com/codrops/DialogEffects/issues"
},
"homepage": "https://github.com/codrops/DialogEffects#readme",
"dependencies": {
"classie": "^1.0.0"
}
}