-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Corrected several of JSHint errors/warnings
- Added JSCS code style validation. - Corrected hundreds of JSCS warnings. - Fixed unwanted global variables. - Fixed closeAll method not working at all. -Version bump
- Loading branch information
Showing
5 changed files
with
160 additions
and
236 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,79 +1,91 @@ | ||
module.exports = function(grunt) { | ||
module.exports = function (grunt) { | ||
|
||
grunt.initConfig({ | ||
grunt.initConfig({ | ||
|
||
// Import package manifest | ||
pkg: grunt.file.readJSON("package.json"), | ||
// Import package manifest | ||
pkg: grunt.file.readJSON('package.json'), | ||
|
||
// Banner definitions | ||
meta: { | ||
banner: "/*\n" + | ||
" * <%= pkg.title || pkg.name %> - v<%= pkg.version %>\n" + | ||
" * <%= pkg.description %>\n" + | ||
" * <%= pkg.homepage %>\n" + | ||
" *\n" + | ||
" * Made by <%= pkg.author.name %>\n" + | ||
" * Under <%= pkg.license %> License\n" + | ||
" */\n" | ||
}, | ||
// Banner definitions | ||
meta: { | ||
banner: '/*\n' + | ||
' * <%= pkg.title || pkg.name %> - v<%= pkg.version %>\n' + | ||
' * <%= pkg.description %>\n' + | ||
' * <%= pkg.homepage %>\n' + | ||
' *\n' + | ||
' * Made by <%= pkg.author.name %>\n' + | ||
' * Under <%= pkg.license %> License\n' + | ||
' */\n' | ||
}, | ||
|
||
// Concat definitions | ||
concat: { | ||
options: { | ||
banner: "<%= meta.banner %>" | ||
}, | ||
dist: { | ||
src: ["src/jquery.ez-plus.js"], | ||
dest: "dist/jquery.ez-plus.js" | ||
} | ||
}, | ||
// Concat definitions | ||
concat: { | ||
options: { | ||
banner: '<%= meta.banner %>' | ||
}, | ||
dist: { | ||
src: ['src/jquery.ez-plus.js'], | ||
dest: 'dist/jquery.ez-plus.js' | ||
} | ||
}, | ||
|
||
// Lint definitions | ||
jshint: { | ||
files: ["src/jquery.ez-plus.js"], | ||
options: { | ||
jshintrc: ".jshintrc" | ||
} | ||
}, | ||
// Lint definitions | ||
jshint: { | ||
files: ['src/jquery.ez-plus.js'], | ||
options: { | ||
jshintrc: '.jshintrc' | ||
} | ||
}, | ||
|
||
// Minify definitions | ||
uglify: { | ||
my_target: { | ||
src: ["dist/jquery.ez-plus"], | ||
dest: "dist/jquery.ez-plus.min.js" | ||
}, | ||
options: { | ||
banner: "<%= meta.banner %>" | ||
} | ||
}, | ||
// JSCS definitions | ||
jscs: { | ||
src: 'src/*.js', | ||
options: { | ||
config: '.jscsrc', | ||
esnext: true, // If you use ES6 http://jscs.info/overview.html#esnext | ||
verbose: true, // If you need output with rule names http://jscs.info/overview.html#verbose | ||
requireCurlyBraces: ['if'] | ||
} | ||
}, | ||
|
||
// CoffeeScript compilation | ||
coffee: { | ||
compile: { | ||
files: { | ||
"dist/jquery.ez-plus.js": "src/jquery.ez-plus.coffee" | ||
} | ||
} | ||
}, | ||
// Minify definitions | ||
uglify: { | ||
my_target: { | ||
src: ['dist/jquery.ez-plus'], | ||
dest: 'dist/jquery.ez-plus.min.js' | ||
}, | ||
options: { | ||
banner: '<%= meta.banner %>' | ||
} | ||
}, | ||
|
||
// watch for changes to source | ||
// Better than calling grunt a million times | ||
// (call 'grunt watch') | ||
watch: { | ||
files: ['src/*'], | ||
tasks: ['default'] | ||
} | ||
// CoffeeScript compilation | ||
coffee: { | ||
compile: { | ||
files: { | ||
'dist/jquery.ez-plus.js': 'src/jquery.ez-plus.coffee' | ||
} | ||
} | ||
}, | ||
|
||
}); | ||
// watch for changes to source | ||
// Better than calling grunt a million times | ||
// (call 'grunt watch') | ||
watch: { | ||
files: ['src/*'], | ||
tasks: ['default'] | ||
} | ||
|
||
grunt.loadNpmTasks("grunt-contrib-concat"); | ||
grunt.loadNpmTasks("grunt-contrib-jshint"); | ||
grunt.loadNpmTasks("grunt-contrib-uglify"); | ||
grunt.loadNpmTasks("grunt-contrib-coffee"); | ||
grunt.loadNpmTasks("grunt-contrib-watch"); | ||
}); | ||
|
||
grunt.registerTask("build", ["concat", "uglify"]); | ||
grunt.registerTask("default", ["jshint", "build"]); | ||
grunt.registerTask("travis", ["default"]); | ||
grunt.loadNpmTasks('grunt-contrib-concat'); | ||
grunt.loadNpmTasks('grunt-contrib-jshint'); | ||
grunt.loadNpmTasks('grunt-jscs'); | ||
grunt.loadNpmTasks('grunt-contrib-uglify'); | ||
grunt.loadNpmTasks('grunt-contrib-coffee'); | ||
grunt.loadNpmTasks('grunt-contrib-watch'); | ||
|
||
grunt.registerTask('build', ['concat', 'uglify']); | ||
grunt.registerTask('default', ['jshint', 'jscs', 'build']); | ||
grunt.registerTask('travis', ['default']); | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.