Skip to content

Commit d71173a

Browse files
committed
Initial commit
0 parents  commit d71173a

37 files changed

+1088
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.DS_Store
2+
node_modules
3+
npm-debug.log

.jscsrc

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
{
2+
"requireSpacesInConditionalExpression": true,
3+
"requireSpacesInFunction": {
4+
"beforeOpeningCurlyBrace": true
5+
},
6+
"disallowSpacesInFunction": {
7+
"beforeOpeningRoundBrace": true
8+
},
9+
"requireMultipleVarDecl": "onevar",
10+
"requireSpacesInsideObjectBrackets": "all",
11+
"disallowSpaceAfterObjectKeys": true,
12+
"requireSpaceAfterBinaryOperators": [
13+
"=", "+=", "-=", "*=", "/=", "%=", "<<=", ">>=", ">>>=",
14+
"&=", "|=", "^=", "+=",
15+
16+
"+", "-", "*", "/", "%", "<<", ">>", ">>>", "&",
17+
"|", "^", "&&", "||", "===", "==", ">=",
18+
"<=", "<", ">", "!=", "!=="
19+
],
20+
"requireSpaceBeforeBinaryOperators": [
21+
"=", "+=", "-=", "*=", "/=", "%=", "<<=", ">>=", ">>>=",
22+
"&=", "|=", "^=", "+=",
23+
24+
"+", "-", "*", "/", "%", "<<", ">>", ">>>", "&",
25+
"|", "^", "&&", "||", "===", "==", ">=",
26+
"<=", "<", ">", "!=", "!=="
27+
],
28+
"disallowKeywords": ["with"],
29+
"disallowMultipleLineBreaks": true,
30+
"validateLineBreaks": "LF",
31+
"disallowMixedSpacesAndTabs": "smart",
32+
"disallowTrailingWhitespace": true,
33+
34+
"requireCurlyBraces": [ "if", "else", "for", "while", "do", "try", "catch" ],
35+
"requireSpaceBeforeBlockStatements": true,
36+
"requireParenthesesAroundIIFE": true,
37+
"requireBlocksOnNewline": true,
38+
"requireOperatorBeforeLineBreak": [
39+
"?",
40+
"=",
41+
"+",
42+
"-",
43+
"/",
44+
"*",
45+
"==",
46+
"===",
47+
"!=",
48+
"!==",
49+
">",
50+
">=",
51+
"<",
52+
"<="
53+
],
54+
"requireSpaceBeforeBinaryOperators": [
55+
"?",
56+
"=",
57+
"+",
58+
"-",
59+
"/",
60+
"*",
61+
"==",
62+
"===",
63+
"!=",
64+
"!==",
65+
">",
66+
">=",
67+
"<",
68+
"<="
69+
],
70+
"requireSpaceAfterBinaryOperators": [
71+
"?",
72+
"=",
73+
"+",
74+
"/",
75+
"*",
76+
":",
77+
"==",
78+
"===",
79+
"!=",
80+
"!==",
81+
">",
82+
">=",
83+
"<",
84+
"<="
85+
],
86+
"disallowSpaceBeforeBinaryOperators": [","],
87+
"disallowSpaceAfterBinaryOperators": [],
88+
"disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~"],
89+
"requireSpaceAfterPrefixUnaryOperators": ["!"],
90+
"disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
91+
"requireCamelCaseOrUpperCaseIdentifiers": true,
92+
"disallowMultipleLineStrings": true,
93+
"validateQuoteMarks": "'",
94+
"validateIndentation": "\t",
95+
"requireLineFeedAtFileEnd": true,
96+
"requireDotNotation": true,
97+
"disallowNewlineBeforeBlockStatements": true,
98+
99+
"disallowTrailingComma": true,
100+
"disallowPaddingNewlinesInBlocks": true,
101+
"disallowEmptyBlocks": true,
102+
"disallowQuotedKeysInObjects": "allButReserved",
103+
"disallowDanglingUnderscores": true,
104+
"requireCommaBeforeLineBreak": true,
105+
"disallowKeywordsOnNewLine": ["else"],
106+
"requireCapitalizedConstructors": true,
107+
"safeContextKeyword": [ "that" ],
108+
"validateJSDoc": {
109+
"checkParamNames": true,
110+
"checkRedundantParams": true,
111+
"requireParamTypes": true
112+
}
113+
}

.jshintnoderc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"boss": true,
3+
"curly": true,
4+
"eqeqeq": true,
5+
"eqnull": true,
6+
"immed": true,
7+
"latedef": true,
8+
"newcap": true,
9+
"noarg": true,
10+
"quotmark": "single",
11+
"sub": true,
12+
"undef": true,
13+
"unused": true,
14+
15+
"node": true
16+
}

