From eb32411fa71d1a13b6128a5264ce0b221109df51 Mon Sep 17 00:00:00 2001 From: isqua Date: Thu, 27 Nov 2014 00:38:14 +0300 Subject: [PATCH] Add jshint and jscs --- .gitignore | 1 + Gruntfile.js | 4 ++-- package.json | 8 ++++++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 13dc734..3e46deb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ chrome_point_plus/vendor/ /nbproject/private/ node_modules/ +npm-debug.log publish vendor/ diff --git a/Gruntfile.js b/Gruntfile.js index 39dd4f0..78d48a3 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -22,8 +22,8 @@ vendorCopy.push({ dest: 'chrome_point_plus/' }); +/* global module */ module.exports = function(grunt) { - // Настройки grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), @@ -46,7 +46,7 @@ module.exports = function(grunt) { gitDescribeOptions: '--tags --always --abbrev=1 --dirty=-d', globalReplace: true } - }, + } }); // Загрузить плагины diff --git a/package.json b/package.json index 89a5d55..9b2bcc5 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,9 @@ "description": "Chrome extension for point.im", "main": "index.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "postinstall": "./node_modules/.bin/bower install && grunt", + "lint": "./node_modules/.bin/jshint . && ./node_modules/.bin/jscs .", + "test": "npm run lint" }, "repository": { "type": "git", @@ -16,6 +18,8 @@ "bower": "^1.3.12", "grunt": "^0.4.5", "grunt-bump": "git://github.com/nkirkes/grunt-bump.git#nkirkes/restrict-version-key-name", - "grunt-contrib-copy": "^0.7.0" + "grunt-contrib-copy": "^0.7.0", + "jscs": "^1.10.0", + "jshint": "^2.6.0" } }