From 23818cb42846aa5afe83f8ba3902d320959200cc Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Wed, 5 Jul 2017 23:09:47 +0100 Subject: [PATCH] Fixed import --- ReactNativeClient/lib/fs-driver-dummy.js | 1 + ReactNativeClient/lib/logger.js | 2 +- ReactNativeClient/lib/models/resource.js | 7 ------- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/ReactNativeClient/lib/fs-driver-dummy.js b/ReactNativeClient/lib/fs-driver-dummy.js index 9bc341316..a916c29c0 100644 --- a/ReactNativeClient/lib/fs-driver-dummy.js +++ b/ReactNativeClient/lib/fs-driver-dummy.js @@ -1,5 +1,6 @@ class FsDriverDummy { + constructor() {} appendFileSync(path, string) {} writeBinaryFile(path, content) {} readFile(path) {} diff --git a/ReactNativeClient/lib/logger.js b/ReactNativeClient/lib/logger.js index de3aaaf4e..68e4e33d3 100644 --- a/ReactNativeClient/lib/logger.js +++ b/ReactNativeClient/lib/logger.js @@ -1,6 +1,6 @@ import moment from 'moment'; import { _ } from 'lib/locale.js'; -import FsDriverDummy from 'lib/fs-driver-dummy.js'; +import { FsDriverDummy } from 'lib/fs-driver-dummy.js'; class Logger { diff --git a/ReactNativeClient/lib/models/resource.js b/ReactNativeClient/lib/models/resource.js index d6bb7c88d..940d52427 100644 --- a/ReactNativeClient/lib/models/resource.js +++ b/ReactNativeClient/lib/models/resource.js @@ -39,17 +39,10 @@ class Resource extends BaseItem { static content(resource) { return this.fsDriver().readFile(this.fullPath(resource)); - // // TODO: node-only, and should probably be done with streams - // const fs = require('fs-extra'); - // return fs.readFile(this.fullPath(resource)); } static setContent(resource, content) { return this.fsDriver().writeBinaryFile(this.fullPath(resource), content); - // // TODO: node-only, and should probably be done with streams - // const fs = require('fs-extra'); - // let buffer = new Buffer(content); - // return fs.writeFile(this.fullPath(resource), buffer); } }