forked from angular-ui/ui-grid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaliases.js
58 lines (46 loc) · 2.14 KB
/
aliases.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
module.exports = function (grunt, options) {
var baseTasks = {
'install': ['shell:bower-install', 'shell:protractor-install', 'shell:hooks-install'],
// register before and after test tasks so we don't have to change cli
// options on the CI server
'before-test': ['clean', 'newer:jshint', 'newer:jscs', 'ngtemplates', 'less', 'copy:font_dist'], // Have to run less so CSS files are present
'after-test': ['build'],
'default': ['before-test', 'test:single', 'after-test'],
// Build with no testing
'build': ['ngtemplates', 'concat', 'uglify', 'less', 'ngdocs', 'copy:font_dist', 'copy:site', 'copy:less_customizer',],
// Auto-test tasks for development
'autotest:unit': ['karmangular:start'],
'autotest:e2e': ['shell:protractor-start'],
// Testing tasks
'test': ['before-test', 'test:single'],
'test:ci': ['before-test', 'serialsauce'],
'test:docs': ['connect:testserver', 'protractor:docs'],
'test:e2e': ['connect:testserver', 'protractor:singlerun'],
'test:ci-e2e': ['clean', 'build', 'connect:testserver', 'protractor:ci']
};
baseTasks['dev'] = ['before-test', 'after-test', 'connect', 'autotest:unit', 'autotest:e2e', 'watch'];
if (grunt.option('e2e') === false || grunt.option('fast')) {
grunt.log.writeln("Skipping e2e testing...");
baseTasks['dev'].splice(baseTasks['dev'].indexOf('autotest:e2e'), 1);
}
if (grunt.option('unit') === false) {
grunt.log.writeln("Skipping unit testing...");
baseTasks['dev'].splice(baseTasks['dev'].indexOf('autotest:unit'), 1);
}
if (process.env.TRAVIS){
baseTasks['test:single'] = ['karma:travis'];
}
else {
baseTasks['test:single'] = ['karmangular'];
}
var util = require('../lib/grunt/utils.js');
var semver = require('semver');
var currentTag = semver.clean( util.getCurrentTag() );
if (currentTag) {
baseTasks['release'] = ['clean', 'ngtemplates', 'build', 'copy:less_dist', 'cut-release', 'gh-pages:ui-grid-site', 'update-bower-json', 'gh-pages:bower', 'npm-publish'];
}
else {
baseTasks['release'] = ['clean', 'ngtemplates', 'build', 'copy:less_dist', 'cut-release'];
}
return baseTasks;
};