forked from vodkabears/Remodal
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
25d556e
commit 0232c42
Showing
6 changed files
with
805 additions
and
783 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,131 +1,131 @@ | ||
module.exports = function(grunt) { | ||
|
||
// Project configuration. | ||
grunt.initConfig({ | ||
// Import package manifest | ||
pkg: grunt.file.readJSON("remodal.jquery.json"), | ||
// Project configuration. | ||
grunt.initConfig({ | ||
|
||
// 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.licenses[0].type %> License\n" + | ||
" */\n" | ||
}, | ||
// Import package manifest | ||
pkg: grunt.file.readJSON('remodal.jquery.json'), | ||
|
||
connect: { | ||
server: { | ||
options: { | ||
port: 7770 | ||
} | ||
} | ||
}, | ||
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.licenses[0].type %> License\n' + | ||
' */\n' | ||
}, | ||
|
||
jshint: { | ||
gruntfile: { | ||
src: "Gruntfile.js" | ||
}, | ||
src: { | ||
src: "src/**/*.js" | ||
}, | ||
test: { | ||
src: "test/**/*.js" | ||
}, | ||
options: { | ||
jshintrc: ".jshintrc" | ||
} | ||
}, | ||
connect: { | ||
server: { | ||
options: { | ||
port: 7770 | ||
} | ||
} | ||
}, | ||
|
||
jscs: { | ||
gruntfile: { | ||
src: "Gruntfile.js" | ||
}, | ||
src: { | ||
src: "src/**/*.js" | ||
}, | ||
test: { | ||
src: "test/**/*.js" | ||
}, | ||
options: { | ||
preset: "jquery", | ||
requireSpacesInsideArrayBrackets: null | ||
} | ||
}, | ||
jshint: { | ||
gruntfile: { | ||
src: 'Gruntfile.js' | ||
}, | ||
src: { | ||
src: 'src/**/*.js' | ||
}, | ||
test: { | ||
src: 'test/**/*.js' | ||
}, | ||
options: { | ||
jshintrc: '.jshintrc' | ||
} | ||
}, | ||
|
||
csscomb: { | ||
all: { | ||
files: { | ||
"src/jquery.remodal.css": "src/jquery.remodal.css" | ||
} | ||
} | ||
}, | ||
jscs: { | ||
gruntfile: { | ||
src: 'Gruntfile.js' | ||
}, | ||
src: { | ||
src: 'src/**/*.js' | ||
}, | ||
test: { | ||
src: 'test/**/*.js' | ||
}, | ||
options: { | ||
preset: 'airbnb', | ||
safeContextKeyword: null | ||
} | ||
}, | ||
|
||
qunit: { | ||
all: { | ||
options: { | ||
urls: [ | ||
"jquery/dist/jquery.js", | ||
"jquery2/dist/jquery.js", | ||
"zepto/zepto.js" | ||
].map(function(library) { | ||
return "http://localhost:" + | ||
"<%= connect.server.options.port %>" + | ||
"/test/remodal.html?lib=" + library; | ||
}) | ||
} | ||
} | ||
}, | ||
csscomb: { | ||
all: { | ||
files: { | ||
'src/jquery.remodal.css': 'src/jquery.remodal.css' | ||
} | ||
} | ||
}, | ||
|
||
concat: { | ||
dist: { | ||
files: { | ||
"dist/jquery.remodal.js": "src/jquery.remodal.js", | ||
"dist/jquery.remodal.css": "src/jquery.remodal.css" | ||
}, | ||
options: { | ||
banner: "<%= meta.banner %>" | ||
} | ||
} | ||
}, | ||
qunit: { | ||
all: { | ||
options: { | ||
urls: [ | ||
'jquery/dist/jquery.js', | ||
'jquery2/dist/jquery.js', | ||
'zepto/zepto.js' | ||
].map(function(library) { | ||
return 'http://localhost:' + | ||
'<%= connect.server.options.port %>' + | ||
'/test/remodal.html?lib=' + library; | ||
}) | ||
} | ||
} | ||
}, | ||
|
||
uglify: { | ||
remodal: { | ||
files: { | ||
"dist/jquery.remodal.min.js": "src/jquery.remodal.js" | ||
} | ||
}, | ||
options: { | ||
banner: "<%= meta.banner %>" | ||
} | ||
concat: { | ||
dist: { | ||
files: { | ||
'dist/jquery.remodal.js': 'src/jquery.remodal.js', | ||
'dist/jquery.remodal.css': 'src/jquery.remodal.css' | ||
}, | ||
options: { | ||
banner: '<%= meta.banner %>' | ||
} | ||
} | ||
}, | ||
|
||
githooks: { | ||
all: { | ||
"pre-commit": "lint" | ||
}, | ||
options: { | ||
command: "node_modules/.bin/grunt" | ||
} | ||
uglify: { | ||
remodal: { | ||
files: { | ||
'dist/jquery.remodal.min.js': 'src/jquery.remodal.js' | ||
} | ||
}); | ||
}, | ||
options: { | ||
banner: '<%= meta.banner %>' | ||
} | ||
}, | ||
|
||
githooks: { | ||
all: { | ||
'pre-commit': 'lint' | ||
}, | ||
options: { | ||
command: 'node_modules/.bin/grunt' | ||
} | ||
} | ||
}); | ||
|
||
grunt.loadNpmTasks("grunt-contrib-concat"); | ||
grunt.loadNpmTasks("grunt-contrib-connect"); | ||
grunt.loadNpmTasks("grunt-contrib-jshint"); | ||
grunt.loadNpmTasks("grunt-contrib-qunit"); | ||
grunt.loadNpmTasks("grunt-contrib-uglify"); | ||
grunt.loadNpmTasks("grunt-csscomb"); | ||
grunt.loadNpmTasks("grunt-githooks"); | ||
grunt.loadNpmTasks("grunt-jscs"); | ||
grunt.loadNpmTasks('grunt-contrib-concat'); | ||
grunt.loadNpmTasks('grunt-contrib-connect'); | ||
grunt.loadNpmTasks('grunt-contrib-jshint'); | ||
grunt.loadNpmTasks('grunt-contrib-qunit'); | ||
grunt.loadNpmTasks('grunt-contrib-uglify'); | ||
grunt.loadNpmTasks('grunt-csscomb'); | ||
grunt.loadNpmTasks('grunt-githooks'); | ||
grunt.loadNpmTasks('grunt-jscs'); | ||
|
||
// Tasks. | ||
grunt.registerTask("lint", [ "jshint", "jscs" ]); | ||
grunt.registerTask("test", [ "connect", "lint", "qunit" ]); | ||
grunt.registerTask("default", [ | ||
"connect", "csscomb", "jshint", "jscs", "qunit", "concat", "uglify", "githooks" | ||
]); | ||
// Tasks. | ||
grunt.registerTask('lint', ['jshint', 'jscs']); | ||
grunt.registerTask('test', ['connect', 'lint', 'qunit']); | ||
grunt.registerTask('default', [ | ||
'connect', 'csscomb', 'jshint', 'jscs', 'qunit', 'concat', 'uglify', 'githooks' | ||
]); | ||
}; |
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.