File tree 2 files changed +14
-14
lines changed
2 files changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -3,32 +3,32 @@ var path = require("path");
3
3
var util = require ( "util" ) ;
4
4
5
5
util . inherits ( Cmify , stream . Transform ) ;
6
- function Cmify ( filename , opts ) {
6
+ function Cmify ( filename , opts ) {
7
7
if ( ! ( this instanceof Cmify ) ) {
8
8
return new Cmify ( filename , opts ) ;
9
9
}
10
10
11
11
stream . Transform . call ( this ) ;
12
12
13
13
this . cssFilePattern = new RegExp ( opts . cssFilePattern || '\.css$' ) ;
14
- this . _data = "" ;
14
+ this . _data = '' ;
15
15
this . _filename = filename ;
16
16
this . _cssOutFilename = opts . cssOutFilename ;
17
17
}
18
18
19
19
Cmify . prototype . isCssFile = function ( filename ) {
20
- return this . cssFilePattern . test ( filename )
21
- }
20
+ return this . cssFilePattern . test ( filename ) ;
21
+ } ;
22
22
23
23
Cmify . prototype . _transform = function ( buf , enc , callback ) {
24
24
// only handle .css files
25
25
if ( ! this . isCssFile ( this . _filename ) ) {
26
- this . push ( buf )
27
- return callback ( )
26
+ this . push ( buf ) ;
27
+ return callback ( ) ;
28
28
}
29
29
30
- this . _data += buf
31
- callback ( )
30
+ this . _data += buf ;
31
+ callback ( ) ;
32
32
} ;
33
33
34
- module . exports = Cmify
34
+ module . exports = Cmify ;
Original file line number Diff line number Diff line change @@ -11,13 +11,13 @@ var cssOutFilename = 'out.css';
11
11
function runTestCase ( dir ) {
12
12
tape ( 'case: ' + dir , function ( t ) {
13
13
// load (optional) custom setup for this testcase
14
- var customPath = path . join ( casesDir , dir , 'custom.js' )
15
- var customOpts
14
+ var customPath = path . join ( casesDir , dir , 'custom.js' ) ;
15
+ var customOpts ;
16
16
try {
17
- fs . accessSync ( customPath )
18
- customOpts = require ( customPath )
17
+ fs . accessSync ( customPath ) ;
18
+ customOpts = require ( customPath ) ;
19
19
} catch ( e ) {
20
- customOpts = { }
20
+ customOpts = { } ;
21
21
}
22
22
23
23
var fakeFs = {
You can’t perform that action at this time.
0 commit comments