forked from calipho-sib/feature-viewer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
105 lines (98 loc) · 3.35 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
options: {
separator: ';'
},
basic: {
src: [
'bower_components/jquery/dist/jquery.js',
'bower_components/d3/d3.min.js',
'bower_components/bootstrap/js/tooltip.js',
'bower_components/bootstrap/js/popover.js',
'src/feature-viewer.js'
],
dest: 'dist/feature-viewer.bundle.js'
},
nextP: {
src: [
'dist/feature-viewer.bundle.js',
'bower_components/nextprot/src/nextprot-core.js',
'bower_components/nextprot/src/nextprot-utils.js',
'src/fv.nextprot.js'
],
dest: 'dist/feature-viewer.nextprot.js'
},
css: {
src: [
'bower_components/bootstrap/dist/css/bootstrap.min.css',
'css/style.css'
],
dest: 'dist/feature-viewer.min.css'
}
},
bump: {
options: {
files: ['package.json'],
updateConfigs: [],
commit: true,
commitMessage: 'Release v%VERSION%',
commitFiles: ['package.json'],
createTag: true,
tagName: 'v%VERSION%',
tagMessage: 'Version %VERSION%',
push: true,
pushTo: 'https://github.com/calipho-sib/feature-viewer.git',
gitDescribeOptions: '--tags --always --abbrev=1 --dirty=-d',
globalReplace: false,
prereleaseName: false,
regExp: false
}
},
uglify: {
options: {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n'
},
basic: {
src: 'src/feature-viewer.js',
dest: 'dist/feature-viewer.min.js'
},
nextprot: {
src: 'dist/feature-viewer.nextprot.js',
dest: 'dist/feature-viewer.nextprot.js'
},
bundle: {
src: 'dist/feature-viewer.bundle.js',
dest: 'dist/feature-viewer.bundle.js'
}
},
connect: {
server: {
options: {
port: 9000,
livereload: true,
base: '.'
}
}
},
watch: {
all: {
options: {livereload: true},
files: ['*.js']
}
}
});
// Load the plugin that provides the "uglify" task.
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-bump');
// Default task(s).
grunt.registerTask('default', ['uglify']);
grunt.registerTask('concating', ['concat']);
grunt.registerTask('prod', ['concat','uglify']);
grunt.registerTask('serve', ['connect:server','watch']);
};