Permalink
Browse files

Added grunt-contrib-cssmin task to Gruntfile and lightbox.min.css to …

…dist/css/ folder
  • Loading branch information...
1 parent b03b105 commit 63f8920882ab944c52159f3540bc3584d8f188d6 Alberto Jerez committed Jul 21, 2015
Showing with 12 additions and 3 deletions.
  1. +10 −3 Gruntfile.js
  2. +1 −0 dist/css/lightbox.min.css
  3. +1 −0 package.json
View
@@ -53,12 +53,18 @@ module.exports = function(grunt) {
'dist/js/lightbox-plus-jquery.min.js': ['dist/js/lightbox-plus-jquery.js']
}
}
- },
+ },
watch: {
jshint: {
files: ['src/js/lightbox.js'],
tasks: ['jshint', 'jscs']
}
+ },
+ cssmin: {
+ minify: {
+ src: 'dist/css/lightbox.css',
+ dest: 'dist/css/lightbox.min.css'
+ }
}
});
@@ -68,9 +74,10 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
+ grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks("grunt-jscs");
grunt.registerTask('default', ['connect', 'watch']);
grunt.registerTask('test', ['jshint', 'jscs']);
- grunt.registerTask('build', ['jshint', 'jscs', 'copy:dist', 'concat', 'uglify']);
-};
+ grunt.registerTask('build', ['jshint', 'jscs', 'copy:dist', 'concat', 'uglify', 'cssmin:minify']);
+};
@@ -0,0 +1 @@
+.lb-loader,.lightbox{text-align:center;line-height:0}body:after{content:url(../images/close.png) url(../images/loading.gif) url(../images/prev.png) url(../images/next.png);display:none}.lb-dataContainer:after,.lb-outerContainer:after{content:"";clear:both}.lightboxOverlay{position:absolute;top:0;left:0;z-index:9999;background-color:#000;filter:alpha(Opacity=80);opacity:.8;display:none}.lightbox{position:absolute;left:0;width:100%;z-index:10000;font-weight:400}.lightbox .lb-image{display:block;height:auto;max-width:inherit;border-radius:3px}.lightbox a img{border:none}.lb-outerContainer{position:relative;background-color:#fff;width:250px;height:250px;margin:0 auto;border-radius:4px}.lb-loader,.lb-nav{left:0;position:absolute}.lb-outerContainer:after{display:table}.lb-container{padding:4px}.lb-loader{top:43%;height:25%;width:100%}.lb-cancel{display:block;width:32px;height:32px;margin:0 auto;background:url(../images/loading.gif) no-repeat}.lb-nav{top:0;height:100%;width:100%;z-index:10}.lb-container>.nav{left:0}.lb-nav a{outline:0;background-image:url(data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==)}.lb-next,.lb-prev{height:100%;cursor:pointer;display:block}.lb-nav a.lb-prev{width:34%;left:0;float:left;background:url(../images/prev.png) left 48% no-repeat;filter:alpha(Opacity=0);opacity:0;transition:opacity .6s}.lb-nav a.lb-next,.lb-nav a.lb-prev{-webkit-transition:opacity .6s;-moz-transition:opacity .6s;-o-transition:opacity .6s}.lb-nav a.lb-prev:hover{filter:alpha(Opacity=100);opacity:1}.lb-nav a.lb-next{width:64%;right:0;float:right;background:url(../images/next.png) right 48% no-repeat;filter:alpha(Opacity=0);opacity:0;transition:opacity .6s}.lb-nav a.lb-next:hover{filter:alpha(Opacity=100);opacity:1}.lb-dataContainer{margin:0 auto;padding-top:5px;width:100%;-moz-border-radius-bottomleft:4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomright:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px}.lb-dataContainer:after{display:table}.lb-data{padding:0 4px;color:#ccc}.lb-data .lb-details{width:85%;float:left;text-align:left;line-height:1.1em}.lb-data .lb-caption{font-size:13px;font-weight:700;line-height:1em}.lb-data .lb-number{display:block;clear:left;padding-bottom:1em;font-size:12px;color:#999}.lb-data .lb-close{display:block;float:right;width:30px;height:30px;background:url(../images/close.png) top right no-repeat;text-align:right;outline:0;filter:alpha(Opacity=70);opacity:.7;-webkit-transition:opacity .2s;-moz-transition:opacity .2s;-o-transition:opacity .2s;transition:opacity .2s}.lb-data .lb-close:hover{cursor:pointer;filter:alpha(Opacity=100);opacity:1}
View
@@ -30,6 +30,7 @@
"grunt-contrib-concat": "^0.5.1",
"grunt-contrib-connect": "^0.7.1",
"grunt-contrib-copy": "^0.8.0",
+ "grunt-contrib-cssmin": "^0.12.3",
"grunt-contrib-jshint": "^0.11.2",
"grunt-contrib-uglify": "~0.4.0",
"grunt-contrib-watch": "^0.5.3",

0 comments on commit 63f8920

Please sign in to comment.