|
| 1 | +/*global module:false*/ |
| 2 | +module.exports = function(grunt) { |
| 3 | + |
| 4 | + // Project configuration. |
| 5 | + grunt.initConfig({ |
| 6 | + // Metadata. |
| 7 | + meta: { |
| 8 | + version: '2.8.1' |
| 9 | + }, |
| 10 | + banner: '/*! phpMyFAQ - v2.8.1 - ' + |
| 11 | + '* http://www.phpmyfaq.de/\n' + |
| 12 | + '* Copyright (c) 2001 - 2013 Thorsten Rinne and phpMyFAQ Team' + |
| 13 | + 'Licensed MPL 2.0 */\n', |
| 14 | + // Task configuration. |
| 15 | + bower: { |
| 16 | + install: { |
| 17 | + // just run 'grunt bower:install' and you'll see files from your Bower packages in lib directory |
| 18 | + } |
| 19 | + }, |
| 20 | + concat: { |
| 21 | + options: { |
| 22 | + banner: '<%= banner %>', |
| 23 | + stripBanners: true |
| 24 | + }, |
| 25 | + dist: { |
| 26 | + src: ['vendor/twitter/bootstrap/js/*.js', 'phpmyfaq/assets/js/autosave.js', 'phpmyfaq/assets/js/functions.js'], |
| 27 | + dest: 'phpmyfaq/assets/js/phpmyfaq.js' |
| 28 | + } |
| 29 | + }, |
| 30 | + uglify: { |
| 31 | + options: { |
| 32 | + banner: '<%= banner %>' |
| 33 | + }, |
| 34 | + dist: { |
| 35 | + src: '<%= concat.dist.dest %>', |
| 36 | + dest: 'phpmyfaq/assets/js/phpmyfaq.js' |
| 37 | + } |
| 38 | + }, |
| 39 | + jshint: { |
| 40 | + options: { |
| 41 | + curly: true, |
| 42 | + eqeqeq: true, |
| 43 | + immed: true, |
| 44 | + latedef: true, |
| 45 | + newcap: true, |
| 46 | + noarg: true, |
| 47 | + sub: true, |
| 48 | + undef: true, |
| 49 | + unused: true, |
| 50 | + boss: true, |
| 51 | + eqnull: true, |
| 52 | + browser: true, |
| 53 | + globals: {} |
| 54 | + }, |
| 55 | + gruntfile: { |
| 56 | + src: 'Gruntfile.js' |
| 57 | + } |
| 58 | + }, |
| 59 | + watch: { |
| 60 | + gruntfile: { |
| 61 | + files: '<%= jshint.gruntfile.src %>', |
| 62 | + tasks: ['jshint:gruntfile'] |
| 63 | + }, |
| 64 | + lib_test: { |
| 65 | + files: '<%= jshint.lib_test.src %>', |
| 66 | + tasks: ['jshint:lib_test', 'qunit'] |
| 67 | + } |
| 68 | + } |
| 69 | + }); |
| 70 | + |
| 71 | + // These plugins provide necessary tasks. |
| 72 | + grunt.loadNpmTasks('grunt-bower-task'); |
| 73 | + grunt.loadNpmTasks('grunt-contrib-concat'); |
| 74 | + grunt.loadNpmTasks('grunt-contrib-uglify'); |
| 75 | + grunt.loadNpmTasks('grunt-contrib-jshint'); |
| 76 | + grunt.loadNpmTasks('grunt-contrib-watch'); |
| 77 | + grunt.loadNpmTasks('grunt-contrib-less'); |
| 78 | + grunt.loadNpmTasks('grunt-contrib-cssmin'); |
| 79 | + grunt.loadNpmTasks('grunt-contrib-copy'); |
| 80 | + grunt.loadNpmTasks('grunt-contrib-clean'); |
| 81 | + grunt.loadNpmTasks('grunt-contrib-csslint'); |
| 82 | + |
| 83 | + // Default task. |
| 84 | + grunt.registerTask('default', ['jshint', 'concat', 'uglify']); |
| 85 | + |
| 86 | +}; |
0 commit comments