Skip to content

Commit

Permalink
Actually test the new Worker constructor and link to new documentatio…
Browse files Browse the repository at this point in the history
…n in README.

Bump to 1.4.1.
  • Loading branch information
John Vilk committed Jul 24, 2017
1 parent b72de19 commit 1d51975
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 15 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# BrowserFS v1.4.0
# BrowserFS v1.4.1
> BrowserFS is an in-browser file system that emulates the [Node JS file system API](http://nodejs.org/api/fs.html) and supports storing and retrieving files from various backends. BrowserFS also integrates nicely into the Emscripten file system.
[![Build Status](https://travis-ci.org/jvilk/BrowserFS.svg?branch=master)](https://travis-ci.org/jvilk/BrowserFS)
Expand Down Expand Up @@ -33,7 +33,7 @@ BrowserFS is highly extensible, and ships with many filesystem backends:

More backends can be defined by separate libraries, so long as they extend the `BaseFileSystem` class. Multiple backends can be active at once at different locations in the directory hierarchy.

For more information, see the [API documentation for BrowserFS](https://jvilk.com/browserfs/1.3.0/index.html).
For more information, see the [API documentation for BrowserFS](https://jvilk.com/browserfs/1.4.1/index.html).

### Building

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "browserfs",
"version": "1.4.0",
"version": "1.4.1",
"description": "A filesystem in your browser!",
"main": "dist/browserfs.js",
"typings": "dist/browserfs",
Expand Down
13 changes: 3 additions & 10 deletions test/harness/factories/workerfs_factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,10 @@ import {FileSystem} from '../../../src/core/file_system';
export default function WorkerFSFactory(cb: (name: string, obj: FileSystem[]) => void): void {
if (WorkerFS.isAvailable()) {
// Set up a worker, which will host an in-memory FS.
var worker = new Worker("/test/harness/factories/workerfs_worker.js"),
workerfsInstance = new WorkerFS(worker);
worker.addEventListener("message", (e: MessageEvent) => {
if (e.data === "Ready") {
workerfsInstance.initialize(() => {
cb("WorkerFS", [workerfsInstance]);
});
}
const worker = new Worker("/test/harness/factories/workerfs_worker.js");
WorkerFS.Create({ worker: worker }, function(e, workerFs?) {
cb("WorkerFS", [workerFs]);
});
// Start the worker.
worker.postMessage(null);
} else {
cb("WorkerFS", []);
}
Expand Down
2 changes: 0 additions & 2 deletions test/harness/factories/workerfs_worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,5 @@ inmemfs_factory((name, objs) => {
BrowserFS.initialize(objs[0]);
// Listen for API requests.
WorkerFS.attachRemoteListener(<Worker> <any> self);
// Tell the main thread that we are ready.
(<Worker> <any> self).postMessage("Ready");
});

0 comments on commit 1d51975

Please sign in to comment.