Skip to content
This repository was archived by the owner on Aug 22, 2022. It is now read-only.

Commit 39468d2

Browse files
committed
Merge remote-tracking branch 'origin/dev'
2 parents b640519 + f083f1f commit 39468d2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+2156
-1439
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@ orbit-db-cache.json
2020

2121
Vagrantfile
2222

23-
data/
23+
data/
24+
bin/

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog for Orbit
22

3+
**3.2.0** *(2016-10-05)*
4+
5+
- IPFS Pubsub - No More Servers!
6+
- uPort Integration
7+
- Several performance fixes
8+
39
**3.1.0** *(2016-09-02)*
410

511
- Signed messages

Gruntfile.js

Lines changed: 86 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,48 @@
1-
'use strict';
1+
'use strict'
22

3-
const ElectronVersion = '1.3.1'
3+
const path = require('path')
44

55
module.exports = function (grunt) {
6-
require('load-grunt-tasks')(grunt);
7-
grunt.loadNpmTasks('grunt-contrib-clean');
8-
grunt.loadNpmTasks('grunt-contrib-copy');
9-
grunt.loadNpmTasks('grunt-chmod');
6+
const spawn = require('child_process').spawn
7+
require('load-grunt-tasks')(grunt)
8+
grunt.loadNpmTasks('grunt-contrib-clean')
9+
grunt.loadNpmTasks('grunt-contrib-copy')
10+
grunt.loadNpmTasks('grunt-chmod')
1011

11-
const spawn = require('child_process').spawn;
12+
const skipNpmInstall = process.argv.includes('--cached-modules')
13+
const binDirectory = 'bin/'
14+
const moduleCacheDirectory = '.tmp/'
1215

1316
grunt.initConfig({
1417
clean: {
15-
cache: [".tmp"],
16-
dist: ["dist"],
17-
osx: ["dist/Orbit-darwin-x64"],
18-
linux: ["dist/Orbit-linux-x64"]
18+
cache: moduleCacheDirectory,
19+
bin: binDirectory,
20+
osx: path.join(binDirectory, '/Orbit-darwin-x64'),
21+
linux: path.join(binDirectory, '/Orbit-linux-x64'),
22+
npm: [
23+
'node_modules/ipfs/node_modules/ipfs-api',
24+
'node_modules/ipfsd-ctl/node_modules/go-ipfs-dep',
25+
'node_modules/ipfsd-ctl/node_modules/ipfs-api'
26+
],
27+
npm_build: [
28+
path.join(moduleCacheDirectory, 'node_modules/ipfs/node_modules/ipfs-api'),
29+
path.join(moduleCacheDirectory, 'node_modules/ipfsd-ctl/node_modules/go-ipfs-dep'),
30+
path.join(moduleCacheDirectory, 'node_modules/uport-registry/node_modules/ipfs-api'),
31+
path.join(moduleCacheDirectory, 'node_modules/ipfs-js/node_modules/ipfs-api'),
32+
path.join(moduleCacheDirectory, 'node_modules/ipfsd-ctl/node_modules/ipfs-api')
33+
],
34+
electron: [
35+
'Orbit-darwin-x64/',
36+
'Orbit-linux-x64/'
37+
]
1938
},
2039

2140
electron: {
2241
osxBuild: {
2342
options: {
2443
name: 'Orbit',
25-
dir: '.tmp',
26-
out: 'dist/',
27-
version: ElectronVersion,
44+
dir: moduleCacheDirectory,
45+
out: binDirectory,
2846
platform: 'darwin',
2947
arch: 'x64',
3048
overwrite: true,
@@ -37,9 +55,8 @@ module.exports = function (grunt) {
3755
linuxBuild: {
3856
options: {
3957
name: 'Orbit',
40-
dir: '.tmp',
41-
out: 'dist/',
42-
version: ElectronVersion,
58+
dir: moduleCacheDirectory,
59+
out: binDirectory,
4360
platform: 'linux',
4461
arch: 'x64',
4562
overwrite: true,
@@ -59,16 +76,14 @@ module.exports = function (grunt) {
5976
src: [
6077
"./*.js",
6178
"src/**",
62-
"keys/**",
6379
"./client/dist/**",
6480
"package.json",
65-
"network.json",
6681
"!./Gruntfile.js"
6782
],
68-
dest: '.tmp/'
83+
dest: moduleCacheDirectory
6984
}
7085
]
71-
}
86+
},
7287
},
7388

7489
chmod: {
@@ -77,58 +92,60 @@ module.exports = function (grunt) {
7792
mode: '755'
7893
},
7994
src: [
80-
'.tmp/node_modules/**',
81-
'dist/Orbit-darwin-x64/Orbit.app/Contents/Resources/app/node_modules/subcomandante/subcom',
82-
'dist/Orbit-darwin-x64/Orbit.app/Contents/Resources/app/node_modules/go-ipfs-dep/go-ipfs/ipfs',
83-
'dist/Orbit-linux-x64/Orbit.app/Contents/Resources/app/node_modules/subcomandante/subcom',
84-
'dist/Orbit-linux-x64/Orbit.app/Contents/Resources/app/node_modules/go-ipfs-dep/go-ipfs/ipfs'
95+
path.join(moduleCacheDirectory, 'node_modules/subcomandante/subcom'),
96+
path.join(moduleCacheDirectory, 'node_modules/go-ipfs-dep/go-ipfs/ipfs'),
8597
]
8698
}
8799
},
88-
});
89-
90-
grunt.registerTask('npm_install', '', function () {
91-
var done = this.async();
92-
var params = ['install', '--production', '--cache-min 9999999'];
93-
var npm = spawn('npm', params, { cwd: '.tmp' });
94-
npm.stdout.pipe(process.stdout);
95-
npm.stderr.pipe(process.stderr);
96-
npm.on('error', (err) => done(false));
97-
npm.on('exit', done);
98-
});
99-
100-
grunt.registerTask('default', ["build"]);
101-
grunt.registerTask('build_osx', ["build_osx"]);
102-
grunt.registerTask('build_linux', ["build_linux"]);
103-
104-
grunt.registerTask('build', function() {
105-
grunt.task.run('clean:osx');
106-
grunt.task.run('clean:linux');
107-
grunt.task.run('copy_files');
108-
grunt.task.run('npm_install');
109-
grunt.task.run('electron:osxBuild');
110-
grunt.task.run('chmod:bins');
111-
});
100+
})
101+
102+
grunt.registerTask('npm_install', '', function (os) {
103+
var done = this.async()
104+
var params = ['install', '--production', '--cache-min 9999999']
105+
let env = Object.assign({}, process.env)
106+
env.TARGET_OS = grunt.option('TARGET_OS')
107+
var npm = spawn('npm', params, { cwd: moduleCacheDirectory, env: env })
108+
npm.stdout.pipe(process.stdout)
109+
npm.stderr.pipe(process.stderr)
110+
npm.on('error', (err) => done(false))
111+
npm.on('exit', done)
112+
})
113+
114+
grunt.registerTask('default', ["build"])
115+
grunt.registerTask('build', ["build_osx", "build_linux"])
112116

