Skip to content

Commit

Permalink
Upgraded grunt and fixed amd importing of scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
doug-martin committed Apr 16, 2013
1 parent dc27e36 commit 12575cd
Show file tree
Hide file tree
Showing 6 changed files with 131 additions and 137 deletions.
116 changes: 50 additions & 66 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -1,74 +1,58 @@
{
"predef": [
"jasmine",
"spyOn",
"it",
"console",
"describe",
"expect",
"beforeEach",
"afterEach",
"waits",
"waitsFor",
"runs",
"$",
"jQuery",
"_",
"require",
"define",
"sinon",
"thumbs"
"require"
],

"node" : true,
"browser" : true,
"devel" : true,
"jquery" : true,
"node": true,
"browser": true,
"devel": true,
"jquery": true,

"bitwise" : false,
"camelcase" : true,
"curly" : true,
"eqeqeq" : true,
"forin" : false,
"immed" : true,
"indent" : 4,
"latedef" : true,
"newcap" : true,
"noarg" : true,
"noempty" : true,
"nonew" : false,
"plusplus" : false,
"quotmark" : false,
"regexp" : false,
"undef" : true,
"unused" : false,
"strict" : false,
"trailing" : true,
"white" : false,
"bitwise": false,
"camelcase": true,
"curly": true,
"eqeqeq": true,
"forin": false,
"immed": true,
"indent": 4,
"latedef": true,
"newcap": true,
"noarg": true,
"noempty": true,
"nonew": false,
"plusplus": false,
"quotmark": false,
"regexp": false,
"undef": true,
"unused": false,
"strict": false,
"trailing": true,
"white": false,

"asi" : false,
"boss" : false,
"debug" : false,
"eqnull" : true,
"es5" : true,
"esnext" : true,
"evil" : false,
"expr" : true,
"funcscope" : false,
"globalstrict" : false,
"iterator" : false,
"lastsemic" : false,
"laxbreak" : false,
"laxcomma" : false,
"loopfunc" : false,
"multistr" : false,
"onecase" : false,
"proto" : false,
"regexdash" : false,
"scripturl" : false,
"smarttabs" : false,
"shadow" : false,
"sub" : true,
"supernew" : true,
"validthis" : false
"asi": false,
"boss": false,
"debug": false,
"eqnull": true,
"es5": true,
"esnext": true,
"evil": false,
"expr": true,
"funcscope": false,
"globalstrict": false,
"iterator": false,
"lastsemic": false,
"laxbreak": false,
"laxcomma": false,
"loopfunc": false,
"multistr": false,
"onecase": false,
"proto": false,
"regexdash": false,
"scripturl": false,
"smarttabs": false,
"shadow": false,
"sub": true,
"supernew": true,
"validthis": false
}
61 changes: 61 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/*global module:false*/
module.exports = function (grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),

jshint: {
file: "./index.js",
options: {
jshintrc: '.jshintrc'
}
},

lint: {
files: [
'array.js'
]
},

it: {
all: {
src: 'test/**/*.test.js',
options: {
timeout: 3000, // not fully supported yet
reporter: 'dotmatrix'
}
}
},
min: {
dist: {
src: ['<banner:meta.banner>', 'index.js'],
dest: '<%= pkg.name %>.min.js'
}
},
watch: {
files: '<config:lint.files>',
tasks: 'lint it'
},
uglify: {
options: {
banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
'<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' +
'* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author %>;' +
' Licensed <%= pkg.license %> */\n'
},
min: {
files: {
'<%= pkg.name %>.min.js': ['index.js']
}
}
}
});

// Default task.
grunt.registerTask('default', ['jshint', 'it', 'uglify:min']);
grunt.loadNpmTasks('grunt-it');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');

};
4 changes: 2 additions & 2 deletions array-extended.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

56 changes: 0 additions & 56 deletions grunt.js

This file was deleted.

Loading

0 comments on commit 12575cd

Please sign in to comment.