forked from nervetattoo/bergenjs-grunt-presentation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
69 lines (58 loc) · 1.74 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
/*global module:false */
module.exports = function(grunt) {
grunt.registerTask("reload", "reload Chrome on OS X",
function() {
require("child_process").exec("osascript " +
"-e 'tell application \"Google Chrome\" " +
"to tell the active tab of its first window' " +
"-e 'reload' " +
"-e 'end tell'");
});
grunt.initConfig({
jshint: {
options: {
globals: {require:true}
},
gruntfile: {
src: 'Gruntfile.js'
}
},
watch: {
gruntfile: {
files: '<%= jshint.gruntfile.src %>',
tasks: ['jshint:gruntfile']
},
src: {
files: "src/gruntjs.md",
tasks: ['shower', 'reload']
}
},
connect: {
server: {
options: {
port: 9091,
base: "./"
}
}
},
shower: {
grunt: {
title: "Grunt.js",
src: "src/gruntjs.md",
styles: "src/styles.css"
}
},
curl: {
'scripts/script.js': 'http://shwr.me/shower/shower.min.js'
}
});
// These plugins provide necessary tasks.
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-shower-markdown');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-curl');
// Default task.
grunt.registerTask('present', ['curl', 'shower', 'connect', 'watch']);
grunt.registerTask('default', ['jshint']);
};