Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updating jquery init template.

* Removed in file JSHint comments in favor of .jshintrc files.
* Better parameterized watch task.
* Added .gitignore for node_modules folder.
  • Loading branch information...
commit aa055c3fd7010dc4f003090833b0a4fac306451d 1 parent b6825d7
@cowboy authored
View
1  tasks/init/jquery/root/.gitignore
@@ -0,0 +1 @@
+/node_modules/
View
14 tasks/init/jquery/root/.jshintrc
@@ -0,0 +1,14 @@
+{
+ "curly": true,
+ "eqeqeq": true,
+ "immed": true,
+ "latedef": true,
+ "newcap": true,
+ "noarg": true,
+ "sub": true,
+ "undef": true,
+ "boss": true,
+ "eqnull": true,
+ "node": true,
+ "es5": true
+}
View
50 tasks/init/jquery/root/Gruntfile.js
@@ -1,4 +1,5 @@
-/*global module:false*/
+'use strict';
+
module.exports = function(grunt) {
// Project configuration.
@@ -25,29 +26,38 @@ module.exports = function(grunt) {
files: ['test/**/*.html']
},
lint: {
- files: ['Gruntfile.js', 'src/**/*.js', 'test/**/*.js'],
- options: {
+ gruntfile: {
options: {
- curly: true,
- eqeqeq: true,
- immed: true,
- latedef: true,
- newcap: true,
- noarg: true,
- sub: true,
- undef: true,
- boss: true,
- eqnull: true,
- browser: true
+ jshintrc: '.jshintrc'
},
- globals: {
- jQuery: true
- }
- }
+ src: 'Gruntfile.js'
+ },
+ src: {
+ options: {
+ jshintrc: 'src/.jshintrc'
+ },
+ src: ['src/**/*.js']
+ },
+ test: {
+ options: {
+ jshintrc: 'test/.jshintrc'
+ },
+ src: ['test/**/*.js']
+ },
},
watch: {
- files: '<config:lint.files>',
- tasks: ['lint', 'qunit']
+ gruntfile: {
+ files: '<config:lint.gruntfile.src>',
+ tasks: ['lint:gruntfile']
+ },
+ src: {
+ files: '<config:lint.src.src>',
+ tasks: ['lint:src', 'qunit']
+ },
+ test: {
+ files: '<config:lint.test.src>',
+ tasks: ['lint:test', 'qunit']
+ },
}
});
View
14 tasks/init/jquery/root/src/.jshintrc
@@ -0,0 +1,14 @@
+{
+ "curly": true,
+ "eqeqeq": true,
+ "immed": true,
+ "latedef": true,
+ "newcap": true,
+ "noarg": true,
+ "sub": true,
+ "undef": true,
+ "boss": true,
+ "eqnull": true,
+ "browser": true,
+ "predef": ["jQuery"]
+}
View
31 tasks/init/jquery/root/test/.jshintrc
@@ -0,0 +1,31 @@
+{
+ "curly": true,
+ "eqeqeq": true,
+ "immed": true,
+ "latedef": true,
+ "newcap": true,
+ "noarg": true,
+ "sub": true,
+ "undef": true,
+ "boss": true,
+ "eqnull": true,
+ "browser": true,
+ "predef": [
+ "jQuery",
+ "QUnit",
+ "module",
+ "test",
+ "asyncTest",
+ "expect",
+ "start",
+ "stop",
+ "ok",
+ "equal",
+ "notEqual",
+ "deepEqual",
+ "notDeepEqual",
+ "strictEqual",
+ "notStrictEqual",
+ "raises"
+ ]
+}
View
4 tasks/init/jquery/root/test/name_test.js
@@ -1,8 +1,4 @@
-/*global QUnit:false, module:false, test:false, asyncTest:false, expect:false*/
-/*global start:false, stop:false ok:false, equal:false, notEqual:false, deepEqual:false*/
-/*global notDeepEqual:false, strictEqual:false, notStrictEqual:false, raises:false*/
(function($) {
-
/*
======== A Handy Little QUnit Reference ========
http://docs.jquery.com/QUnit
Please sign in to comment.
Something went wrong with that request. Please try again.