.jshintrc

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"boss": true,
3+
"curly": true,
4+
"eqeqeq": true,
5+
"eqnull": true,
6+
"es3": true,
7+
"immed": true,
8+
"latedef": true,
9+
"newcap": true,
10+
"noarg": true,
11+
"quotmark": "single",
12+
"sub": true,
13+
"strict": true,
14+
"undef": true,
15+
"unused": "vars",
16+
17+
"browser": true,
18+
"jquery": true,
19+
20+
"globals": {
21+
"exports": true,
22+
"module": false
23+
}
24+
}

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
## 0.2.0
2+
3+
- Updated peerDependencies
4+
- Made icon font more Generic
5+
- Made Author assets directory more generic
6+
- Added jscs for internal coding standards checks
7+
8+
## 0.1.2
9+
10+
Fixed a number of things in the config which simplify any additional tasks within the theme. Changes include:
11+
12+
- Added grunt-webfont
13+
- Added custom tasks
14+
- Added a bower install task
15+
- Simplified global aliases
16+
17+
## 0.1.1
18+
19+
Updated linter config paths to match their new default locations.
20+
21+
## 0.1.0
22+
23+
First public release.

Gruntfile.js

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*jshint node:true */
2+
3+
module.exports = function( grunt ) {
4+
'use strict';
5+
6+
var config = require( './index' )();
7+
8+
grunt.initConfig({
9+
jscs: {
10+
options: {
11+
config: config.paths.global.config + '/.jscsrc'
12+
},
13+
check: {
14+
files: {
15+
src: [
16+
'Gruntfile.js',
17+
'index.js',
18+
'config/**/*.js'
19+
]
20+
}
21+
}
22+
},
23+
jshint: {
24+
options: {
25+
jshintrc: config.paths.global.config + '/.jshintnoderc'
26+
},
27+
all: [
28+
'index.js',
29+
'config/**/*.js'
30+
]
31+
}
32+
33+
});
34+
35+
grunt.loadNpmTasks( 'grunt-jscs' );
36+
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
37+
grunt.registerTask( 'default', [ 'jscs', 'jshint' ] );
38+
};

LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License
2+
3+
Copyright (c) 2015 WP Site Care, LLC http://www.wpsitecare.com
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# WP Site Care WordPress Theme Config
2+
3+
[![peerDependency Status](https://david-dm.org/wpsitecare/sitecare-theme-config/peer-status.svg)](https://david-dm.org/wpsitecare/sitecare-theme-config#info=peerDependencies)
4+
5+
A reusable grunt configuration for WP Site Care WordPress themes.

config/grunt/addtextdomain.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// https://github.com/blazersix/grunt-wp-i18n
2+
module.exports = {
3+
options: {
4+
textdomain: '<%= pkg.theme.textdomain %>',
5+
updateDomains: ['all']
6+
},
7+
php: {
8+
files: {
9+
src: [
10+
'<%= files.php %>',
11+
'!<%= paths.hybridCore %>**'
12+
]
13+
}
14+
}
15+
};

config/grunt/aliases.js

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
module.exports = function() {
2+
'use strict';
3+
var tasks = {
4+
build: [
5+
'clean',
6+
'bower_install',
7+
'build:dependencies:php',
8+
'build:fonts',
9+
'build:css',
10+
'build:images',
11+
'build:js',
12+
'clean:bowercomponents',
13+
'build:i18n'
14+
],
15+
'build:dev': [
16+
'build:fonts',
17+
'build:css',
18+
'build:images',
19+
'build:js'
20+
],
21+
'build:dependencies': [
22+
'build:dependencies:css',
23+
'build:dependencies:fonts',
24+
'build:dependencies:js',
25+
'build:dependencies:php'
26+
],
27+
'build:i18n': [
28+
'clean:languages',
29+
'addtextdomain',
30+
'makepot',
31+
'newer:copy:languages'
32+
],
33+
check: [
34+
'scsslint',
35+
'jshint',
36+
'jsonlint',
37+
'jsvalidate',
38+
'jscs',
39+
'checktextdomain',
40+
'complexity'
41+
],
42+
commit: [
43+
'check'
44+
],
45+
'default': [
46+
'watch'
47+
],
48+
newtheme: [
49+
'replace:packagename',
50+
'readpkg',
51+
'build'
52+
],
53+
'package': [
54+
'build',
55+
'compress:dist'
56+
],
57+
'package:dev': [
58+
'build',
59+
'compress:dev'
60+
]
61+
};
62+
63+
return tasks;
64+
};

0 commit comments

Comments
 (0)