Move webpack conf files to their own directory. Update documentation.

This commit is contained in:
haad 2016-10-05 10:57:49 +02:00
parent 4c0927dc58
commit c96d9e9b87
7 changed files with 61 additions and 60 deletions

24
API.md
View File

@ -1,8 +1,6 @@
## orbit-db API documentation
# orbit-db API documentation
**WORK IN PROGRESS**
#### Table of Contents
## Table of Contents
- [Getting Started](#getting-started)
- [orbitdb](#orbitdb)
@ -31,7 +29,7 @@
- [orbitdb](#events)
- [stores](#events)
#### Getting Started
## Getting Started
Install `orbit-db` and [ipfs](https://www.npmjs.com/package/ipfs) from npm:
@ -67,11 +65,11 @@ const orbitdb = new OrbitDB(ipfs)
Choose this options if you're using `orbitd-db` to develop **Desktop** (or "headless") applications, eg. with [Electron](https://electron.atom.io).
#### orbitdb
## orbitdb
After creating an instance of `orbitd-db`, you can now access the different data stores.
##### kvstore(name)
### kvstore(name)
```javascript
const db = orbitdb.kvstore('application.settings')
@ -101,7 +99,7 @@ After creating an instance of `orbitd-db`, you can now access the different data
See [events](#stores) for full description.
##### eventlog(name)
### eventlog(name)
```javascript
const db = orbitdb.eventlog('site.visitors')
@ -136,7 +134,7 @@ After creating an instance of `orbitd-db`, you can now access the different data
See [events](#stores) for full description.
##### feed(name)
### feed(name)
```javascript
const db = orbitdb.feed('orbit-db.issues')
@ -176,7 +174,8 @@ After creating an instance of `orbitd-db`, you can now access the different data
See [events](#stores) for full description.
##### counter(name)
### counter(name)
```javascript
const counter = orbitdb.counter('song_123.play_count')
```
@ -204,12 +203,13 @@ After creating an instance of `orbitd-db`, you can now access the different data
See [events](#stores) for full description.
##### disconnect()
### disconnect()
```javascript
orbitdb.disconnect()
```
##### events
### events
- **orbitdb**

View File

@ -81,13 +81,15 @@ npm run examples:node
<img src="https://raw.githubusercontent.com/haadcode/orbit-db/feat/ipfs-pubsub/screenshots/orbit-db-demo3.gif" width="66%">
**Eventlog**
Check the code in [examples/eventlog.js](https://github.com/haadcode/orbit-db/blob/master/examples/eventlog.js) and run it with:
```
LOG=debug node examples/eventlog.js
```
**Key-Value**
Check the code in [examples/keyvalue.js](https://github.com/haadcode/orbit-db/blob/master/examples/eventlog.js) and run it with:
Check the code in [examples/keyvalue.js](https://github.com/haadcode/orbit-db/blob/master/examples/keystore.js) and run it with:
```
LOG=debug node examples/keyvalue.js
```

View File

@ -14,12 +14,14 @@ module.exports = {
process: 'mock',
Buffer: true
},
plugins: [
],
resolve: {
modules: [
path.join(__dirname, 'node_modules')
path.join(__dirname, '../node_modules')
],
alias: {
'fs': path.join(__dirname + '/node_modules', 'html5-fs'),
'fs': path.join(__dirname, '../node_modules', 'html5-fs'),
http: 'stream-http',
https: 'https-browserify',
Buffer: 'buffer'

View File

@ -20,16 +20,15 @@ module.exports = {
compress: { warnings: false }
})
],
resolveLoader: {
modules: [path.join(__dirname, 'node_modules')]
},
resolve: {
modules: [
path.join(__dirname, 'node_modules')
path.join(__dirname, '../node_modules')
],
alias: {
'node_modules': path.join(__dirname + '/node_modules'),
'fs': path.join(__dirname + '/node_modules', 'html5-fs'),
'fs': path.join(__dirname, '../node_modules', 'html5-fs'),
http: 'stream-http',
https: 'https-browserify',
Buffer: 'buffer'
}
},
module: {

View File

@ -2,9 +2,7 @@ const webpack = require('webpack')
const path = require('path')
module.exports = {
entry: [
'./examples/browser/index.js',
],
entry: './examples/browser/index.js',
output: {
filename: './examples/browser/bundle.js'
},
@ -22,10 +20,10 @@ module.exports = {
],
resolve: {
modules: [
path.join(__dirname, 'node_modules')
path.join(__dirname, '../node_modules')
],
alias: {
'fs': path.join(__dirname + '/node_modules', 'html5-fs'),
'fs': path.join(__dirname, '../node_modules', 'html5-fs'),
}
},
module: {

62
dist/orbitdb.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -46,9 +46,9 @@
"postinstall": "./scripts/post_install.sh",
"test": "mocha",
"build": "npm run build:dist && npm run build:minified && npm run build:examples",
"build:dist": "./node_modules/.bin/webpack --config webpack.config.js",
"build:minified": "./node_modules/.bin/webpack --config webpack.config.minified.js",
"build:examples": "./node_modules/.bin/webpack --config webpack.example.config.js",
"build:dist": "./node_modules/.bin/webpack --config conf/webpack.config.js",
"build:minified": "./node_modules/.bin/webpack --config conf/webpack.config.minified.js",
"build:examples": "./node_modules/.bin/webpack --config conf/webpack.example.config.js",
"stats": "./node_modules/.bin/webpack --json > stats.json"
}
}