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

Update #5

Merged
merged 8 commits into from
Aug 30, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 43 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,44 @@
.DS_Store
public/js/app.js

**/node_modules/
**/*.log
test/repo-tests*
**/bundle.js

# Logs
logs
*.log

coverage

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

build

# Dependency directory
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
node_modules

lib
dist
test/test-data/go-ipfs-repo/LOCK
test/test-data/go-ipfs-repo/LOG
test/test-data/go-ipfs-repo/LOG.old

# while testing npm5
package-lock.json
32 changes: 32 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
sudo: false
language: node_js

matrix:
include:
- node_js: 6
env: CXX=g++-4.8
- node_js: 8
env: CXX=g++-4.8
# - node_js: stable
# env: CXX=g++-4.8

script:
- npm run lint
- npm run test
- npm run coverage
- make test

before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start

after_success:
- npm run coverage-publish

addons:
firefox: 'latest'
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8
37 changes: 26 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,47 @@
# Shared editing demo using IPFS and CRDT

> This codebase was developed to demostrate how to use IPFS in conjuction with [Y.js, a CRDT library](http://y-js.org/).

Links:

- [Demo script](SCRIPT.md)
- [Video](https://www.youtube.com/watch?v=-kdx8rJd8rQ)
- [Transcript](SCRIPT.md)
- [Video of Demo](https://www.youtube.com/watch?v=-kdx8rJd8rQ)
- [Live Demo](https://ipfs.io/ipfs/QmUS49q6Hr6r61aciF3wPJd1xivstjFnyUWbUnrYom8dHE/)

## Set up

### Pre-requisites

- Have Node.js version 6 or greater installed

## Pre-requisites
### Install

* Have Node.js version 6 or greater installed
```
> git clone https://github.com/ipfs-labs/shared-editing-demo.git
> cd shared-editing-demo
> npm install
```

## Install
### Build

```
$ git clone https://github.com/ipfs-labs/shared-editing-demo.git
$ cd shared-editing-demo
$ npm install
> npm run build
```

## Run
### Run

```
$ npm start
> npm start
```

## Open in browser
### Open in browser

Using a modern browser that supports WebRTC, like a recent version of Chrome or Firefox, open several windows of [http://localhost:12345](http://localhost:12345).

## Known issues

This Demo uses WebRTC to establish the connections between nodes. WebRTC is a CPU intensive protocol and not all Browsers will behave correctly, depending on their implementation of WebRTC or the resources available on the machine that they are running. This is a known issue and something the [js-ipfs team is looking at alternatives to solve](https://github.com/ipfs/js-ipfs/issues/962).

## License

MIT
14 changes: 14 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
machine:
node:
version: stable

dependencies:
pre:
- google-chrome --version
- curl -L -o google-chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
- sudo dpkg -i google-chrome.deb || true
- sudo apt-get update
- sudo apt-get install -f
- sudo apt-get install --only-upgrade lsb-base
- sudo dpkg -i google-chrome.deb
- google-chrome --version
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
"description": "Yjs demo over IPFS",
"main": "index.js",
"scripts": {
"start": "http-server -c-1 -p 12345 public",
"compile": "browserify src/app.js -o public/js/app.js -d"
"build": "browserify src/app.js -o public/js/app.js -d",
"start": "http-server -c-1 -p 12345 public"
},
"author": "Pedro Teixeira <i@pgte.me>",
"license": "MIT",
"dependencies": {
"browserify": "^14.4.0",
"http-server": "^0.10.0",
"ipfs": "^0.25.0",
"y-array": "^10.1.3",
"y-ipfs-connector": "^1.1.0",
"ipfs": "^0.25.2",
"y-array": "^10.1.4",
"y-ipfs-connector": "^1.2.1",
"y-memory": "^8.0.9",
"y-text": "^9.5.0",
"yjs": "^12.3.1"
"y-text": "^9.5.1",
"yjs": "^12.3.3"
}
}
Loading