Skip to content

Commit 934863e

Browse files
committed
Merge remote-tracking branch 'troolee/master' into tests
# Conflicts: # package.json
2 parents 1c47380 + c02c2a3 commit 934863e

21 files changed

+1298
-582
lines changed

.jscsrc

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"preset": "google",
3-
"validateIndentation": "\t",
2+
"preset": "node-style-guide",
3+
"validateIndentation": 4,
44
"maximumLineLength": 120,
55
"jsDoc": {
66
"checkAnnotations": {
@@ -10,5 +10,10 @@
1010
}
1111
}
1212
},
13-
"requireCamelCaseOrUpperCaseIdentifiers": true
13+
"requireCamelCaseOrUpperCaseIdentifiers": true,
14+
"validateLineBreaks": false,
15+
"requireTrailingComma": false,
16+
"disallowTrailingWhitespace": true,
17+
"requireCapitalizedComments": false,
18+
"excludeFiles": ["dist/*.js", "demo/*"]
1419
}

Gruntfile.js

Lines changed: 44 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
module.exports = function (grunt) {
1+
module.exports = function(grunt) {
22
grunt.loadNpmTasks('grunt-sass');
33
grunt.loadNpmTasks('grunt-contrib-cssmin');
44
grunt.loadNpmTasks('grunt-contrib-copy');
55
grunt.loadNpmTasks('grunt-contrib-uglify');
66
grunt.loadNpmTasks('grunt-doctoc');
7+
grunt.loadNpmTasks('grunt-contrib-jshint');
8+
grunt.loadNpmTasks('grunt-jscs');
9+
grunt.loadNpmTasks('grunt-contrib-watch');
710

811
grunt.initConfig({
912
sass: {
@@ -53,10 +56,46 @@ module.exports = function (grunt) {
5356
removeAd: false
5457
},
5558
readme: {
56-
target: "./README.md"
57-
}
58-
}
59+
options: {
60+
target: './README.md'
61+
}
62+
},
63+
doc: {
64+
options: {
65+
target: './doc/README.md'
66+
}
67+
},
68+
},
69+
70+
jshint: {
71+
all: ['src/*.js']
72+
},
73+
74+
jscs: {
75+
all: ['*.js', 'src/*.js', ],
76+
},
77+
78+
watch: {
79+
scripts: {
80+
files: ['src/*.js'],
81+
tasks: ['uglify', 'copy'],
82+
options: {
83+
},
84+
},
85+
styles: {
86+
files: ['src/*.scss'],
87+
tasks: ['sass', 'cssmin'],
88+
options: {
89+
},
90+
},
91+
docs: {
92+
files: ['README.md', 'doc/README.md'],
93+
tasks: ['doctoc'],
94+
options: {
95+
},
96+
},
97+
},
5998
});
6099

61-
grunt.registerTask('default', ['sass', 'cssmin', 'copy', 'uglify', 'doctoc']);
100+
grunt.registerTask('default', ['sass', 'cssmin', 'jshint', 'jscs', 'copy', 'uglify', 'doctoc']);
62101
};

0 commit comments

Comments
 (0)