-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathGruntfile.js
49 lines (40 loc) · 1.18 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
module.exports = function(grunt) {
'use strict';
// Loads all grunt tasks from package.json
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
// Minify JS - https://github.com/gruntjs/grunt-contrib-uglify
uglify: {
options: {
banner: '/*! <%= pkg.name %>.min.js, v<%= pkg.version %>, minified <%= grunt.template.today("yyyy-mm-dd") %> */'
},
min: {
files: {
'jq-signature.min.js': ['jq-signature.js']
}
}
},
// Run jshint against JavaScript files - https://github.com/gruntjs/grunt-contrib-jshint
jshint: {
//jshintrc: '.jshintrc',
files: ['Gruntfile.js', 'jq-signature.js']
},
// Run a local web server - https://github.com/gruntjs/grunt-contrib-connect
connect: {
server: {
options: {
port: 8000,
keepalive: true,
base: './',
hostname: '*',
open: {
target: 'http://localhost:8000'
}
}
}
}
});
grunt.registerTask('build', ['jshint', 'uglify']);
grunt.registerTask('serve', ['connect']);
};