-
Notifications
You must be signed in to change notification settings - Fork 1
/
Gruntfile.coffee
141 lines (123 loc) · 3.82 KB
/
Gruntfile.coffee
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
module.exports = (grunt) ->
require("matchdep").filterDev("grunt-*").forEach grunt.loadNpmTasks
# load docular tasks
# this is a fork of docular so it does not start with 'grunt-'
grunt.loadNpmTasks('docular')
grunt.registerTask("build", ["clean", "coffee:dev", "uglify", "copy:example", "copy:build", "server", "watch:coffee"])
# PREVIEW SERVERS
grunt.registerTask "server", "preview server", ->
grunt.log.writeln "Express server listening on port 8000"
require("./lib/app-server.js").listen 8000
require("child_process").exec "open \"http://localhost:8000\""
grunt.task.run ["watch"]
# Print a timestamp (useful for when watching)
grunt.registerTask "timestamp", ->
grunt.log.subhead Date()
grunt.initConfig
pkg: grunt.file.readJSON("package.json")
banner: "/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - <%= grunt.template.today(\"yyyy-mm-dd\") %>\n" + "<%= pkg.homepage ? \" * \" + pkg.homepage + \"\\n\" : \"\" %>" + " * Copyright (c) <%= grunt.template.today(\"yyyy\") %> <%= pkg.author %>;\n" + " * Licensed <%= _.pluck(pkg.licenses, \"type\").join(\", \") %>\n */\n"
clean: ["build", "infowrap-filepicker.js", "infowrap-filepicker.min.js"]
copy:
example:
files: [
dest: "examples/js/"
src: ["infowrap-filepicker.js", "infowrap-filepicker.min.js"]
]
build:
files: [
dest: "build/"
src: ["infowrap-filepicker.js", "infowrap-filepicker.min.js"]
]
coffee:
dev:
options:
bare: true
expand: true
cwd: "."
src: ["infowrap-filepicker.coffee"]
dest: "."
ext: ".js"
karma:
options:
preprocessor:
'*.coffee': 'coffee'
singleRun: false
colors: true
growl: true
reporters: ['progress']
browsers: ['Chrome']
proxies:
'/': 'http://localhost:8000/'
captureTimeout: 10000
runnerPort: 9301
port: 9201
unit:
configFile: 'test/config/unit.js'
autoWatch: true
midway:
configFile: "test/config/midway.js"
autoWatch: true
e2e:
configFile: "test/config/e2e.js"
singleRun: true
uglify:
dist:
options:
banner: "<%= banner %>"
src: ["infowrap-filepicker.js"]
dest: "infowrap-filepicker.min.js"
watch:
coffee:
files: ["infowrap-filepicker.coffee"]
tasks: ["coffee:dev"]
changelog:
options:
dest: "CHANGELOG.md"
templateFile: "lib/changelog.tpl.md"
github:"https://github.com/infowrap/infowrap-filepicker"
docular:
showDocularDocs: false
showAngularDocs: false
githubUrl: 'https://github.com/infowrap/infowrap-filepicker'
docular_partial_home: 'docs/home.html'
discussions:
shortName: 'infowrapfilepicker'
url: 'http://dev.infowrap.com'
dev: true
analytics:
account: 'UA-42942836-1',
domainName: 'dev.infowrap.com'
groups: [
{
groupTitle: 'Develop'
groupId: 'develop'
groupIcon: 'icon-beer'
showSource: true
sections: [
{
id: "setup"
title: "Setup"
showSource: false
docs: [
"docs/lib/scripts/docs/setup"
]
rank: {
'configuration':1
'installgrunt':2
'installdocular':3
}
},
{
id: "api"
title: "API Reference"
showSource: false
docs: [
"docs/lib/scripts/docs/api"
]
scripts: [
"infowrap-filepicker.js"
]
}
]
}
]