This repository has been archived by the owner on Sep 18, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Gruntfile.js
71 lines (70 loc) · 3.03 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
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
standalone: {
options: {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> Copyright (c) 2014 <%= pkg.author %>, released under a BSD3 License.*/\n'
},
files: {
'dist/js/<%= pkg.name %>.min.js': [ 'src/js/<%= pkg.name %>.js' ]
}
},
packaged: {
options: {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> Copyright (c) 2014 <%= pkg.author %> under a BSD3 License. \n\nThis package contains Geocoder-JS, Copyright (c) 2013 Brandon Morrison under an MIT License:\n\nThe MIT License (MIT)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the "Software"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n*/\n'
},
files: {
'dist/js/<%= pkg.name %>-pack.min.js': [
'bower_components/geocoder-js/dist/geocoder.js',
'src/js/<%= pkg.name %>.js'
]
}
}
},
sass: {
dist: {
options: {
style: 'compressed'
},
files: {
'dist/css/jquery.findyourrep.min.css': 'src/css/jquery.findyourrep.css.scss'
}
},
editable: {
options: {
style: 'expanded'
},
files: {
'dist/css/jquery.findyourrep.css': 'src/css/jquery.findyourrep.css.scss'
}
}
},
connect: {
server: {
options: {
open: "http://localhost/example",
port: 80,
keepalive: true
}
}
},
watch: {
css: {
files: 'src/css/*.scss',
tasks: ['sass']
},
scripts: {
files: 'src/js/*.js',
tasks: ['uglify']
}
}
});
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('default', ['uglify', 'sass']);
grunt.registerTask('watch', ['watch']);
grunt.registerTask('demo', ['uglify', 'sass', 'connect']);
};