-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.js
61 lines (45 loc) · 1.43 KB
/
build.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
var fs = require('fs');
var files =
[
'src/base.js',
'src/Utils.js',
'src/Application.js',
'src/DataSource.js',
'src/DownloadData.js',
'src/View.js',
'src/ViewController.js',
'src/NavigationController.js',
'src/Easing.js',
'src/Animation.js',
'src/CollectionView.js',
'src/components/Tints.js',
'src/components/Label.js',
'src/components/Button.js',
'src/components/TextField.js',
'src/components/Dropdown.js',
'src/components/Image.js',
'src/components/SegmentedButton.js',
'src/components/ToggleButton.js',
'src/components/ListView.js',
'src/components/Popover.js',
'src/components/DropdownSearch.js',
'src/components/TableView.js'
];
function print_error ( str ) {
"use strict";
console.log(str);
};
try {
var output = "";
for (var i = 0; i < files.length; i++) {
var contents = fs.readFileSync(files[i], 'utf8');
output = output + contents;
}
fs.writeFileSync('mentat.min.js',output);
} catch ( ex ) {
print_error("Parse error at " + ex.filename + ":" + ex.line + "," + ex.col);
print_error(ex.message);
print_error(ex.stack);
process.exit(1);
throw ex;
}