This repository was archived by the owner on Mar 26, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 7 files changed +42
-17
lines changed Expand file tree Collapse file tree 7 files changed +42
-17
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "preset" : " google" ,
3
+ "maximumLineLength" : null ,
4
+ "disallowMultipleLineBreaks" : null ,
5
+ "disallowSpacesInAnonymousFunctionExpression" : null ,
6
+ "requireSpacesInFunction" : {
7
+ "beforeOpeningCurlyBrace" : true
8
+ },
9
+ "requireSpacesInAnonymousFunctionExpression" : {
10
+ "beforeOpeningRoundBrace" : true
11
+ }
12
+ }
Original file line number Diff line number Diff line change @@ -16,6 +16,16 @@ module.exports = function (grunt) {
16
16
'!test/tmp/*'
17
17
]
18
18
} ,
19
+
20
+ jscs : {
21
+ options : {
22
+ config : '.jscsrc'
23
+ } ,
24
+ all : {
25
+ src : [ '<%= jshint.all %>' ]
26
+ }
27
+ } ,
28
+
19
29
copy : {
20
30
test : {
21
31
flatten : true ,
@@ -83,9 +93,11 @@ module.exports = function (grunt) {
83
93
grunt . loadNpmTasks ( 'grunt-contrib-copy' ) ;
84
94
grunt . loadNpmTasks ( 'grunt-simple-mocha' ) ;
85
95
grunt . loadNpmTasks ( 'grunt-contrib-jshint' ) ;
96
+ grunt . loadNpmTasks ( 'grunt-jscs' ) ;
86
97
87
98
grunt . registerTask ( 'default' , [
88
99
'jshint' ,
100
+ 'jscs' ,
89
101
'clean' ,
90
102
'copy' ,
91
103
'filerev' ,
Original file line number Diff line number Diff line change 32
32
"grunt-contrib-clean" : " ^0.6.0" ,
33
33
"grunt-contrib-copy" : " ^0.5.0" ,
34
34
"grunt-contrib-jshint" : " ^0.10.0" ,
35
+ "grunt-jscs" : " ^1.5.0" ,
35
36
"grunt-simple-mocha" : " ^0.4.0"
36
37
},
37
38
"peerDependencies" : {
Original file line number Diff line number Diff line change @@ -73,23 +73,23 @@ module.exports = function (grunt) {
73
73
// Source maps
74
74
var sourceMap = false ;
75
75
if ( ext === '.js' || ext === '.css' ) {
76
- var map = file + '.map' ;
77
- resultPath += '.map' ;
78
- if ( grunt . file . exists ( map ) ) {
79
- if ( move ) {
80
- fs . renameSync ( map , resultPath ) ;
81
- } else {
82
- grunt . file . copy ( map , resultPath ) ;
83
- }
84
- sourceMap = true ;
85
- }
76
+ var map = file + '.map' ;
77
+ resultPath += '.map' ;
78
+ if ( grunt . file . exists ( map ) ) {
79
+ if ( move ) {
80
+ fs . renameSync ( map , resultPath ) ;
81
+ } else {
82
+ grunt . file . copy ( map , resultPath ) ;
83
+ }
84
+ sourceMap = true ;
85
+ }
86
86
}
87
87
88
88
filerev . summary [ path . normalize ( file ) ] = path . join ( dirname , newName ) ;
89
89
grunt . verbose . writeln ( chalk . green ( '✔ ' ) + file + chalk . gray ( ' changed to ' ) + newName ) ;
90
90
if ( sourceMap ) {
91
- filerev . summary [ path . normalize ( file + '.map' ) ] = path . join ( dirname , newName + '.map' ) ;
92
- grunt . verbose . writeln ( chalk . green ( '✔ ' ) + file + '.map' + chalk . gray ( ' changed to ' ) + newName + '.map' ) ;
91
+ filerev . summary [ path . normalize ( file + '.map' ) ] = path . join ( dirname , newName + '.map' ) ;
92
+ grunt . verbose . writeln ( chalk . green ( '✔ ' ) + file + '.map' + chalk . gray ( ' changed to ' ) + newName + '.map' ) ;
93
93
}
94
94
95
95
} ) ;
Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
- window . f = function ( m , a ) { return m * a ; } ;
2
+ window . f = function ( m , a ) { return m * a ; } ;
Original file line number Diff line number Diff line change @@ -5,9 +5,9 @@ var assert = require('assert');
5
5
var hashes = {
6
6
'test/fixtures/file.png' : 'test/tmp/file.26365248.png' ,
7
7
'test/fixtures/cfgfile.png' : 'test/tmp/cfgfile.da63.png' ,
8
- 'test/fixtures/math.js' : 'test/tmp/withSourceMaps/math.2f56179e .js' ,
9
- 'test/fixtures/math.js.map' : 'test/tmp/withSourceMaps/math.2f56179e .js.map' ,
10
- 'test/fixtures/physics.js' : 'test/tmp/withSourceMaps/physics.14a0a482 .js' ,
8
+ 'test/fixtures/math.js' : 'test/tmp/withSourceMaps/math.6272e937 .js' ,
9
+ 'test/fixtures/math.js.map' : 'test/tmp/withSourceMaps/math.6272e937 .js.map' ,
10
+ 'test/fixtures/physics.js' : 'test/tmp/withSourceMaps/physics.28cb15fd .js' ,
11
11
'test/fixtures/another.png' : 'test/tmp/another-processed-92279d3f.png'
12
12
} ;
13
13
You can’t perform that action at this time.
0 commit comments