Debian Codegraph @

Gruntfile.js

raw symbols ◀ ▶ SCIP
1 Debian patch touch this file
1 'use strict';
2
3 module.exports = function(grunt) {
4
5 // Project configuration.
6 grunt.initConfig({
7 // Metadata.
8 pkg: grunt.file.readJSON('package.json'),
9 banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +
10 '<%= grunt.template.today("yyyy-mm-dd") %>\n' +
11 '<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' +
•12 '* Copyright (c) <%= new Date(process.env.SOURCE_DATE_EPOCH ? (process.env.SOURCE_DATE_EPOCH * 1000) : new Date().getTime()).getFullYear() %> <%= pkg.author.name %>;' +
13 ' Licensed under the Apache License, Version 2.0 */\n',
14 // Task configuration.
15 clean: {
16 files: ['dist/<%= pkg.name %>.js', 'dist/<%= pkg.name %>.min.js']
17 },
18 concat: {
19 options: {
20 banner: '<%= banner %>',
21 stripBanners: true
22 },
23 dist: {
24 src: [
25 'js/excanvas.js',
26 'js/jsrender.js',
27 'js/jquery.mousewheel.js',
28 'js/jquery.ui.widget.js',
29 'js/jquery.geo.core.js',
30 'js/jquery.geo.geographics.js',
31 'js/jquery.geo.geomap.js',
32 'js/jquery.geo.tiled.js',
33 'js/jquery.geo.shingled.js'
34 ],
35 dest: 'dist/<%= pkg.name %>-<%= pkg.version %>.js'
36 }
37 },
38 uglify: {
39 options: {
40 banner: '<%= banner %>'
41 },
42 dist: {
43 src: '<%= concat.dist.dest %>',
44 dest: 'dist/<%= pkg.name %>-<%= pkg.version %>.min.js'
45 }
46 },
•47 // jshint: {
48 // gruntfile: {
49 // options: {
50 // jshintrc: '.jshintrc'
51 // },
52 // src: 'Gruntfile.js'
53 // },
54 // src: {
55 // options: {
56 // jshintrc: '.jshintrc'
57 // },
58 // src: ['js/jquery.geo.core.js', 'js/jquery.geo.geographics.js', 'js/jquery.geo.geomap.js', 'js/jquery.geo.shingled.js', 'js/jquery.geo.tiled.js']
59 // }
60 // test: {
61 // options: {
62 // jshintrc: '.jshintrc'
63 // },
64 // src: ['test/**/*.js']
65 // },
•66 // }
67 });
68
69 // These plugins provide necessary tasks.
70 grunt.loadNpmTasks('grunt-contrib-clean');
71 grunt.loadNpmTasks('grunt-contrib-concat');
72 grunt.loadNpmTasks('grunt-contrib-uglify');
•73 // grunt.loadNpmTasks('grunt-contrib-jshint');
74
75 // Default task.
•76 grunt.registerTask('default', ['clean', 'concat', 'uglify']);
77
78 };