File tree 3 files changed +30
-3
lines changed
3 files changed +30
-3
lines changed Original file line number Diff line number Diff line change
1
+ root = true
2
+
3
+ [* ]
4
+ charset = utf-8
5
+ end_of_line = lf
6
+ insert_final_newline = true
7
+ trim_trailing_whitespace = true
8
+ indent_style = space
9
+ indent_size = 2
10
+ quote_type = single
11
+
12
+ [* .md ]
13
+ trim_trailing_whitespace = false
Original file line number Diff line number Diff line change @@ -16,7 +16,13 @@ var bozon = {
16
16
} ,
17
17
18
18
src : function ( suffix ) {
19
- return this . requireLocal ( 'gulp' ) . src ( this . sourcePath ( suffix ) )
19
+ var sources ;
20
+ if ( Array . isArray ( suffix ) ) {
21
+ sources = suffix . map ( this . sourcePath . bind ( this ) )
22
+ } else {
23
+ sources = this . sourcePath ( suffix )
24
+ }
25
+ return this . requireLocal ( 'gulp' ) . src ( sources )
20
26
} ,
21
27
22
28
dest : function ( suffix ) {
Original file line number Diff line number Diff line change @@ -27,13 +27,21 @@ describe '#bozon', ->
27
27
expect (gulpTaskSpy .getCall (0 ).args [0 ]).to .eq (' compile' )
28
28
29
29
describe ' #src' , ->
30
- beforeEach =>
31
- bozon . src ( ' javascripts ' )
30
+ afterEach =>
31
+ gulpSrcSpy . reset ( )
32
32
33
33
it ' should set gulp src' , =>
34
+ bozon .src (' javascripts' )
34
35
expect (gulpSrcSpy .calledOnce ).to .be .true
35
36
expect (gulpSrcSpy .getCall (0 ).args [0 ]).to .eq (" #{ process .cwd ()} /app/javascripts" )
36
37
38
+ it ' should set multiple gulp sources' , =>
39
+ bozon .src ([' javascripts' , ' styles' ])
40
+ expect (gulpSrcSpy .calledOnce ).to .be .true
41
+ expect (gulpSrcSpy .getCall (0 ).args [0 ]).to .instanceof (Array )
42
+ expect (gulpSrcSpy .getCall (0 ).args [0 ][0 ]).to .eq (" #{ process .cwd ()} /app/javascripts" )
43
+ expect (gulpSrcSpy .getCall (0 ).args [0 ][1 ]).to .eq (" #{ process .cwd ()} /app/styles" )
44
+
37
45
describe ' #dest' , ->
38
46
beforeEach =>
39
47
bozon .dest (' javascripts' )
You can’t perform that action at this time.
0 commit comments