UNPKG

1.4 kBJavaScriptView Raw
1module.exports = function(grunt) {
2 'use strict';
3
4 grunt.initConfig({
5 pkg: grunt.file.readJSON('package.json'),
6
7 jshint: {
8 all: [
9 'ng-describe.js'
10 ],
11 specs: ['test/*-spec.js'],
12 options: {
13 jshintrc: '.jshintrc'
14 }
15 },
16
17 jsonlint: {
18 all: {
19 src: ['package.json']
20 }
21 },
22
23 sync: {
24 all: {
25 options: {
26 sync: ['author', 'name', 'version',
27 'private', 'license', 'keywords', 'homepage'],
28 }
29 }
30 },
31
32 toc: {
33 api: {
34 options: {
35 heading: '\n'
36 },
37 files: {
38 './docs/toc.md': './README.md'
39 }
40 }
41 },
42
43 readme: {
44 options: {
45 readme: './docs/README.tmpl.md',
46 docs: '.',
47 templates: './docs'
48 }
49 },
50
51 karma: {
52 unit: {
53 configFile: 'test/karma.conf.js'
54 }
55 },
56
57 watch: {
58 options: {
59 atBegin: true
60 },
61 all: {
62 files: ['*.js', 'test/*.js', 'package.json'],
63 tasks: ['jshint', 'test']
64 }
65 }
66 });
67
68 var plugins = require('matchdep').filterDev('grunt-*');
69 plugins.forEach(grunt.loadNpmTasks);
70
71 grunt.registerTask('test', ['karma']);
72 grunt.registerTask('doc', ['readme', 'toc', 'readme']);
73 grunt.registerTask('default',
74 ['nice-package', 'deps-ok', 'sync', 'jsonlint', 'jshint', 'test', 'doc']);
75};