This repository has been archived by the owner on Jun 29, 2018. It is now read-only.
forked from cornerstonejs/cornerstoneTools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gruntfile.js
executable file
·107 lines (101 loc) · 3.77 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
106
107
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
clean: {
default: {
src: [
'dist'
]
}
},
copy: {
bower: {
src: [
'bower_components/jquery/dist/jquery.min.js',
'bower_components/jquery/dist/jquery.min.map',
'bower_components/cornerstone/dist/cornerstone.min.css',
'bower_components/cornerstone/dist/cornerstone.min.js',
'bower_components/cornerstoneMath/dist/cornerstoneMath.min.css',
'bower_components/cornerstoneMath/dist/cornerstoneMath.min.js',
'bower_components/hammerjs/hammer.min.js',
'bower_components/hammerjs/hammer.min.map',
'bower_components/hammerjs/plugins/hammer.fakemultitouch.js'
],
dest: 'examples',
expand: true,
flatten: true
}
},
concat: {
build: {
src : [
'src/inputSources/mouseWheelInput.js',
'src/inputSources/mouseInput.js',
'src/imageTools/simpleMouseButtonTool.js',
'src/imageTools/mouseButtonTool.js',
'src/imageTools/mouseButtonRectangleTool.js',
'src/imageTools/mouseWheelTool.js',
'src/imageTools/touchDragTool.js',
'src/imageTools/touchPinchTool.js',
'src/imageTools/touchTool.js',
'src/**/*.js'
],
dest: 'build/built.js',
options: {
process: function (src, filepath) {
return '// Begin Source: ' + filepath + '\n' + src + ' \n// End Source; ' + filepath + '\n';
}
}
},
dist: {
options: {
stripBanners: true,
banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %> ' +
'| (c) 2014 Chris Hafey | https://github.com/chafey/cornerstoneTools */\n'
},
src : ['build/built.js'],
dest: 'dist/cornerstoneTools.js'
}
},
uglify: {
dist: {
files: {
'dist/cornerstoneTools.min.js': ['dist/cornerstoneTools.js']
}
},
options: {
banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %> ' +
'| (c) 2014 Chris Hafey | https://github.com/chafey/cornerstoneTools */\n'
}
},
qunit: {
all: ['test/*.html']
},
jshint: {
files: [
'src/**/*.js'
]
},
watch: {
scripts: {
files: ['src/**/*.js', 'test/*.js'],
tasks: ['concat:build', 'concat:dist', 'uglify','jshint']
}
},
});
require('load-grunt-tasks')(grunt);
grunt.registerTask('buildAll', ['copy', 'concat:build', 'concat:dist', 'uglify', 'jshint']);
grunt.registerTask('default', ['clean', 'buildAll']);
};
// Release process:
// 1) Update version numbers
// 2) do a build (needed to update dist versions with correct build number)
// 3) commit changes
// git commit -am "Changes...."
// 4) tag the commit
// git tag -a 0.1.0 -m "Version 0.1.0"
// 5) push to github
// git push origin master --tags