Skip to content
This repository was archived by the owner on Dec 11, 2021. It is now read-only.

Commit d01acad

Browse files
Rohit Mulangesfrisk
authored andcommitted
Build: Add variable files to linting and update jscs
Closes gh-105
1 parent 4495462 commit d01acad

File tree

10 files changed

+61
-57
lines changed

10 files changed

+61
-57
lines changed

.jshintrc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
"trailing": true,
1313
"undef": true,
1414
"unused": true,
15-
16-
"node": true
15+
"node": true,
16+
"globals": {
17+
"define": false
18+
}
1719
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"grunt-csscomb": "3.0.0",
5252
"grunt-git-authors": "2.0.0",
5353
"grunt-html": "1.6.0",
54-
"grunt-jscs": "0.6.2",
54+
"grunt-jscs": "2.0.0",
5555
"grunt-sass": "0.17.0",
5656
"grunt-selenium-server": "0.1.2",
5757
"grunt-svgmin": "2.0.0",

performance/component.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ var components = {
77
html = "";
88

99
function render( i ) {
10-
framework[ component ].variations[ keys[ i ] ].forEach(function( value ) {
10+
framework[ component ].variations[ keys[ i ] ].forEach( function( value ) {
1111
current[ keys[ i ] ] = value;
1212
if ( i < keys.length - 1 ) {
1313
render( i + 1 );
@@ -17,7 +17,7 @@ var components = {
1717
html = html + framework[ component ].generator.call( this, current );
1818
}
1919
}
20-
});
20+
} );
2121
}
2222
while ( currentCount < count ) {
2323
render( 0 );

scss/variables/chassis.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
// This is just boiuler plate dont worry about it
1+
// This is just boiler plate dont worry about it
22
// This just supports loading in any enviroment
3-
(function ( root, factory ) {
4-
if ( typeof define === "function" && define.amd ) {
5-
define( [], factory );
6-
} else if ( typeof exports === "object" ) {
7-
module.exports = factory();
8-
} else {
9-
root.chassis = factory();
10-
}
11-
}( this, function () {
3+
( function( root, factory ) {
4+
if ( typeof define === "function" && define.amd ) {
5+
define( [], factory );
6+
} else if ( typeof exports === "object" ) {
7+
module.exports = factory();
8+
} else {
9+
root.chassis = factory();
10+
}
11+
}( this, function() {
1212
return {};
13-
} ) );
13+
} ) );

scss/variables/colors.js

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
( function ( root, factory ) {
2-
if ( typeof define === 'function' && define.amd ) {
3-
define( [ "./chassis" ], factory );
4-
} else if (typeof exports === 'object') {
5-
module.exports = factory( require('./chassis') );
6-
} else {
7-
root.chassis = factory( root.chassis );
8-
}
9-
}(this, function ( chassis ) {
1+
( function( root, factory ) {
2+
if ( typeof define === "function" && define.amd ) {
3+
define( [ "./chassis" ], factory );
4+
} else if ( typeof exports === "object" ) {
5+
module.exports = factory( require( "./chassis" ) );
6+
} else {
7+
root.chassis = factory( root.chassis );
8+
}
9+
}( this, function( chassis ) {
10+
1011
var colors = {
1112
"chassis-gray-dark": {
1213
"value": "#383838",
@@ -32,7 +33,7 @@ var colors = {
3233
"value": "#fadf51",
3334
"name": "Chassis Yellow"
3435
}
35-
}
36+
};
3637
chassis.colors = {
3738
"background": colors[ "chassis-gray-dark" ],
3839
"font": colors[ "chassis-gray-dark" ],
@@ -43,6 +44,6 @@ chassis.colors = {
4344
name: "Chassis - Blockquote color",
4445
value: "#eee"
4546
}
46-
}
47+
};
4748
return chassis;
4849
} ) );

scss/variables/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
var fs = require( "fs" );
2-
var path = require( "path" );
3-
var varPath = path.join( process.cwd(), "scss/variables" );
4-
var chassis;
1+
var fs = require( "fs" ),
2+
path = require( "path" ),
3+
varPath = path.join( process.cwd(), "scss/variables" ),
4+
chassis;
55

66
fs.readdirSync( varPath ).forEach( function( file ) {
77
chassis = require( path.join( process.cwd(), "scss/variables" ) + "/" + file );
88
} );
99

10-
module.exports = chassis;
10+
module.exports = chassis;

scss/variables/template.js

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
// This is just boiuler plate dont worry about it
1+
// This is just boiler plate dont worry about it
22
// This just supports loading in any enviroment
3-
(function ( root, factory ) {
4-
if ( typeof define === "function" && define.amd ) {
5-
define( [], factory );
6-
} else if ( typeof exports === "object" ) {
7-
module.exports = factory();
8-
} else {
9-
root.chassis = factory();
10-
}
11-
}( this, function () {
3+
( function( root, factory ) {
4+
if ( typeof define === "function" && define.amd ) {
5+
define( [], factory );
6+
} else if ( typeof exports === "object" ) {
7+
module.exports = factory();
8+
} else {
9+
root.chassis = factory();
10+
}
11+
}( this, function() {
12+
1213
//>> return chasses.moduleName;
1314
} ) );

scss/variables/typography.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
( function ( root, factory ) {
2-
if ( typeof define === 'function' && define.amd ) {
1+
( function( root, factory ) {
2+
if ( typeof define === "function" && define.amd ) {
33
define( [ "./chassis" ], factory );
4-
} else if (typeof exports === 'object') {
5-
module.exports = factory( require('./chassis') );
4+
} else if ( typeof exports === "object" ) {
5+
module.exports = factory( require( "./chassis" ) );
66
} else {
77
root.chassis = factory( root.chassis );
88
}
9-
}(this, function ( chassis ) {
9+
}( this, function( chassis ) {
1010

11-
var color = "#222";
12-
var fontSize = "20px";
13-
var lineHeight = 1.5;
11+
var color = "#222",
12+
fontSize = "20px",
13+
lineHeight = 1.5;
1414

1515
chassis.typography = {
1616
normal: {
@@ -43,15 +43,15 @@ chassis.typography = {
4343
},
4444
monospace: {
4545
name: "Font Family - Monospace",
46-
value :"\"courier new\", monospace"
46+
value: "\"courier new\", monospace"
4747
},
4848
serif: {
4949
name: "Font Family - Serif",
50-
value :"Georgia, \"Times New Roman\", Times, serif"
50+
value: "Georgia, \"Times New Roman\", Times, serif"
5151
},
5252
sans: {
5353
name: "Font Family - Sans",
54-
value :"Helvetica, Arial, sans-serif"
54+
value: "Helvetica, Arial, sans-serif"
5555
}
5656
};
5757

tasks/options/jscs.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module.exports = {
2-
all: [ "*.js", "performance/**/*.js" ]
3-
};
2+
all: [ "*.js", "performance/**/*.js", "scss/variables/**/*.js" ]
3+
};

tasks/options/jshint.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module.exports = {
2-
files: [ "*.js", "performance/**/*.js" ],
2+
files: [ "*.js", "performance/**/*.js", "scss/variables/**/*.js" ],
33
options: {
44
jshintrc: ".jshintrc"
55
}
6-
};
6+
};

0 commit comments

Comments
 (0)