forked from perliedman/leaflet-routing-machine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
53 lines (52 loc) · 1.15 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
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
browserify: {
control: {
src: ['src/L.Routing.Control.js'],
dest: 'dist/leaflet-routing-machine.js',
options: {
browserifyOptions: {
transform: 'browserify-shim',
standalone: 'L.Routing'
}
}
}
},
uglify: {
options: {
banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %> */\n\n'
},
build: {
src: 'dist/leaflet-routing-machine.js',
dest: 'dist/leaflet-routing-machine.min.js'
}
},
release: {
email: '[email protected]',
name: 'Per Liedman',
tasks: ['default', 'changelog']
},
copy: {
vendor: {
cwd: 'css',
src: ['**'],
dest: 'dist/',
expand: true
}
},
'gh-pages': {
options: {
add: true
},
src: ['dist/**']
}
});
grunt.loadNpmTasks('grunt-browserify');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-semantic-release');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-gh-pages');
grunt.registerTask('default', ['browserify', 'uglify', 'copy']);
};