Commit c6a9e2ce authored by Tom Käsler's avatar Tom Käsler

add gulp file

add dependencies for gulp/jscs/jshint
add jscs/jshint files
parent f8e9f185
......@@ -3,3 +3,4 @@ settings-staging.json
npm-debug.log
.idea/
.DS_Store
node_modules
{
"disallowKeywords": ["with"],
"disallowKeywordsOnNewLine": ["else"],
"disallowMixedSpacesAndTabs": true,
"disallowMultipleLineStrings": true,
"disallowPaddingNewlinesInBlocks": true,
"disallowSpaceAfterObjectKeys": true,
"disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
"disallowSpaceBeforeBinaryOperators": [","],
"disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
"disallowSpacesInCallExpression": true,
"disallowSpacesInFunctionDeclaration": {
"beforeOpeningRoundBrace": true
},
"disallowSpacesInNamedFunctionExpression": {
"beforeOpeningRoundBrace": true
},
"disallowSpacesInsideArrayBrackets": true,
"disallowSpacesInsideObjectBrackets": true,
"disallowSpacesInsideParentheses": true,
"disallowTrailingComma": true,
"disallowTrailingWhitespace": true,
"requireCamelCaseOrUpperCaseIdentifiers": true,
"requireCapitalizedConstructors": true,
"requireCommaBeforeLineBreak": true,
"requireDotNotation": true,
"requireLineFeedAtFileEnd": true,
"requireSpaceAfterBinaryOperators": true,
"requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch"],
"requireSpaceBeforeBinaryOperators": true,
"requireSpaceBeforeBlockStatements": true,
"requireSpaceBeforeKeywords": ["else", "while", "catch"],
"requireSpaceBeforeObjectValues": true,
"requireSpacesInAnonymousFunctionExpression": {
"beforeOpeningRoundBrace": true
},
"requireSpacesInConditionalExpression": {
"afterTest": true,
"beforeConsequent": true,
"afterConsequent": true,
"beforeAlternate": true
},
"requireSpacesInFunction": {
"beforeOpeningCurlyBrace": true
},
"validateIndentation": "\t",
"validateLineBreaks": "LF",
"maxErrors": Infinity
}
{
"browser": true,
"esnext": true,
"undef": true,
"unused": true,
"curly": true,
"eqnull": true,
"forin": true,
"latedef": true,
"noarg": true,
"nonbsp": true,
"globals": {
"_": false,
"$": false,
"hljs": false,
"marked": false,
"MathJax": false,
"buzz": false,
"Router": false,
"ReactiveCountdown": false,
"App": false,
"console": false,
"closeSplashscreen": true,
"showSplashscreen": true,
"closeAndRedirectTo": true
}
}
/*
* This file is part of ARSnova Click.
* Copyright (C) 2016 The ARSnova Team
*
* ARSnova Click is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* ARSnova Click is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with ARSnova Click. If not, see <http://www.gnu.org/licenses/>.*/
var gulp = require('gulp'),
watch = require('gulp-watch');
var jshint = require('gulp-jshint');
var jscs = require('gulp-jscs');
var stylish = require('jshint-stylish');
var paths = [
'./{client,imports,i18n,public,server}/**/*.js'
];
gulp.task('default', ['codeCheck']);
gulp.task('watch', function () {
gulp.start('codeCheck');
gulp.watch(paths, ['codeCheck'])
});
gulp.task('codeCheck', function () {
gulp.start('lint');
gulp.start('jscs');
});
gulp.task('lint', function () {
return gulp.src(paths)
.pipe(jshint())
.pipe(jshint.reporter(stylish));
});
gulp.task('jscs', function () {
return gulp.src(paths)
.pipe(jscs())
.pipe(jscs.reporter());
});
......@@ -13,5 +13,12 @@
"devDependencies": {},
"author": "",
"license": "ISC",
"description": ""
"description": "",
"devDependencies": {
"gulp": "^3.9.1",
"gulp-jscs": "^3.0.2",
"gulp-jshint": "^2.0.0",
"gulp-watch": "^4.3.5",
"jshint-stylish": "^2.1.0"
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment