-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGruntfile.js
167 lines (164 loc) · 9.21 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
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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jasmine : {
src : 'Melchior/JS/**/*.js',
options : {
specs: 'spec/**/*-spec.js',
helpers: 'spec/**/*-helper.js'
}
},
shell : {
build : {
command : "melchior example/assets/hs/index.js && find Melchior -name '*.hs' | uhc -tjs"
},
buildTests : {
command : "find . -name 'spec/hs/*hs' -exec melchior {} \;"
},
copyDistToSpec : {
command : "cp dist/melchior.js spec/hs/melchior-helper.js"
},
copyDistToExample : {
command : "cp dist/melchior.js example/assets/"
},
copyDistToComparison : {
command : "cp dist/melchior.js comparison/fauxter/resources/melchior/"
},
compile : {
command : "find . -name '*hs' -exec melchior {} \;"
}
},
uglify : {
my_targets: {
files : { 'dist/melchior.min.js' : ['dist/melchior.js'] }
}
},
jshint : {
all: ["Melchior/JS/**/*.js"],
options : {
asi : true,
expr: true,
newcap : false
}
},
watch : {
scripts : {
files: ['Melchior/JS/**/*.js'],
tasks: ['jshint', 'jasmine', 'shell:build']
},
},
concat: {
build : {
options: {
separator:';'
},
src: [
"/usr/local/lib//uhc-1.1.3/lib/js/libEH-RTS.mjs",
"/usr/local/lib//uhc-1.1.3/lib/pkg/uhcbase-1.1.3/uhc-1.1.3/js/plain/UHC/UHC_Base.mjs",
"/usr/local/lib//uhc-1.1.3/lib/pkg/uhcbase-1.1.3/uhc-1.1.3/js/plain/UHC/UHC_BoxArray.mjs",
"/usr/local/lib//uhc-1.1.3/lib/pkg/uhcbase-1.1.3/uhc-1.1.3/js/plain/UHC/UHC_Char.mjs",
"/usr/local/lib//uhc-1.1.3/lib/pkg/uhcbase-1.1.3/uhc-1.1.3/js/plain/UHC/UHC_Enum.mjs",
"/usr/local/lib//uhc-1.1.3/lib/pkg/uhcbase-1.1.3/uhc-1.1.3/js/plain/UHC/UHC_Float.mjs",
"/usr/local/lib//uhc-1.1.3/lib/pkg/uhcbase-1.1.3/uhc-1.1.3/js/plain/UHC/UHC_MutVar.mjs",
"/usr/local/lib//uhc-1.1.3/lib/pkg/uhcbase-1.1.3/uhc-1.1.3/js/plain/UHC/UHC_Read.mjs",
"/usr/local/lib//uhc-1.1.3/lib/pkg/uhcbase-1.1.3/uhc-1.1.3/js/plain/UHC/UHC_Real.mjs",
"/usr/local/lib//uhc-1.1.3/lib/pkg/uhcbase-1.1.3/uhc-1.1.3/js/plain/UHC/UHC_ST.mjs",
"/usr/local/lib//uhc-1.1.3/lib/pkg/uhcbase-1.1.3/uhc-1.1.3/js/plain/UHC/UHC_STRef.mjs",
"/usr/local/lib//uhc-1.1.3/lib/pkg/uhcbase-1.1.3/uhc-1.1.3/js/plain/UHC/UHC_Show.mjs",
"/usr/local/lib//uhc-1.1.3/lib/pkg/uhcbase-1.1.3/uhc-1.1.3/js/plain/UHC/UHC_StackTrace.mjs",
"/usr/local/lib//uhc-1.1.3/lib/pkg/uhcbase-1.1.3/uhc-1.1.3/js/plain/UHC/UHC_Types.mjs",
"/usr/local/lib//uhc-1.1.3/lib/pkg/uhcbase-1.1.3/uhc-1.1.3/js/plain/UHC/UHC_Ptr.mjs",
"/usr/local/lib//uhc-1.1.3/lib/pkg/uhcbase-1.1.3/uhc-1.1.3/js/plain/UHC/UHC_ByteArray.mjs",
"/usr/local/lib//uhc-1.1.3/lib/pkg/uhcbase-1.1.3/uhc-1.1.3/js/plain/UHC/UHC_IOBase.mjs",
"/usr/local/lib//uhc-1.1.3/lib/pkg/uhcbase-1.1.3/uhc-1.1.3/js/plain/UHC/UHC_OldException.mjs",
"/usr/local/lib//uhc-1.1.3/lib/pkg/uhcbase-1.1.3/uhc-1.1.3/js/plain/UHC/UHC_OldIO.mjs",
"/usr/local/lib//uhc-1.1.3/lib/pkg/uhcbase-1.1.3/uhc-1.1.3/js/plain/UHC/UHC_Run.mjs",
"/usr/local/lib//uhc-1.1.3/lib/pkg/uhcbase-1.1.3/uhc-1.1.3/js/plain/UHC/Generics/UHC_Generics_Tuple.mjs",
"/usr/local/lib//uhc-1.1.3/lib/pkg/uhcbase-1.1.3/uhc-1.1.3/js/plain/UHC/UHC_Generics.mjs",
"/usr/local/lib//uhc-1.1.3/lib/pkg/uhcbase-1.1.3/uhc-1.1.3/js/plain/UHC/UHC_Bounded.mjs",
"/usr/local/lib//uhc-1.1.3/lib/pkg/uhcbase-1.1.3/uhc-1.1.3/js/plain/UHC/UHC_Eq.mjs",
"/usr/local/lib//uhc-1.1.3/lib/pkg/uhcbase-1.1.3/uhc-1.1.3/js/plain/UHC/UHC_Ord.mjs",
"/usr/local/lib//uhc-1.1.3/lib/pkg/uhcbase-1.1.3/uhc-1.1.3/js/plain/UHC/UHC_Ix.mjs",
"/usr/local/lib//uhc-1.1.3/lib/pkg/uhcbase-1.1.3/uhc-1.1.3/js/plain/UHC/UHC_Array.mjs",
"/usr/local/lib//uhc-1.1.3/lib/pkg/uhcbase-1.1.3/uhc-1.1.3/js/plain/Data/Data_Maybe.mjs",
"/usr/local/lib//uhc-1.1.3/lib/pkg/uhcbase-1.1.3/uhc-1.1.3/js/plain/Data/Data_Char.mjs",
"/usr/local/lib//uhc-1.1.3/lib/pkg/uhcbase-1.1.3/uhc-1.1.3/js/plain/Data/Data_List.mjs",
"/usr/local/lib//uhc-1.1.3/lib/pkg/uhcbase-1.1.3/uhc-1.1.3/js/plain/Control/Control_Monad.mjs",
"/usr/local/lib//uhc-1.1.3/lib/pkg/base-3.0.0.0/uhc-1.1.3/js/plain/Prelude.mjs",
"/usr/local/lib//uhc-1.1.3/lib/pkg/base-3.0.0.0/uhc-1.1.3/js/plain/Control/Control_Category.mjs",
"/usr/local/lib//uhc-1.1.3/lib/pkg/base-3.0.0.0/uhc-1.1.3/js/plain/Control/Monad/Control_Monad_Instances.mjs",
"/usr/local/lib//uhc-1.1.3/lib/pkg/base-3.0.0.0/uhc-1.1.3/js/plain/Data/Data_Function.mjs",
"/usr/local/lib//uhc-1.1.3/lib/pkg/base-3.0.0.0/uhc-1.1.3/js/plain/Control/Monad/Control_Monad_Fix.mjs",
"/usr/local/lib//uhc-1.1.3/lib/pkg/base-3.0.0.0/uhc-1.1.3/js/plain/Control/Control_Arrow.mjs",
"/usr/local/lib//uhc-1.1.3/lib/pkg/base-3.0.0.0/uhc-1.1.3/js/plain/Data/Data_Monoid.mjs",
"/usr/local/lib//uhc-1.1.3/lib/pkg/base-3.0.0.0/uhc-1.1.3/js/plain/Control/Control_Applicative.mjs",
"Language/UHC/JScript/Language_UHC_JScript_Types.mjs",
"Language/UHC/JScript/ECMA/Language_UHC_JScript_ECMA_String.mjs",
"Language/UHC/JScript/Language_UHC_JScript_Primitives.mjs",
"Language/UHC/JScript/ECMA/Language_UHC_JScript_ECMA_Array.mjs",
"Melchior/JS/utils.js",
"Melchior/JS/Selectors.js",
"Melchior/JS/Signals.js",
"Melchior/JS/List.js",
"Melchior/JS/Test.js",
"Melchior/JS/Canvas.js",
"Melchior/JS/Crypto.js",
"Melchior/JS/Query.js",
"Melchior/JS/Function.js",
"Melchior/JS/Html.js",
"Melchior/JS/Socket.js",
"Melchior/JS/Dom.js",
"Melchior/JS/Events.js",
"Melchior/JS/Time.js",
"Melchior/JS/Tuple.js",
"Melchior/JS/XHR.js",
"Melchior/Data/Melchior_Data_String.mjs",
"Melchior/Dom/Melchior_Dom_Html.mjs",
"Melchior/Dom/Melchior_Dom_Events.mjs",
"Melchior/Dom/Melchior_Dom_Drawing.mjs",
"Melchior/Melchior_Dom.mjs",
"Melchior/Melchior_Control.mjs",
"Melchior/Melchior_Crypto.mjs",
"Melchior/Melchior_Sink.mjs",
"Melchior/Melchior_Time.mjs",
"Melchior/Data/Melchior_Data_List.mjs",
"Melchior/Dom/Melchior_Dom_Selectors.mjs",
"Melchior/Dom/Internal/Melchior_Dom_Internal_Fragments.mjs",
"Melchior/EventSources/Melchior_EventSources_Keyboard.mjs",
"Melchior/EventSources/Melchior_EventSources_Mouse.mjs",
"Melchior/EventSources/Melchior_EventSources_Elements.mjs",
"Melchior/Remote/Internal/Melchior_Remote_Internal_ParserUtils.mjs",
"Melchior/Remote/Internal/Melchior_Remote_Internal_Parser.mjs",
"Melchior/Remote/Melchior_Remote_Json.mjs",
"Melchior/Remote/Melchior_Remote_XHR.mjs"
],
dest: 'dist/melchior.js'
}
}
});
grunt.loadNpmTasks("grunt-contrib-concat");
grunt.loadNpmTasks("grunt-contrib-jasmine");
grunt.loadNpmTasks("grunt-contrib-jshint");
grunt.loadNpmTasks("grunt-contrib-watch");
grunt.loadNpmTasks("grunt-contrib-uglify");
grunt.loadNpmTasks("grunt-shell");
grunt.registerTask('default',
['jshint',
'shell:build',
'shell:buildTests',
'concat',
'uglify',
'jasmine',
]);
grunt.registerTask('travis', ['jshint', 'jasmine']);
grunt.registerTask('compile', ['shell:compile']);
grunt.registerTask('example',
['jshint',
'shell:build',
'shell:buildTests',
'concat',
'shell:copyDistToSpec',
'shell:copyDistToExample',
'shell:copyDistToComparison',
'jasmine']);
}