From 029e5c1ec39fd35c9edf74c680f7c742e12486f0 Mon Sep 17 00:00:00 2001 From: Carlo Zancanaro Date: Fri, 19 Sep 2014 12:19:31 +1000 Subject: Initial commit - minimal, synchronous, injector --- Gruntfile.js | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 Gruntfile.js (limited to 'Gruntfile.js') diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 0000000..c09bdde --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,61 @@ +module.exports = function (grunt) { + + grunt.initConfig({ + pkg: grunt.file.readJSON('package.json'), + library: grunt.file.readJSON('bower.json'), + uglify: { + options: { + banner: '/*! <%= pkg.name %> <%= pkg.version %> */' + }, + jid: { + files: { + '<%= library.name %>.min.js': ['<%= library.name %>.js'] + } + } + }, + jshint: { + options: { + src: [ + '<%= library.name %>' + ], + // options here to override JSHint defaults + globals: { + module: true + }, + globalstrict: false + } + }, + watch: { + options: { + livereload: true + }, + files: [ + 'Gruntfile.js', + 'injector.js', + 'injector-tests.js' + ], + tasks: ['default', 'karma:unit:run'] + }, + karma: { + options: { + configFile: "karma.conf.js" + }, + unit: { + background: true + }, + once: { + singleRun: true, + reporters: ['dots'] + } + } + }); + + grunt.loadNpmTasks('grunt-contrib-uglify'); + grunt.loadNpmTasks('grunt-contrib-jshint'); + grunt.loadNpmTasks('grunt-contrib-watch'); + grunt.loadNpmTasks('grunt-karma'); + + grunt.registerTask('default', ['jshint', 'uglify']); + grunt.registerTask('live', ['default', 'karma:unit:start', 'karma:unit:run', 'watch']); + +}; -- cgit v1.2.3