This repository has been archived by the owner on Aug 2, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 36
/
Gruntfile.js
75 lines (64 loc) · 2.21 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
67
68
69
70
71
72
73
74
75
'use strict';
module.exports = function (grunt) {
grunt.initConfig({
filesize: {
intl: {
files: [{
cwd: 'node_modules/',
src: [
'intl/*.min.js',
'react-intl/dist/*.min.js',
'dust-intl/dist/*.min.js',
'handlebars-intl/dist/*.min.js'
],
dest: 'config/lib-sizes.json'
}]
}
},
curl: {
polyfill_service: {
src: 'https://polyfills.yahooapis.com/meta.json',
dest: 'config/polyfill-service.json'
}
},
clean: {
build: 'build/',
tmp: 'tmp/'
},
broccoli_build: {
assets: {
dest: 'build/'
}
},
casper: {
functional: {
files: {
'artifacts/test/functional/results.xml': ['tests/functional/*.js']
},
options: {
test: true,
includes: 'tests/functional/utils/casper-setup.js',
host: grunt.option('host') || 'localhost:5000'
}
}
},
shell: {
health_check: {
command: 'mkdir -p artifacts/test/health-check &&' +
' ./node_modules/.bin/mocha --reporter tap tests/health-check.js --host=' + (grunt.option('host') || 'localhost:5000') +
' | tee artifacts/test/health-check/results.tap'
}
}
});
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-broccoli-build');
grunt.loadNpmTasks('grunt-casper');
grunt.loadNpmTasks('grunt-curl');
grunt.loadNpmTasks('grunt-shell-spawn');
grunt.loadTasks('tasks/');
grunt.registerTask('build', ['clean', 'broccoli_build']);
grunt.registerTask('functional.tests', ['casper:functional']);
grunt.registerTask('health.check', ['shell:health_check']);
grunt.registerTask('update_polyfill_service', ['curl:polyfill_service']);
grunt.registerTask('default', ['build']);
};