-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathGruntfile.js
54 lines (49 loc) · 1.34 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
// ================================================
// node-bitlyapi
// Grunt build file for local development. Including this in the repo
// in case people really want to build themselves a node module from
// the CoffeeScript provided.
// ================================================
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
banner: "// ================================================\n" +
"// <%= pkg.name %> - version <%= pkg.version %> \n" +
"// <%= pkg.description %>\n" +
"// <%= pkg.author.name %> (<%= pkg.author.email %>)\n" +
"// <%= pkg.repository.url %>\n" +
"// ================================================\n",
coffee: {
twitterbot: {
options: {
join: true
},
files: {
"lib/twitterbot.js": "src/*.coffee",
}
},
},
usebanner: {
twitterbot: {
options: {
position: 'top',
banner: "<%= banner %>",
linebreak: true
},
files: {
src: ['lib/twitterbot.js']
}
}
},
watch: {
twitterbot: {
files: "src/*.coffee",
tasks: ["coffee:twitterbot", "usebanner:twitterbot"],
},
}
});
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-coffee');
grunt.loadNpmTasks('grunt-banner');
grunt.registerTask("default", ["coffee", "usebanner", "watch"]);
};