This repository has been archived by the owner on Mar 13, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 45
/
gruntfile.js
67 lines (63 loc) · 1.79 KB
/
gruntfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/*
* Copyright 2013 The Polymer Authors. All rights reserved.
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
module.exports = function(grunt) {
var readManifest = require('../tools/loader/readManifest.js');
var HTMLImports = readManifest('build.json');
var HTMLImportsNative = readManifest('build-native.json');
grunt.initConfig({
karma: {
options: {
configFile: 'conf/karma.conf.js',
keepalive: true
},
buildbot: {
reporters: ['crbot'],
logLevel: 'OFF'
},
HTMLImports: {
}
},
uglify: {
HTMLImports: {
options: {
sourceMap: 'HTMLImports.min.js.map',
banner: grunt.file.read('banner.txt')
},
files: {
'HTMLImports.min.js': HTMLImports
}
}
},
yuidoc: {
compile: {
name: '<%= pkg.name %>',
description: '<%= pkg.description %>',
version: '<%= pkg.version %>',
url: '<%= pkg.homepage %>',
options: {
exclude: 'third_party',
paths: '.',
outdir: 'docs',
linkNatives: 'true',
tabtospace: 2,
themedir: '../docs/doc_themes/simple'
}
}
},
pkg: grunt.file.readJSON('package.json')
});
grunt.loadTasks('../tools/tasks');
// plugins
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-yuidoc');
grunt.loadNpmTasks('grunt-karma');
// tasks
grunt.registerTask('default', ['uglify']);
grunt.registerTask('minify', ['uglify']);
grunt.registerTask('docs', ['yuidoc']);
grunt.registerTask('test', ['override-chrome-launcher', 'karma:HTMLImports']);
grunt.registerTask('test-buildbot', ['override-chrome-launcher', 'karma:buildbot']);
};