2
2
/*jshint devel:true */
3
3
module . exports = function ( grunt ) {
4
4
'use strict' ;
5
-
5
+
6
6
// Tasks
7
7
grunt . registerTask ( 'default' , [ 'jshint' , 'build' , 'jasmine' ] ) ;
8
8
grunt . registerTask ( 'build' , [ 'concat:development' , 'umd' , 'uglify:production' ] ) ;
9
9
grunt . registerTask ( 'test' , [ 'build' , 'jasmine' ] ) ;
10
10
grunt . registerTask ( 'doc' , "Builds the documentation." , [ 'jshint' , 'jsduck' ] ) ;
11
11
grunt . registerTask ( 'serve' , [ 'connect:server:keepalive' ] ) ;
12
-
13
-
12
+
13
+
14
14
// Project configuration
15
15
var exec = require ( 'child_process' ) . exec ,
16
16
banner = createBanner ( ) ,
17
17
distPath = 'dist/Autolinker.js' ,
18
18
minDistPath = 'dist/Autolinker.min.js' ;
19
-
19
+
20
20
grunt . initConfig ( {
21
21
pkg : grunt . file . readJSON ( 'package.json' ) ,
22
-
22
+
23
23
connect : {
24
24
server : {
25
25
options : {
@@ -29,13 +29,13 @@ module.exports = function(grunt) {
29
29
}
30
30
}
31
31
} ,
32
-
32
+
33
33
jshint : {
34
34
files : {
35
35
src : [ 'src/**/*.js' , 'tests/**/*.js' ]
36
36
}
37
37
} ,
38
-
38
+
39
39
jasmine : {
40
40
dist : {
41
41
options : {
@@ -44,7 +44,7 @@ module.exports = function(grunt) {
44
44
src : minDistPath
45
45
}
46
46
} ,
47
-
47
+
48
48
concat : {
49
49
development : {
50
50
options : {
@@ -65,13 +65,14 @@ module.exports = function(grunt) {
65
65
'src/matchParser/MatchValidator.js' ,
66
66
'src/match/Match.js' ,
67
67
'src/match/Email.js' ,
68
+ 'src/match/Phone.js' ,
68
69
'src/match/Twitter.js' ,
69
70
'src/match/Url.js'
70
71
] ,
71
72
dest : distPath
72
73
}
73
74
} ,
74
-
75
+
75
76
uglify : {
76
77
production : {
77
78
options : {
@@ -81,17 +82,17 @@ module.exports = function(grunt) {
81
82
dest : minDistPath
82
83
}
83
84
} ,
84
-
85
+
85
86
jsduck : {
86
87
main : {
87
88
// source paths with your code
88
89
src : [
89
90
'src/**/*.js'
90
91
] ,
91
-
92
+
92
93
// docs output dir
93
94
dest : 'gh-pages/docs' ,
94
-
95
+
95
96
// extra options
96
97
options : {
97
98
'title' : 'Autolinker API Docs'
@@ -117,11 +118,11 @@ module.exports = function(grunt) {
117
118
grunt . loadNpmTasks ( 'grunt-contrib-jshint' ) ;
118
119
grunt . loadNpmTasks ( 'grunt-jsduck' ) ;
119
120
grunt . loadNpmTasks ( 'grunt-umd' ) ;
120
-
121
-
121
+
122
+
122
123
/**
123
124
* Creates the banner comment with license header that is placed over the concatenated/minified files.
124
- *
125
+ *
125
126
* @private
126
127
* @return {String }
127
128
*/
0 commit comments