was.wm.js – Blame information for rev 8

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 /*global module:false*/
2 module.exports = function(grunt) {
3  
4 // Project configuration.
5 grunt.initConfig({
6 // Metadata.
7 pkg: grunt.file.readJSON('package.json'),
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 %>;' +
12 ' Licensed <%= pkg.license %> */\n',
13 // Task configuration.
14 concat: {
15 options: {
16 banner: '<%= banner %>',
17 stripBanners: true
18 },
19 dist: {
8 office 20 src: [
21 'node_modules/interact.js/interact.js',
22 'node_modules/js-cookie/src/js.cookie.js',
23 'lib/**/*.js'
24 ],
4 office 25 dest: 'dist/<%= pkg.name %>' // <%= pkg.name %>.js -> was.wm.js
1 office 26 }
27 },
28 uglify: {
29 options: {
30 banner: '<%= banner %>'
31 },
32 dist: {
33 src: '<%= concat.dist.dest %>',
4 office 34 dest: 'dist/was.wm.min.js' // <%= pkg.name %>.min.js -> was.wm.min.js
1 office 35 }
36 },
37 jshint: {
38 options: {
39 curly: true,
40 eqeqeq: true,
41 immed: true,
42 latedef: true,
43 newcap: true,
44 noarg: true,
45 sub: true,
46 undef: true,
47 unused: false,
48 boss: true,
49 eqnull: true,
50 globals: {
4 office 51 '$': false,
52 'module': false,
53 'document' : false,
54 'window' : false,
55 'interact' : false,
56 'Cookies' : false,
57 jQuery: true
58 },
59 // spread/rest operator
60 esnext: true
1 office 61 },
62 gruntfile: {
63 src: 'Gruntfile.js'
64 },
65 lib_test: {
66 src: ['lib/**/*.js', 'test/**/*.js']
67 }
68 },
69 nodeunit: {
70 files: ['test/**/*_test.js']
71 },
6 office 72 sass: {
73 dist: {
74 options: {
75 style: 'expanded'
76 },
77 files: {
78 'css/wm.css': 'css/wm.scss'
79 }
80 }
81 },
1 office 82 watch: {
83 gruntfile: {
84 files: '<%= jshint.gruntfile.src %>',
85 tasks: ['jshint:gruntfile']
86 },
87 lib_test: {
88 files: '<%= jshint.lib_test.src %>',
89 tasks: ['jshint:lib_test', 'nodeunit']
90 }
91 }
92 });
93  
94 // These plugins provide necessary tasks.
6 office 95 grunt.loadNpmTasks('grunt-contrib-sass');
1 office 96 grunt.loadNpmTasks('grunt-contrib-concat');
4 office 97 grunt.loadNpmTasks('grunt-contrib-uglify-es');
1 office 98 //grunt.loadNpmTasks('grunt-contrib-nodeunit');
99 grunt.loadNpmTasks('grunt-contrib-jshint');
100 grunt.loadNpmTasks('grunt-contrib-watch');
101  
102 // Default task.
103 grunt.registerTask(
104 'default',
105 [
6 office 106 'sass',
1 office 107 'jshint',
108 //'nodeunit',
109 'concat',
110 'uglify'
111 ]
112 );
113  
114 };