|
| 1 | +/* |
| 2 | + * angular-data |
| 3 | + * http://github.com/jmdobry/angular-data |
| 4 | + * |
| 5 | + * Copyright (c) 2014 Jason Dobry <http://jmdobry.github.io/angular-data> |
| 6 | + * Licensed under the MIT license. <https://github.com/jmdobry/angular-data/blob/master/LICENSE> |
| 7 | + */ |
| 8 | +module.exports = function (grunt) { |
| 9 | + 'use strict'; |
| 10 | + |
| 11 | + require('load-grunt-tasks')(grunt); |
| 12 | + require('time-grunt')(grunt); |
| 13 | + |
| 14 | + // Project configuration. |
| 15 | + grunt.initConfig({ |
| 16 | + pkg: grunt.file.readJSON('package.json'), |
| 17 | + clean: { |
| 18 | + coverage: ['coverage/'], |
| 19 | + dist: ['dist/'], |
| 20 | + doc: ['doc/'] |
| 21 | + }, |
| 22 | + jshint: { |
| 23 | + all: ['Gruntfile.js', 'src/**/*.js', 'test/*.js'], |
| 24 | + jshintrc: '.jshintrc' |
| 25 | + }, |
| 26 | + uglify: { |
| 27 | + main: { |
| 28 | + options: { |
| 29 | + banner: '/**\n' + |
| 30 | + '* @author Jason Dobry <jason.dobry@gmail.com>\n' + |
| 31 | + '* @file angular-data.min.js\n' + |
| 32 | + '* @version <%= pkg.version %> - Homepage <http://jmdobry.github.io/angular-data/>\n' + |
| 33 | + '* @copyright (c) 2014 Jason Dobry <http://jmdobry.github.io/angular-data>\n' + |
| 34 | + '* @license MIT <https://github.com/jmdobry/angular-data/blob/master/LICENSE>\n' + |
| 35 | + '*\n' + |
| 36 | + '* @overview In-browser data store for Angular.js.\n' + |
| 37 | + '*/\n' |
| 38 | + }, |
| 39 | + files: { |
| 40 | + 'dist/angular-data.min.js': ['dist/angular-data.js'] |
| 41 | + } |
| 42 | + } |
| 43 | + }, |
| 44 | + browserify: { |
| 45 | + dist: { |
| 46 | + files: { |
| 47 | + 'dist/angular-data.js': ['src/index.js'] |
| 48 | + } |
| 49 | + } |
| 50 | +// }, |
| 51 | +// karma: { |
| 52 | +// options: { |
| 53 | +// configFile: './karma.conf.js' |
| 54 | +// }, |
| 55 | +// dev: { |
| 56 | +// browsers: ['Chrome'], |
| 57 | +// autoWatch: true, |
| 58 | +// singleRun: false |
| 59 | +// }, |
| 60 | +// }, |
| 61 | +// coveralls: { |
| 62 | +// options: { |
| 63 | +// coverage_dir: 'coverage' |
| 64 | +// } |
| 65 | + }, |
| 66 | + docular: { |
| 67 | + groups: [ |
| 68 | + { |
| 69 | + groupTitle: 'API', |
| 70 | + groupId: 'api', |
| 71 | + groupIcon: 'icon-wrench', |
| 72 | + showSource: true, |
| 73 | + sections: [ |
| 74 | + { |
| 75 | + id: 'api', |
| 76 | + title: 'angular-data', |
| 77 | + scripts: [ |
| 78 | + 'src/' |
| 79 | + ] |
| 80 | + } |
| 81 | + ] |
| 82 | + } |
| 83 | + ], |
| 84 | + docular_webapp_target: 'doc', |
| 85 | + showDocularDocs: false, |
| 86 | + showAngularDocs: false |
| 87 | + } |
| 88 | + }); |
| 89 | + |
| 90 | + grunt.registerTask('doc', ['clean:doc', 'docular']); |
| 91 | + grunt.registerTask('build', ['clean:dist', 'jshint', 'browserify', 'uglify', 'doc']); |
| 92 | + grunt.registerTask('default', ['build']); |
| 93 | + |
| 94 | + // Used by the CLI build servers |
| 95 | + grunt.registerTask('test-cli', ['karma:1.0.4', 'karma:1.0.5', 'karma:1.0.6', 'karma:1.0.7', 'karma:1.0.8', 'karma:1.1.4', 'karma:1.1.5']); |
| 96 | + grunt.registerTask('cli', ['clean', 'jshint', 'copy', 'uglify', 'test-cli', 'coveralls']); |
| 97 | +}; |
0 commit comments