Comments (8)
@bcheidemann ah, I see. We need to update https://github.com/filerjs/filer/blob/master/package.json#L77-L81 and potentially the build
script to copy things where they are expected when you npm install filer
. If you want to do that, that would be great.
from filer.
I've shipped v1.3.1 to npm, do you want to try that? https://github.com/filerjs/filer/releases/tag/v1.3.1
from filer.
Hello @humphd,
As far as I can see, the shims are still missing in the NPM library v1.3.1.
Also, I quickly checked the history and I could not find any commit that would have fixed this problem.
from filer.
cc @bcheidemann
from filer.
@humphd the "shims" directory in the root of the project needs to be released to NPM. Could you advise on what changes need to be made to facilitate this? Happy to put up a PR.
from filer.
@thomas-jakemeyn this is the workaround until the files are released to NPM:
- Copy the 'shims' directory from this repo into your project. This can be wherever you want but for arguments sake lets say you copy the contents to
src/filer/shims
. - You then need to update the following imports:
// src/filer/shims/fs.js
// replace
const { FileSystem } = require('../src/index');
// with
const { FileSystem } = require('filer');
// src/filer/shims/path.js
// replace
const { path } = require('../src/index');
// with
const { path } = require('filer');
// src/filer/shims/providers/default.js
// replace
const { Default } = require('../../src/providers/index');
// with
const { Default } = require('filer/src/providers/index');
// src/filer/shims/providers/indexeddb.js
// replace
const IndexedDB = require('../../src/providers/indexeddb');
// with
const IndexedDB = require('filer/src/providers/indexeddb');
// src/filer/shims/providers/memory.js
// replace
const Memory = require('../../src/providers/memory');
// with
const Memory = require('filer/src/providers/memory');
- Instantiate the
FilerWebpackPlugin
class with the following options
// webpack.config.js
module.exports = {
plugins: [
new filer.FilerWebpackPlugin({
shimsDir: '<rootDir>/src/filer/shims`,
}),
],
}
This should work but I haven't tested it and I appreciate it's a lot of effort to go to. Hopefully it will be possible to release a new version of filer which includes the shims
and webpack
folders soon.
from filer.
Should be fixed by v1.4.1
from filer.
Confirmed, shims are now present :)
from filer.
Related Issues (20)
- Support fs.open() flags being a number vs. string HOT 5
- Add find_symlink_node() to allow l* methods (lstat, lchown, etc) to use find_node like functionality HOT 4
- Export FS type to the user HOT 2
- Shell.mkdirp does not support relative paths HOT 4
- Use case HOT 1
- npm test only running shim tests HOT 10
- Incorrect documentation for Buffer shim HOT 2
- path module not shimmed correctly
- BUG: unexpected failures when calling fs functions (e.g. writeFile) with empty options object HOT 4
- BUG: fs.readdir fails when passing options HOT 4
- BUG: fs.mkdir does not recursively create parent directories when called with { recursive: true } HOT 2
- Add tests for new code paths from PR #774 HOT 1
- fs.opendir not implemented
- Typescript Support HOT 2
- web ide: Support for File System Access APIs as a Storage Provider? HOT 7
- GitHub Actions Workflow failing
- Webpack entry cannot be found after importing filer HOT 15
- Critical dependency: the request of a dependency is an expression HOT 3
- Maintenance of Filer
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from filer.