forked from apache/wicket
-
Notifications
You must be signed in to change notification settings - Fork 0
/
grunt.js
109 lines (101 loc) · 3.46 KB
/
grunt.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
106
107
108
109
/*
* Grunt.js is a tool for automated JavaScript development
* https://github.com/cowboy/grunt
*
* To use it:
* 1) install node.js - http://nodejs.org/#download. This will install 'npm' (Node Package Manager) too
* 2) install phantomjs - http://code.google.com/p/phantomjs/downloads/list
* 3) install grunt - 'npm -g install grunt'
* 4) run it: grunt lint, grunt lint:core, grunt qunit, grunt qunit:local
*/
/*global module: true */
module.exports = function(grunt) {
"use strict";
var
coreJs = [
'wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-event-jquery.js',
'wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery-debug.js',
'wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js',
"wicket-core/src/main/java/org/apache/wicket/markup/html/form/CheckSelector.js",
"wicket-core/src/main/java/org/apache/wicket/markup/html/form/upload/MultiFileUploadField.js",
"wicket-core/src/main/java/org/apache/wicket/ajax/form/AjaxFormChoiceComponentUpdatingBehavior.js"
],
extensionsJs = [
"wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/form/upload/progressbar.js",
"wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/palette/palette.js",
"wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/tree/res/tree.js",
"wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js",
"wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js",
"wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/filter/wicket-filterform.js"
],
datetimeJs = [
"wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/wicket-date.js"
],
nativeWebSocketJs = [
"wicket-experimental/wicket-native-websocket/wicket-native-websocket-core/src/main/java/org/apache/wicket/protocol/ws/api/res/js/wicket-websocket-jquery.js"
],
atmosphereJs = [
"wicket-experimental/wicket-atmosphere/src/main/java/org/apache/wicket/atmosphere/jquery.wicketatmosphere.js"
],
testsJs = [
"./wicket-core/src/test/js/ajax.js",
"./wicket-core/src/test/js/head.js",
"./wicket-core/src/test/js/form.js",
"./wicket-core/src/test/js/dom.js",
"./wicket-core/src/test/js/channels.js",
"./wicket-core/src/test/js/event.js",
"./wicket-core/src/test/js/amd.js"
],
gruntJs = [
"grunt.js"
];
// Project configuration.
grunt.initConfig({
lint: {
core: coreJs,
extensions: extensionsJs,
datetime: datetimeJs,
nativeWebSocket: nativeWebSocketJs,
atmosphere: atmosphereJs,
testsJs: testsJs,
grunt: gruntJs
},
jshint: {
options: {
"boss": true,
"browser": true,
"curly": true,
"eqnull": true,
"eqeqeq": true,
"expr": true,
"evil": true,
"jquery": true,
"latedef": true,
"noarg": true,
"onevar": false,
"smarttabs": true,
"trailing": true,
"undef": true,
"strict": true,
"predef": [
"Wicket"
]
}
},
qunit: {
/*
* Runs all tests (w/ ajax).
* See ajax.js header for details how to setup it.
*/
index: ['http://localhost/ajax-tests/test/js/all.html'],
/**
* Run Asynchronous module definition tests
*/
amd: ['http://localhost/ajax-tests/test/js/amd.html'],
/*
* Runs only local tests (w/o ajax ones).
*/
local: ['wicket-core/src/test/js/all.html']
}
});
};