UNPKG

2.17 kBJavaScriptView Raw
1module.exports = function(grunt) {
2 grunt.initConfig({
3 watch: {
4 all: {
5 files: ['lib/**/*', 'spec/**/*'],
6 tasks: ['coffeelint', 'spec:unit']
7 }
8 },
9 spec: {
10 options: {
11 minijasminenode: {
12 showColors: true
13 }
14 },
15 unit: {
16 options: {
17 specs: 'spec/unit/**/*.{js,coffee}'
18 }
19 },
20 integration: {
21 options: {
22 specs: 'spec/integration/**/*.{js,coffee}'
23 }
24 }
25 },
26 coffeelint: {
27 options: {
28 max_line_length: {
29 level: 'ignore'
30 }
31 },
32 lib: {
33 files: {
34 src: ['lib/**/*.coffee']
35 }
36 },
37 spec: {
38 files: {
39 src: ['spec/**/*.coffee']
40 }
41 }
42 },
43 shrinkwrap: {
44 dev: true, // whether the shrinkwrap dev dependencies. Defaults to false.
45 dedupe: false, // whether to run dedupe before shrinkwrapping. Defaults to false.
46 prune: false // whether to run prune before deduping. Defaults to false.
47 },
48 eslint: {
49 lib: ['lib/**/*.coffee']
50 },
51 bump: {
52 options: {
53 files: ['package.json'],
54 updateConfigs: [],
55 commit: true,
56 commitMessage: 'Release v%VERSION%',
57 commitFiles: ['package.json', 'npm-shrinkwrap.json'], // ['-a'] for all files
58 createTag: true,
59 tagName: 'v%VERSION%',
60 tagMessage: 'Version %VERSION%',
61 push: false,
62 // pushTo: 'origin',
63 gitDescribeOptions: '--tags --always --abbrev=1 --dirty=-d'
64 }
65 }
66 });
67
68 grunt.loadNpmTasks('grunt-coffeelint');
69 grunt.loadNpmTasks('grunt-contrib-watch');
70 grunt.loadNpmTasks('grunt-jasmine-bundle');
71 grunt.loadNpmTasks('grunt-shrinkwrap');
72 grunt.loadNpmTasks("gruntify-eslint");
73 grunt.loadNpmTasks('grunt-bump');
74
75 grunt.registerTask('default', ['coffeelint', 'eslint', 'spec:unit'] );
76 grunt.registerTask('integration', ['coffeelint', 'eslint', 'spec:integration']);
77 grunt.registerTask('travis-ci', ['coffeelint', 'eslint', 'spec:unit'] );
78 grunt.registerTask('release', ['bump:patch:bump-only', 'shrinkwrap', 'bump::commit-only'] );
79};