buildSDK/css-minify-bootstrap.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 print(files);
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     debug_out += "\n/* -- " + f + " ---- */\n";
30     debug_out += File.read(pa + '/css-bootstrap/' +f );
31     out += pack(File.read(pa + '/css-bootstrap/' +f ));
32 });
33
34
35
36
37 File.write(pa+'/css-bootstrap/roojs-bootstrap.css', out);
38 File.write(pa+'/css-bootstrap/roojs-bootstrap-debug.css', out);
39