Permalink
Browse files

Fixing grunt

  • Loading branch information...
1 parent 3e29084 commit b3f4197303ed34fc8564d2ec12a7888628bb40ae Jason Butz committed Feb 27, 2013
View
@@ -1,32 +1,9 @@
module.exports = function(grunt)
{
grunt.initConfig({
- pkg: '<json:package.json>',
- meta: {
- banner: '/*!=========================================================\n' +
- '* <%= pkg.name %> v<%= pkg.version %> - <%= grunt.template.today("m/d/yyyy") %>\n' +
- '* <%= pkg.homepage %>\n' +
- '* HEAVILY based off bootstrap-modal.js\n'+
- '* ==========================================================\n' +
- '* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author %>\n' +
- '*\n' +
- '* Licensed under the Apache License, Version 2.0 (the "License");\n' +
- '* you may not use this file except in compliance with the License.\n' +
- '* You may obtain a copy of the License at\n' +
- '*\n' +
- '* http://www.apache.org/licenses/LICENSE-2.0\n' +
- '*\n' +
- '* Unless required by applicable law or agreed to in writing, software\n' +
- '* distributed under the License is distributed on an "AS IS" BASIS,\n' +
- '* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n' +
- '* See the License for the specific language governing permissions and\n' +
- '* limitations under the License.\n' +
- '* ========================================================= */\n'
- },
- jslint: {
- files: ['js/*.js']
- },
+ pkg: grunt.file.readJSON('package.json'),
jshint: {
+ all: ['js/*.js'],
options: {
"validthis": true,
"laxbreak" : true,
@@ -41,19 +18,64 @@ module.exports = function(grunt)
}
},
concat: {
+ options: {
+ stripBanners: true,
+ banner: '/*!=========================================================\n' +
+ '* <%= pkg.name %> v<%= pkg.version %> - <%= grunt.template.today("m/d/yyyy") %>\n' +
+ '* <%= pkg.homepage %>\n' +
+ '* HEAVILY based off bootstrap-modal.js\n'+
+ '* ==========================================================\n' +
+ '* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author %>\n' +
+ '*\n' +
+ '* Licensed under the Apache License, Version 2.0 (the "License");\n' +
+ '* you may not use this file except in compliance with the License.\n' +
+ '* You may obtain a copy of the License at\n' +
+ '*\n' +
+ '* http://www.apache.org/licenses/LICENSE-2.0\n' +
+ '*\n' +
+ '* Unless required by applicable law or agreed to in writing, software\n' +
+ '* distributed under the License is distributed on an "AS IS" BASIS,\n' +
+ '* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n' +
+ '* See the License for the specific language governing permissions and\n' +
+ '* limitations under the License.\n' +
+ '* ========================================================= */\n'
+ },
js: {
- src: ['<banner>', '<file_strip_banner:js/bootstrap-lightbox.js>'],
+ src: ['js/bootstrap-lightbox.js'],
dest: 'build/bootstrap-lightbox.js'
},
less: {
- src: ['<banner>', '<file_strip_banner:less/bootstrap-lightbox.less>'],
+ src: ['less/bootstrap-lightbox.less'],
dest: 'build/bootstrap-lightbox.less'
}
},
- min: {
+ uglify: {
+ options: {
+ stripBanners: true,
+ banner: '/*!=========================================================\n' +
+ '* <%= pkg.name %> v<%= pkg.version %> - <%= grunt.template.today("m/d/yyyy") %>\n' +
+ '* <%= pkg.homepage %>\n' +
+ '* HEAVILY based off bootstrap-modal.js\n'+
+ '* ==========================================================\n' +
+ '* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author %>\n' +
+ '*\n' +
+ '* Licensed under the Apache License, Version 2.0 (the "License");\n' +
+ '* you may not use this file except in compliance with the License.\n' +
+ '* You may obtain a copy of the License at\n' +
+ '*\n' +
+ '* http://www.apache.org/licenses/LICENSE-2.0\n' +
+ '*\n' +
+ '* Unless required by applicable law or agreed to in writing, software\n' +
+ '* distributed under the License is distributed on an "AS IS" BASIS,\n' +
+ '* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n' +
+ '* See the License for the specific language governing permissions and\n' +
+ '* limitations under the License.\n' +
+ '* ========================================================= */\n'
+ },
dist: {
- src: ['<banner>', '<file_strip_banner:js/bootstrap-lightbox.js>'],
- dest: 'build/bootstrap-lightbox.min.js'
+ files: {
+ 'build/bootstrap-lightbox.min.js':['js/bootstrap-lightbox.js']
+ }
}
},
less: {
@@ -110,20 +132,21 @@ module.exports = function(grunt)
});
+ grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-less');
+ grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-qunit');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-exec');
- grunt.loadNpmTasks('grunt-jslint');
// Default task.
- grunt.registerTask('default', 'qunit jslint concat min less copy');
+ grunt.registerTask('default', ['qunit','jshint','concat','uglify','less','copy']);
//grunt.registerTask('default', 'qunit lint concat min less copy');
- grunt.registerTask('docs', 'exec:docs_dep exec:build_docs');
+ grunt.registerTask('docs', ['exec:docs_dep','exec:build_docs']);
- grunt.registerTask('test', 'qunit lint');
+ grunt.registerTask('test', ['qunit','jshint']);
};
@@ -1,5 +1,5 @@
/*!=========================================================
-* bootstrap-lightbox v0.5 - 1/14/2013
+* bootstrap-lightbox v0.5.0 - 2/27/2013
* http://jbutz.github.com/bootstrap-lightbox/
* HEAVILY based off bootstrap-modal.js
* ==========================================================
@@ -1,5 +1,5 @@
/*!=========================================================
-* bootstrap-lightbox v0.5 - 1/14/2013
+* bootstrap-lightbox v0.5.0 - 2/27/2013
* http://jbutz.github.com/bootstrap-lightbox/
* HEAVILY based off bootstrap-modal.js
* ==========================================================
@@ -17,11 +17,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
* ========================================================= */
-
-
!function ($) {
// browser:true, jquery:true, node:true, laxbreak:true
- "use strict"; // jshint ;_;
+ "use strict";
/* LIGHTBOX CLASS DEFINITION
@@ -244,6 +242,10 @@
wOffs += 40;
hOffs += 10;
}
+ if (that.$element.find('.lightbox-footer').length > 0) {
+ hOffs += that.$element.find('.lightbox-footer').height();
+ hOffs += 10;
+ }
$img.css('max-width', $(window).width() - wOffs);
$img.css('max-height', $(window).height() - hOffs);
@@ -355,4 +357,4 @@
});
})
-}(window.jQuery);
+}(window.jQuery);
@@ -1,5 +1,5 @@
/*!=========================================================
-* bootstrap-lightbox v0.5 - 1/14/2013
+* bootstrap-lightbox v0.5.0 - 2/27/2013
* http://jbutz.github.com/bootstrap-lightbox/
* HEAVILY based off bootstrap-modal.js
* ==========================================================

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -5,7 +5,7 @@
!function ($) {
// browser:true, jquery:true, node:true, laxbreak:true
- "use strict"; // jshint ;_;
+ "use strict";
/* LIGHTBOX CLASS DEFINITION
@@ -343,4 +343,4 @@
});
})
-}(window.jQuery);
+}(window.jQuery);
View
@@ -17,13 +17,15 @@
"jshint": "latest",
"phantomjs": "latest",
"grunt": "latest",
+ "grunt-init": "latest",
+ "grunt-contrib-concat":"latest",
"grunt-contrib-less": "latest",
"grunt-contrib-clean": "latest",
"grunt-contrib-copy": "latest",
+ "grunt-contrib-uglify": "latest",
"grunt-exec": "latest",
"grunt-contrib-qunit": "latest",
- "grunt-contrib-jshint":"latest",
- "grunt-jslint": "latest"
+ "grunt-contrib-jshint":"latest"
},
"optionalDependencies": {},
"engines": {

0 comments on commit b3f4197

Please sign in to comment.