This repository has been archived by the owner on Sep 11, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Gruntfile.js
105 lines (92 loc) · 2.17 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
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
/*
* grunt-qx-build
* https://github.com/drawstack/grunt-qx-build
*
* Copyright (c) 2016 Rene Jochum
* Licensed under the MIT license.
*/
module.exports = function (grunt) {
var qxpath = 'qooxdoo';
if ('QOOXDOO_PATH' in process.env) {
qxpath = process.env.QOOXDOO_PATH;
}
// Project configuration.
grunt.initConfig({
jshint: {
all: [
'Gruntfile.js',
'tasks/*.js'
],
options: {
jshintrc: '.jshintrc'
}
},
// Configuration to be run
qx: {
options: {
appPath: 'demo/qxc.tweets',
appClass: 'qxc.tweets.Application',
appName: 'qxc.tweets',
appTitle: 'qxc.tweets Demo',
theme: 'qxc.tweets.theme.Theme',
locales: ['en', 'de'],
libraryHints: {
qooxdoo: qxpath + '/framework'
}
},
tweetsSource: {
options: {
target: 'source',
outDir: 'demo/qxc.tweets/build/source/',
copyResources: true
}
},
tweetsBuild: {
options: {
target: 'build',
outDir: 'demo/qxc.tweets/build/build/',
// Only available within the 'build' target.
minify: true
}
},
tweetsHybrid: {
options: {
target: 'hybrid',
outDir: 'demo/qxc.tweets/build/hybrid/'
}
}
},
watch: {
tweets: {
files: [
'demo/qxc.tweets/source/class/**/*.js'
],
tasks: ['qx:tweetsSource']
}
},
connect: {
server: {
options: {
livereload: false,
base: 'demo/qxc.tweets/build/source',
port: 8000
}
}
}
});
// Actually load this plugin's task(s).
grunt.loadTasks('tasks');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-watch');
// These plugins provide necessary tasks.
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.registerTask('lint', ['jshint']);
// Compile source, run server and watch it
grunt.registerTask('serve', [
'qx:tweetsSource',
'connect:server',
'watch'
]);
// lint by default
grunt.registerTask('default', ['lint']);
};