roojs-ui.js
[roojs1] / buildSDK / css-minify-bootstrap.js
1
2 File = imports.File.File;
3 pack = imports.MinifyCSS.pack;
4 GLib = imports.gi.GLib;  
5 // let's see if this works..
6 // should be run from top level..
7 var pa = GLib.get_current_dir();
8 print(pa);
9
10 if (!pa.match(/roojs1$/)) {
11     print("this should be run from the top level directory")
12     Seed.quit();
13 }
14
15 var files = File.list(pa + '/css-bootstrap');
16
17 var out = '';
18 var debug_out = '';
19 files.forEach(function(f) {
20     if (f.match(/^roojs/)) {
21         return;
22     }
23     if (f.match(/^bootstrap/)) {
24         return;
25     }
26     if (f.match(/^font-awesome/)) {
27         return;
28     }
29     
30     debug_out += "@import url('./" + f + "');\n";
31     out += pack(File.read(pa + '/css-bootstrap/' +f ));
32     print(f);
33 });
34
35  
36 File.write(pa+'/css-bootstrap/roojs-bootstrap.css', out);
37 File.write(pa+'/css-bootstrap/roojs-bootstrap-debug.css', debug_out);
38