Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Working with JSPM + ES6 #19

Open
timfish opened this issue Apr 12, 2016 · 1 comment
Open

Working with JSPM + ES6 #19

timfish opened this issue Apr 12, 2016 · 1 comment

Comments

@timfish
Copy link

timfish commented Apr 12, 2016

Many thanks for this library. Its just what I needed to get cross platform filesystem with promises working in Cordova/Electron(Chrome).

To get it working with using JSPM and ES6 I had to import like this:

import * as CordovaPromiseFS from 'cordova-promise-fs';

and to create an instance I had to:

let fs = CordovaPromiseFS.default({Promise: window.Promise});

I've yet to look into why that was required over the defaults but its working great now and I thought this might help others who are trying the same. Without defining the Promise option I was getting an exception.

@chasemgray
Copy link

This helped me. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants