• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/**
2@license
3Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
4This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
5The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
6The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
7Code distributed by Google as part of the polymer project is also
8subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
9*/
10module.exports = function(grunt) {
11
12	grunt.initConfig({
13		pkg: grunt.file.readJSON('package.json'),
14
15		uglify: {
16			options: {
17				banner: '/*! <%= pkg.name %> <%= pkg.version %> */\n'
18			},
19			dist: {
20				files: {
21					'Promise.min.uglify.js': ['Promise.js']
22				}
23			}
24		},
25
26    closurecompiler: {
27      options: {
28        compilation_level: 'ADVANCED_OPTIMIZATIONS',
29      },
30      dist: {
31        files: {
32          'Promise.min.js': ['Promise.js']
33        }
34      }
35    },
36
37    bytesize: {
38      dist: {
39        src: ['Promise*.js']
40      }
41    }
42	});
43
44	grunt.loadNpmTasks('grunt-contrib-uglify');
45	grunt.loadNpmTasks('grunt-closurecompiler');
46	grunt.loadNpmTasks('grunt-bytesize');
47
48	grunt.registerTask('build', ['closurecompiler', 'bytesize']);
49};
50