1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-12 22:57:38 +02:00

Refactored handling of multiple sync targets

This commit is contained in:
Laurent Cozic
2017-07-24 18:01:40 +00:00
parent 04cd9a1e7b
commit 0f95e97d19
18 changed files with 630 additions and 581 deletions

View File

@ -1,10 +1,16 @@
import fs from 'fs-extra';
import { shim } from 'lib/shim.js';
import { GeolocationNode } from 'lib/geolocation-node.js';
import { FileApiDriverLocal } from 'lib/file-api-driver-local.js';
function shimInit() {
shim.fs = fs;
shim.FileApiDriverLocal = FileApiDriverLocal;
shim.Geolocation = GeolocationNode;
shim.fetch = require('node-fetch');
shim.FormData = require('form-data');
shim.fetchBlob = async function(url, options) {
if (!options || !options.path) throw new Error('fetchBlob: target file path is missing');
if (!options.method) options.method = 'GET';