1
0
mirror of https://github.com/excalidraw/excalidraw.git synced 2025-02-18 13:29:36 +01:00

Update to browser-nativefs v0.1.0 (#523)

This commit is contained in:
Thomas Steiner 2020-01-23 17:15:44 +01:00 committed by Lipis
parent 926b4f24e6
commit d24b9c4d78
3 changed files with 5 additions and 13 deletions

6
package-lock.json generated

@ -2750,9 +2750,9 @@
"integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8="
},
"browser-nativefs": {
"version": "0.0.5",
"resolved": "https://registry.npmjs.org/browser-nativefs/-/browser-nativefs-0.0.5.tgz",
"integrity": "sha512-0yS+D32qmIgg7YAUpaSfLEMfG6Co5ajPhbCT7agHsF6PuF6p7VVFNT5x8yAEWLAfPJHyNW/1nxNL54JZLzn6jg=="
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/browser-nativefs/-/browser-nativefs-0.1.0.tgz",
"integrity": "sha512-TJKtd3wy1X41QS9RA3VfphSDOw2+PL4JENk4jezmBqvMWTn0XxcSXeQmbAVvO45r0RFQlyL+CZD21ibBH1avJA=="
},
"browser-process-hrtime": {
"version": "0.1.3",

@ -6,7 +6,7 @@
"not op_mini all"
],
"dependencies": {
"browser-nativefs": "0.0.5",
"browser-nativefs": "0.1.0",
"i18next": "19.0.3",
"i18next-browser-languagedetector": "4.0.1",
"i18next-xhr-backend": "3.2.2",

@ -6,7 +6,7 @@ import { AppState } from "../types";
import { ExportType } from "./types";
import { getExportCanvasPreview } from "./getExportCanvasPreview";
import nanoid from "nanoid";
import { fileOpenPromise, fileSavePromise } from "browser-nativefs";
import { fileOpen, fileSave } from "browser-nativefs";
import i18n from "../i18n";
@ -15,14 +15,6 @@ const LOCAL_STORAGE_KEY_STATE = "excalidraw-state";
const BACKEND_POST = "https://json.excalidraw.com/api/v1/post/";
const BACKEND_GET = "https://json.excalidraw.com/api/v1/";
let fileOpen: Function;
let fileSave: Function;
(async () => {
fileOpen = (await fileOpenPromise).default;
fileSave = (await fileSavePromise).default;
})();
// TODO: Defined globally, since file handles aren't yet serializable.
// Once `FileSystemFileHandle` can be serialized, make this
// part of `AppState`.