fixing jshint issues, modifying to allow for some not too strict jshint rules, adding grunt newer dependency.

This commit is contained in:
Nelson Omuto 2014-10-03 16:13:48 -04:00
parent 0f78f2894e
commit 5d3d2fd307
7 changed files with 24 additions and 62 deletions

View File

@ -1,6 +1,5 @@
{ {
"bitwise": true, "bitwise": true,
"camelcase": true,
"curly": true, "curly": true,
"eqeqeq": false, "eqeqeq": false,
"es3": false, "es3": false,
@ -15,7 +14,6 @@
"nonbsp": true, "nonbsp": true,
"nonew": true, "nonew": true,
"plusplus": false, "plusplus": false,
"quotmark": "double",
"undef": true, "undef": true,
"unused": true, "unused": true,
"strict": false, "strict": false,

View File

@ -80,21 +80,21 @@ module.exports = function(grunt) {
test: { test: {
options: { options: {
port: 8041, port: 8041,
open: 'http://localhost:8041/_SpecRunner.html', open: "http://localhost:8041/_SpecRunner.html",
base: "." base: "."
} }
} }
}, },
jasmine: { jasmine: {
scripts: 'scripts/**/*.js', scripts: "scripts/**/*.js",
options: { options: {
build: true, build: true,
specs: 'test/*Spec.js', specs: "test/*Spec.js",
helpers: 'test/*Helper.js', helpers: "test/*Helper.js",
vendor: [ vendor: [
'https://code.jquery.com/jquery-1.10.2.min.js', "https://code.jquery.com/jquery-1.10.2.min.js",
'https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js' "https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"
] ]
} }
}, },
@ -107,8 +107,7 @@ module.exports = function(grunt) {
all: [ all: [
"Gruntfile.js", "Gruntfile.js",
"scripts/**/*.js", "scripts/**/*.js",
"template/**/*.js", "template/**/*.js"
"test/**/*.js"
], ],
test: { test: {
options: { options: {
@ -132,9 +131,9 @@ module.exports = function(grunt) {
livereload: "<%= connect.options.livereload %>" livereload: "<%= connect.options.livereload %>"
}, },
files: [ files: [
'index.html', "index.html",
'css-compiled/**/*.css', "css-compiled/**/*.css",
'**/*.{png,jpg,jpeg,gif,webp,svg}' "**/*.{png,jpg,jpeg,gif,webp,svg}"
] ]
} }
} }
@ -168,6 +167,6 @@ module.exports = function(grunt) {
"build:"+ buildTarget, "build:"+ buildTarget,
"connect:livereload", "connect:livereload",
"watch" "watch"
]) ]);
}); });
}; };

View File

@ -1,43 +0,0 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Jasmine Spec Runner</title>
<link rel="shortcut icon" type="image/png" href=".grunt/grunt-contrib-jasmine/jasmine_favicon.png">
<link rel="stylesheet" type="text/css" href=".grunt/grunt-contrib-jasmine/jasmine.css">
</head>
<body>
<script src=".grunt/grunt-contrib-jasmine/es5-shim.js"></script>
<script src=".grunt/grunt-contrib-jasmine/jasmine.js"></script>
<script src=".grunt/grunt-contrib-jasmine/jasmine-html.js"></script>
<script src=".grunt/grunt-contrib-jasmine/json2.js"></script>
<script src=".grunt/grunt-contrib-jasmine/boot.js"></script>
<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<script src="test/*Helper.js"></script>
<script src="scripts/material.js"></script>
<script src="scripts/ripples.js"></script>
<script src="test/materialSpec.js"></script>
<script src="test/ripplesSpec.js"></script>
<script src=".grunt/grunt-contrib-jasmine/reporter.js"></script>
</body>
</html>

View File

@ -27,6 +27,7 @@
"grunt-contrib-less": "^0.11.4", "grunt-contrib-less": "^0.11.4",
"grunt-contrib-sass": "^0.8.1", "grunt-contrib-sass": "^0.8.1",
"grunt-contrib-watch": "^0.6.1", "grunt-contrib-watch": "^0.6.1",
"grunt-newer": "^0.7.0",
"jshint-stylish": "^1.0.0", "jshint-stylish": "^1.0.0",
"load-grunt-tasks": "^0.6.0" "load-grunt-tasks": "^0.6.0"
} }

View File

@ -1,13 +1,15 @@
/* Copyright 2014+, Federico Zivolo, LICENSE at https://github.com/FezVrasta/bootstrap-material-design/blob/master/LICENSE.md */ /* Copyright 2014+, Federico Zivolo, LICENSE at https://github.com/FezVrasta/bootstrap-material-design/blob/master/LICENSE.md */
/* globals CustomEvent */ /* globals CustomEvent */
var ripples = { window.ripples = {
init : function(withRipple) { init : function(withRipple) {
"use strict"; "use strict";
// Cross browser matches function // Cross browser matches function
function matchesSelector(dom_element, selector) { function matchesSelector(dom_element, selector) {
var matches = dom_element.matches || dom_element.matchesSelector || dom_element.webkitMatchesSelector || dom_element.mozMatchesSelector || dom_element.msMatchesSelector || dom_element.oMatchesSelector; var matches = dom_element.matches || dom_element.matchesSelector || dom_element.webkitMatchesSelector ||
dom_element.mozMatchesSelector ||
dom_element.msMatchesSelector || dom_element.oMatchesSelector;
return matches.call(dom_element, selector); return matches.call(dom_element, selector);
} }

View File

@ -1,13 +1,15 @@
/* Copyright 2014+, Federico Zivolo, LICENSE at https://github.com/FezVrasta/bootstrap-material-design/blob/master/LICENSE.md */ /* Copyright 2014+, Federico Zivolo, LICENSE at https://github.com/FezVrasta/bootstrap-material-design/blob/master/LICENSE.md */
/* globals CustomEvent */ /* globals CustomEvent */
var ripples = { window.ripples = {
init : function(withRipple) { init : function(withRipple) {
"use strict"; "use strict";
// Cross browser matches function // Cross browser matches function
function matchesSelector(dom_element, selector) { function matchesSelector(dom_element, selector) {
var matches = dom_element.matches || dom_element.matchesSelector || dom_element.webkitMatchesSelector || dom_element.mozMatchesSelector || dom_element.msMatchesSelector || dom_element.oMatchesSelector; var matches = dom_element.matches || dom_element.matchesSelector || dom_element.webkitMatchesSelector ||
dom_element.mozMatchesSelector ||
dom_element.msMatchesSelector || dom_element.oMatchesSelector;
return matches.call(dom_element, selector); return matches.call(dom_element, selector);
} }

View File

@ -39,6 +39,9 @@
"brackets": true, "brackets": true,
"define": true, "define": true,
"Mustache": true, "Mustache": true,
"window": true "window": true,
"expect": true,
"describe": true,
"it": true
} }
} }