113117
grunt.registerTask('build_osx', function() {
114-
grunt.task.run('clean:osx');
115-
grunt.task.run('copy_files');
116-
grunt.task.run('npm_install');
117-
grunt.task.run('electron:osxBuild');
118-
grunt.task.run('chmod:bins');
119-
});
118+
if(!skipNpmInstall)
119+
grunt.task.run('clean:cache')
120+
121+
grunt.task.run('clean:osx')
122+
grunt.task.run('copy:main')
123+
124+
if(!skipNpmInstall) {
125+
grunt.task.run('npm_install')
126+
}
127+
128+
grunt.task.run('clean:npm_build')
129+
grunt.task.run('chmod:bins')
130+
grunt.task.run('electron:osxBuild')
131+
grunt.task.run('clean:electron')
132+
})
120133

121134
grunt.registerTask('build_linux', function() {
122-
grunt.task.run('clean:linux');
123-
grunt.task.run('copy_files');
124-
grunt.task.run('npm_install');
125-
grunt.task.run('electron:linuxBuild');
126-
grunt.task.run('chmod:bins');
127-
});
128-
129-
grunt.registerTask('copy_files', function() {
130-
grunt.task.run('clean:cache');
131-
grunt.task.run('copy:main');
132-
});
133-
134-
};
135+
if(!skipNpmInstall)
136+
grunt.task.run('clean:cache')
137+
138+
grunt.task.run('clean:linux')
139+
grunt.task.run('copy:main')
140+
141+
if(!skipNpmInstall) {
142+
grunt.task.run('npm_install')
143+
}
144+
145+
grunt.task.run('clean:npm_build')
146+
grunt.task.run('chmod:bins')
147+
grunt.task.run('electron:linuxBuild')
148+
grunt.task.run('clean:electron')
149+
})
150+
151+
}

