mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Undid changes to suppress Errors, since grunt test did not like it that way either. (Bad style.)
This commit is contained in:
parent
eb4941417c
commit
932974d744
@ -9,10 +9,9 @@
|
||||
|
||||
ns.Environment = {
|
||||
detectNodeWebkit : function () {
|
||||
var isNode = (typeof window["process"] !== "undefined" && typeof window["require"] !== "undefined");
|
||||
var isNode = (typeof process !== "undefined" && typeof require !== "undefined");
|
||||
var isNodeWebkit = false;
|
||||
if (isNode) {
|
||||
var require = window["require"];
|
||||
try {
|
||||
isNodeWebkit = (typeof require('nw.gui') !== "undefined");
|
||||
} catch (e) {
|
||||
|
@ -59,7 +59,6 @@
|
||||
* @callback callback
|
||||
*/
|
||||
saveToFile : function(content, filename, callback) {
|
||||
var require = window["require"]; // suppress build error
|
||||
var fs = require('fs');
|
||||
fs.writeFile(filename, content, function(err){
|
||||
if (err) {
|
||||
@ -71,7 +70,6 @@
|
||||
},
|
||||
|
||||
readFile : function(filename, callback) {
|
||||
var require = window["require"]; // suppress build error
|
||||
var fs = require('fs');
|
||||
// NOTE: currently loading everything as utf8, which may not be desirable in future
|
||||
fs.readFile(filename, 'utf8', function(err, data){
|
||||
|
Loading…
Reference in New Issue
Block a user