forked from web-scrobbler/web-scrobbler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
57 lines (51 loc) · 1.39 KB
/
Gruntfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
'use strict';
/* global module, require */
module.exports = function(grunt) {
var jsConnectorFiles = ['connectors/22tracks.js', 'connectors/archive.js', 'connectors/bandcamp.js', 'connectors/blinkboxmusic.js', 'connectors/ambientsleepingpill.js']; // intentionally does not contain all files yet
var jsCoreFiles = ['Gruntfile.js', 'popup.js', 'core/**/*.js', 'options/options.js', 'popups/*.js'];
var jsonFiles = ['*.json', '.jshintrc'];
var cssFiles = ['options/options.css', 'popups/base.css', 'dialogs/base.css'];
grunt.initConfig({
jshint: {
all: [jsCoreFiles, jsConnectorFiles],
options: {
jshintrc: true,
reporter: require('jshint-stylish')
}
},
compress: {
main: {
options: {
archive: 'web-scrobbler.zip',
pretty: true
},
expand: true,
src: ['*.*', 'connectors/**', 'options/**', 'vendor/**']
}
},
lintspaces: {
all: {
src: [
jsCoreFiles, jsConnectorFiles, cssFiles
],
options: {
editorconfig: '.editorconfig',
ignores: [
'js-comments'
]
}
}
},
jsonlint: {
sample: {
src: [ jsonFiles ]
}
}
});
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-compress');
grunt.loadNpmTasks('grunt-lintspaces');
grunt.loadNpmTasks('grunt-jsonlint');
grunt.registerTask('lint', ['jshint']);
grunt.registerTask('default', ['lint', 'lintspaces', 'jsonlint']);
};