fagbokforlaget / simple-fs

Handles files on indexeddb like you would do in node.js (promise)
MIT License
152 stars 9 forks source link

ES6 Module Support #4

Closed backspaces closed 5 years ago

backspaces commented 5 years ago

Is your feature request related to a problem? Please describe. Although written with webpack imports (ie incomplete paths), there is not an es6 module version of the project.

Describe the solution you'd like A dist/ file that is a module, and a 'module' field in package.json. This will allow webpack/rollup to find it, and more importantly, allow unpkg.com to serve the module version with the ?module option.

Describe alternatives you've considered Just use script tags and forsake use of modules? Or create a Rollup or Webpack config that creates the module format for modern users?

Additional context Great idea .. the indexeddb api is pretty horrible!

iapain commented 5 years ago

@backspaces Thanks for trying it. In v0.2.12 I've added es6 modules.

IndexedDB API is quite tricky, our plan is to make simplefs as generic as possible, so that it can hook into various backends. Feel free to try it and let us know if you find missing functionality or bugs.

iapain commented 5 years ago

Added detailed example in README