buildSDK/cssminify.js
authorAlan Knowles <alan@roojs.com>
Thu, 4 Mar 2021 08:48:12 +0000 (16:48 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 4 Mar 2021 08:48:12 +0000 (16:48 +0800)
buildSDK/cssminify.js

index 3c388e6..ef62a84 100644 (file)
@@ -13,7 +13,6 @@
 
 
 
-File = imports.File.File;
 GLib = imports.gi.GLib;  
 // let's see if this works..
 // should be run from top level..
@@ -33,8 +32,11 @@ args.forEach(function(l) {
     //out += pack(File.read(pa+'/css/' + l)).replace(/\}/g, "}\n")+"\n";
     out += pack(GLib.file_get_contents(path)['contents']) + "\n";
 });
+var f = Gio.file_new_for_path(String(outname));
+var data_out = new Gio.DataOutputStream({base_stream:f.replace(null, false, Gio.FileCreateFlags.NONE, null)});
+data_out.put_string(out, null);
+data_out.close(null);
 
-File.write(outname, out); 
     
      
 print("written " + outname);