From 73cab567a3d6805bb9cfc053a5590110cecc014f Mon Sep 17 00:00:00 2001 From: Victor Häggqvist Date: Thu, 26 Jun 2014 17:35:14 +0200 Subject: build --- Gruntfile.js | 75 +++++++++++++++--------------------------------------------- package.json | 5 +--- 2 files changed, 19 insertions(+), 61 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 29f310a..16905d1 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -11,58 +11,13 @@ module.exports = function(grunt) { '* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' + ' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */\n', // Task configuration. - concat: { - options: { - banner: '<%= banner %>', - stripBanners: true - }, - dist: { - src: ['lib/<%= pkg.name %>.js'], - dest: 'dist/<%= pkg.name %>.js' - } - }, - uglify: { - options: { - banner: '<%= banner %>' - }, - dist: { - src: '<%= concat.dist.dest %>', - dest: 'dist/<%= pkg.name %>.min.js' - } - }, - jshint: { - options: { - curly: true, - eqeqeq: true, - immed: true, - latedef: true, - newcap: true, - noarg: true, - sub: true, - undef: true, - unused: true, - boss: true, - eqnull: true, - browser: true, - globals: { - jQuery: true - } - }, - gruntfile: { - src: 'Gruntfile.js' - }, - lib_test: { - src: ['lib/**/*.js', 'test/**/*.js'] - } - }, watch: { - gruntfile: { - files: '<%= jshint.gruntfile.src %>', - tasks: ['jshint:gruntfile'] - }, - lib_test: { - files: '<%= jshint.lib_test.src %>', - tasks: ['jshint:lib_test', 'qunit'] + main: { + options: { + reload: true; + }, + files: ['index.php', 'sass/demo.scss'], + tasks: ['sass'] } }, responsive_images: { @@ -75,7 +30,7 @@ module.exports = function(grunt) { }, { name: 'thumb', - height: 150 + height: 100 }] }, files: [{ @@ -96,18 +51,24 @@ module.exports = function(grunt) { 'demo.css': 'sass/demo.scss' } } + }, + copy: { + lightbox: { + expand: true, + flatten: true, + src: ['bower_components/touch-imagelightbox/dist/touch-imagelightbox.js'], + dest: './', + filter: 'isFile' + } } }); // These plugins provide necessary tasks. - grunt.loadNpmTasks('grunt-contrib-concat'); - grunt.loadNpmTasks('grunt-contrib-uglify'); - grunt.loadNpmTasks('grunt-contrib-jshint'); - grunt.loadNpmTasks('grunt-contrib-watch'); grunt.loadNpmTasks('grunt-contrib-sass'); + grunt.loadNpmTasks('grunt-contrib-copy'); grunt.loadNpmTasks('grunt-responsive-images'); // Default task. - grunt.registerTask('default', ['jshint', 'concat', 'uglify']); + grunt.registerTask('default', ['responsive_images', 'sass', 'copy']); }; diff --git a/package.json b/package.json index 1ac6e71..12ea325 100644 --- a/package.json +++ b/package.json @@ -4,11 +4,8 @@ }, "devDependencies": { "grunt": "~0.4.2", - "grunt-contrib-concat": "~0.3.0", - "grunt-contrib-jshint": "~0.7.2", - "grunt-contrib-qunit": "~0.3.0", + "grunt-contrib-copy": "^0.5.0", "grunt-contrib-sass": "^0.7.3", - "grunt-contrib-uglify": "~0.2.7", "grunt-contrib-watch": "~0.5.3", "grunt-responsive-images": "^0.1.3" } -- cgit v1.2.3