UNPKG

1.48 kBJavaScriptView Raw
1/*global module:false*/
2module.exports = function(grunt) {
3
4 // Project configuration.
5 grunt.initConfig({
6 pkg: '<json:{%= jqueryjson %}>',
7 meta: {
8 banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +
9 '<%= grunt.template.today("yyyy-mm-dd") %>\n' +
10 '<%= pkg.homepage ? "* " + pkg.homepage + "\n" : "" %>' +
11 '* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' +
12 ' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */'
13 },
14 concat: {
15 dist: {
16 src: ['<banner:meta.banner>', '<file_strip_banner:src/<%= pkg.name %>.js>'],
17 dest: 'dist/<%= pkg.name %>.js'
18 }
19 },
20 min: {
21 dist: {
22 src: ['<banner:meta.banner>', '<config:concat.dist.dest>'],
23 dest: 'dist/<%= pkg.name %>.min.js'
24 }
25 },
26 qunit: {
27 files: ['test/**/*.html']
28 },
29 lint: {
30 files: ['grunt.js', 'src/**/*.js', 'test/**/*.js']
31 },
32 watch: {
33 files: '<config:lint.files>',
34 tasks: 'lint qunit'
35 },
36 jshint: {
37 options: {
38 curly: true,
39 eqeqeq: true,
40 immed: true,
41 latedef: true,
42 newcap: true,
43 noarg: true,
44 sub: true,
45 undef: true,
46 boss: true,
47 eqnull: true,
48 browser: true
49 },
50 globals: {
51 jQuery: true
52 }
53 },
54 uglify: {}
55 });
56
57 // Default task.
58 grunt.registerTask('default', 'lint qunit concat min');
59
60};