README.md

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22

33
> A distributed, peer-to-peer chat application built on [IPFS](http://ipfs.io)
44
5+
**NOTE!** *Currently only the Electron (Desktop) version works. We're working to fix the Browser version (js-ipfs)*
6+
57
<img src="https://raw.githubusercontent.com/haadcode/orbit/master/screenshots/screenshot4%202016-04-16.png" width="80%">
68
<img src="https://raw.githubusercontent.com/haadcode/orbit/master/screenshots/screenshot7%202016-09-02.png" width="50%">
79
<img src="https://raw.githubusercontent.com/haadcode/orbit/master/screenshots/screenshot6%202016-04-17.png" width="50%">
810

9-
1011
## Project Status
1112

1213
**Status:** *In active development*
@@ -30,26 +31,25 @@ Orbit can be run either in a browser or as a native desktop application. The bro
3031

3132
*The live demo is an old version of Orbit. It is recommended to follow the instructions below to run the latest version.*
3233

33-
#### Browser
34-
35-
*Chrome is recommended to run Orbit in the browser.*
36-
34+
#### Desktop
3735
```
3836
git clone https://github.com/haadcode/orbit.git
3937
cd orbit
4038
npm install
4139
npm start
4240
```
4341

44-
#### Desktop
42+
#### Browser
43+
44+
*Chrome is recommended to run Orbit in the browser.*
45+
4546
```
4647
git clone https://github.com/haadcode/orbit.git
4748
cd orbit
4849
npm install
49-
npm run electron
50+
npm start
5051
```
5152

52-
5353
## Development
5454

5555
#### Requirements
@@ -121,13 +121,9 @@ npm run build
121121
The builds are in `dist/`.
122122

123123

124-
## Run your own network
125-
126-
Get https://github.com/haadcode/orbit-server and start the server. In Orbit's login window, point to the host where your orbit-server is running, default: `localhost:3333`.
127-
128-
129124
## Contributing
130125

131126
Would be happy to accept PRs! If you want to work on something, it'd be good to talk beforehand to make sure nobody else is working on it. You can reach me on Twitter [@haadcode](https://twitter.com/haadcode) or on IRC #ipfs on Freenode, or in the comments of the [issues section](https://github.com/haadcode/orbit/issues).
132127

133128
Good place to start is to take a look at the ["help wanted"](https://github.com/haadcode/orbit/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22+sort%3Areactions-%2B1-desc) issues or the project's [status board](https://waffle.io/haadcode/orbit).
129+
0

circle.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
11
machine:
22
node:
33
version: 6.1.0
4+
deployment:
5+
release:
6+
branch: dev
7+
owner: haadcode
8+
commands:
9+
- npm run build
10+
- npm run dist
11+
- ls $CIRCLE_ARTIFACTS
12+
general:
13+
artifacts:
14+
- "bin/dist"

client/.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@ test/tests.bundle*
3636
# Other
3737
stats.json
3838

39-
# Distribution build
40-
dist/
39+
# temp file
40+
ipfsdist.js

client/Gruntfile.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,11 @@ module.exports = function (grunt) {
120120
'<%= pkg.dist %>'
121121
]
122122
}]
123-
}
123+
},
124+
npm: [
125+
'node_modules/ipfs-api',
126+
'node_modules/ipfs/node_modules/ipfs-api'
127+
]
124128
}
125129
});
126130

@@ -137,7 +141,7 @@ module.exports = function (grunt) {
137141

138142
grunt.registerTask('test', ['karma']);
139143

140-
grunt.registerTask('build', ['clean', 'copy', 'webpack']);
144+
grunt.registerTask('build', ['clean:dist', 'copy', 'webpack']);
141145

142146
grunt.registerTask('default', []);
143147
};

client/dist/assets/app.js

Lines changed: 338 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/dist/assets/ipfs.js

Lines changed: 0 additions & 62 deletions
This file was deleted.

client/dist/images/earth.png

22.1 KB
Loading

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy