-
Notifications
You must be signed in to change notification settings - Fork 5
/
Gruntfile.js
64 lines (54 loc) · 1.42 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
58
59
60
61
62
63
64
/**
* jQuery classList extension
* Author & copyright: Michał Gołębiowski-Owczarek <[email protected]>
*
* Source: https://github.com/mgol/jquery.classList
* Released under the MIT license (see the LICENSE.txt file)
*/
'use strict';
module.exports = function (grunt) {
require('time-grunt')(grunt);
grunt.initConfig({
eslint: {
all: {
src: [
'*.mjs',
'*.js',
'src/*.js',
],
},
},
copy: {
all: {
files: {
'dist/jquery.class_list.js': 'src/jquery.class_list.js',
},
},
},
uglify: {
all: {
options: {
banner: '/*! jQuery classList extension; license: see LICENSE.txt */',
sourceMap: true,
},
files: {
'dist/jquery.class_list.min.js': 'dist/jquery.class_list.js',
},
},
},
});
// Load all grunt tasks matching the `grunt-*` pattern.
require('load-grunt-tasks')(grunt);
grunt.registerTask('lint', [
'eslint',
]);
grunt.registerTask('test', ['lint']);
grunt.registerTask('build', [
'copy',
'uglify',
]);
grunt.registerTask('default', [
'test',
'build',
]);
};