-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathGruntfile.js
66 lines (64 loc) · 1.68 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
65
66
/**
* This file is used to build Walkontable from `src/*`
*
* Installation:
* 1. Install Grunt CLI (`npm install -g grunt-cli`)
* 1. Install Grunt 0.4.0 and other dependencies (`npm install`)
*
* Build:
* Execute `grunt` from root directory of this directory (where Gruntfile.js is)
* To execute automatically after each change, execute `grunt --force default watch`
*
* Result:
* building Walkontable will create files:
* - dist/walkontable.js
*
* See http://gruntjs.com/getting-started for more information about Grunt
*/
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
options: {
banner: '/**\n' +
' * <%= pkg.name %> <%= pkg.version %>\n' +
' * \n' +
' * Date: <%= (new Date()).toString() %>\n' +
'*/\n\n'
},
full_js: {
src: [
'src/*.js',
'src/3rdparty/*.js'
],
dest: 'dist/walkontable.js'
}
},
jasmine: { //simply run tests by `grunt test`
src: [
'test/jasmine/lib/jquery.min.js',
'src/*.js',
'src/3rdparty/*.js',
'test/jasmine/SpecHelper.js'
],
options: {
specs: [
'test/jasmine/spec/*.js'
],
styles: [
'css/walkontable.css'
]
}
},
watch: {
files: ['src/*.js', 'src/3rdparty/*.js'],
tasks: ['concat']
}
});
// Default task.
grunt.registerTask('default', ['concat']);
grunt.registerTask('test', ['concat', 'jasmine']);
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-jasmine');
};