Commit 48739e62 authored by Mikey's avatar Mikey
Browse files

Merge pull request #9 from valueflows/gulp-build

re-write how website is built
parents 09fa7f3d bc33dd59
/node_modules
npm-debug.log*
/.build
var gulp = require('gulp')
var Swig = require('swig').Swig
var data = require('gulp-data')
var markdown = require('markdown-it')()
var map = require('through2-map')
var buffer = require('vinyl-buffer')
var replaceExt = require('replace-ext')
var assign = require('object-assign')
var prettify = require('gulp-prettify')
function docs () {
var swig = new Swig()
var renderDoc = swig.compileFile('./templates/doc.swig')
return gulp.src('./docs/*.md')
.pipe(buffer())
.pipe(data(getData))
.pipe(map.obj(function toMarkdown (file) {
var input = String(file.contents)
var output = markdown.render(input)
file.contents = Buffer(output)
file.path = replaceExt(file.path, '.html')
return file
}))
.pipe(map.obj(function toTemplate (file) {
var input = String(file.contents)
var locals = assign({}, file.data, { contents: input })
var output = renderDoc(locals)
file.contents = Buffer(output)
return file
}))
.pipe(prettify())
.pipe(gulp.dest('./.build'))
function getData (file) {
return require(file.path + '.json')
}
}
function ns () {
gulp.src('./ns/*.jsonld')
.pipe(gulp.dest('./.build/ns'))
}
function css () {
gulp.src('./css/*.css')
.pipe(gulp.dest('./.build/css'))
}
function assets () {
gulp.src('./assets/**/*')
.pipe(gulp.dest('./.build'))
}
gulp.task('docs', docs)
gulp.task('ns', ns)
gulp.task('css', css)
gulp.task('assets', assets)
gulp.task('build', ['docs', 'ns', 'css', 'assets'])
{
"title": "Value Flows"
}
<h1 id="value-flows-vf-vocabs"><a href="#value-flows-vf-vocabs" aria-hidden="true"><span class="icon icon-link"></span></a><a href="https://github.com/valueflows/valueflows">Value Flows <code>vf</code> vocabs</a></h1>
<p><img src="https://rawgit.com/valueflows/valueflows/master/assets/icon-0.svg" alt="Value Flows icon"></p>
<p>Value Flows is a set of common vocabularies to describe flows of economic resources of all kinds within distributed economic ecosystems.</p>
<p>Purpose: to enable internetworking among many different software projects for resource planning and accounting within fractal networks of people and groups.</p>
<p>Or, if that is too many buzzwords, &quot;let&apos;s help a lot of alternative economic software projects that are solving different pieces of the same puzzle be able to work together&quot;.</p>
<p>If you would like to be part of this conversation, please <a href="https://github.com/valueflows/valueflows/issues">raise an issue here</a>, or fork this or any of the related repositories and issue pull requests.</p>
<h2 id="principles-long-form"><a href="#principles-long-form" aria-hidden="true"><span class="icon icon-link"></span></a>Principles (<a href="https://github.com/valueflows/valueflows/wiki/Principles-for-this-vocabulary">long form</a>)</h2>
<ul>
<li>the vocabulary must support coordinating work between different people in different organizations using different software on different platforms using different human and programming languages.</li>
<li>the vocabulary must track the flows of resources (value) forwards and backwards.</li>
<li>the vocabulary must distribute income (rewards) according to peoples&apos; contributions, regardless of where and when in the network those contributions occurred.</li>
<li>the vocabulary must be fractal: it must support high-level views of networks as well zooming in to lower and lower levels of detail.</li>
<li>the vocabulary must work at the recipe, planning, and accounting levels.</li>
<li>the vocabulary must work for alternative and traditional organizing shapes and economic relationships.</li>
</ul>
<h2 id="vocabularies"><a href="#vocabularies" aria-hidden="true"><span class="icon icon-link"></span></a>Vocabularies</h2>
<ul>
<li><a href="https://github.com/openvocab/agent">Agent Vocab</a></li>
<li>Commitment Vocab</li>
<li>Economic Event Vocab</li>
<li><a href="https://github.com/valueflows/exchange">Exchange Vocab</a></li>
<li><a href="https://github.com/valueflows/process">Process Vocab</a></li>
<li><a href="https://github.com/valueflows/resource">Resource Vocab</a></li>
</ul>
<p>Might be more to come.</p>
<h2 id="roadmap"><a href="#roadmap" aria-hidden="true"><span class="icon icon-link"></span></a>Roadmap</h2>
<p>Our next deliverable is to have separate API and UI apps playing with each others&apos; people, groups, and relationships in-between by communicating through a common vocabulary.</p>
<p>Our long-term plan is to refine our common vocabularies, design a set of interoperable protocols for decentralized economic infrastructure, and deploy an ecosystem of interconnected apps to form the backbone of an alternative economic system that supports recipes, planning, and accounting for fractal networks.</p>
<h2 id="why"><a href="#why" aria-hidden="true"><span class="icon icon-link"></span></a>Why?</h2>
<p>This effort began in a conversation between the <a href="https://github.com/valnet/valuenetwork">Network Requirements Planning</a> (NRP), and the <a href="https://github.com/open-app/core">Open Apps</a> software projects.</p>
<p>The NRP gang kept running into other apps that did a lot of the same things, or at least parts of the same things, that were used by different groups who wanted to collaborate with each other. So, let&apos;s have the different apps be able to collaborate with each other!</p>
<p>And the Open Apps gang (which includes the NRP gang) wants to create &quot;a suite of integrated and open sourced apps which support transparent, democratic and decentralised organising&quot;.</p>
<p>Which potentially means many different apps that want to talk to each other. Thus the desire for a common vocabulary.</p>
<h2 id="who-uses-this"><a href="#who-uses-this" aria-hidden="true"><span class="icon icon-link"></span></a>Who uses this?</h2>
<p>NRP is the <a href="https://github.com/valnet/valuenetwork/wiki/Core">source of much of the vocabulary</a>, and <a href="https://github.com/valnet/valuenetwork/blob/master/docs/core_model.txt">continues to refine the model</a>, collaborating with user networks like <a href="http://nrp.sensorica.co">Sensorica</a>. <a href="https://github.com/open-app/holodex">Holodex</a> is using the <a href="https://github.com/valueflows/agent">organization aspects of the vocab</a>.</p>
<p>But most of the vocabulary comes from the <a href="http://en.wikipedia.org/wiki/Resources,_events,_agents_(accounting_model)">Resource-Event-Agent (REA) ontology</a> originated by <a href="https://www.msu.edu/~mccarth4/">Professor William McCarthy of Michigan State University</a> in 1982, used in many places around the world.</p>
<h2 id="pictures"><a href="#pictures" aria-hidden="true"><span class="icon icon-link"></span></a>Pictures!</h2>
<p><img src="https://docs.google.com/drawings/d/1ZmlgstkpoOeUrdeCkWn7PziXC8iqS3eh9281bjTyxX4/pub?w=960&amp;h=720" alt="model"></p>
<h3 id="resource-flows"><a href="#resource-flows" aria-hidden="true"><span class="icon icon-link"></span></a>Resource flows</h3>
<p>One of the purposes of this vocab is to support resource flows connecting many websites. These flows may be oriented around Processes, Exchanges, or combinations of both. We are breaking out the Processes and Exchanges into their own vocab repositories, but here some overview diagrams.</p>
<p>In general, processes and exchanges alternate in a flow. But in some situations, either the processes or the exchanges are more important, and the other is not worth tracking and can be elided.</p>
<h4 id="process-oriented-flow"><a href="#process-oriented-flow" aria-hidden="true"><span class="icon icon-link"></span></a>Process-oriented flow</h4>
<p><img src="https://i.imgur.com/74gIY5C.png" alt="process-oriented flow"></p>
<h4 id="exchange-oriented-flow"><a href="#exchange-oriented-flow" aria-hidden="true"><span class="icon icon-link"></span></a>Exchange-oriented flow</h4>
<p><img src="https://docs.google.com/drawings/d/1og6iUscoFmzHm2zkfhwSU3lp6zHPX2j3BfvTmyfGmww/pub?w=720&amp;h=330" alt="process-oriented flow"></p>
<h4 id="process-exchange-combination-flow"><a href="#process-exchange-combination-flow" aria-hidden="true"><span class="icon icon-link"></span></a>Process-Exchange combination flow</h4>
<p><img src="https://docs.google.com/drawings/d/1Sm389PH04BS_gvrvPD7_idGf-EdZmD2mhRiNl3V26a8/pub?w=746&amp;h=674" alt="combo flow"></p>
......@@ -6,9 +6,10 @@
"scripts": {
"test": "true",
"start": "node server.js",
"deploy-remote": "git remote add dokku dokku@valueflo.ws:valueflo.ws",
"deploy-push": "git push dokku master",
"deploy": "npm run deploy-remote; npm run deploy-push"
"build": "gulp build",
"deploy-remote": "git remote add deploy dokku@valueflo.ws:valueflo.ws; true",
"deploy-push": "git-directory-deploy --directory .build --repo deploy --branch master --username valueflows --email bot@valueflo.ws",
"deploy": "npm run build && npm run deploy-remote && npm run deploy-push"
},
"repository": {
"type": "git",
......@@ -23,5 +24,17 @@
"dependencies": {
"finalhandler": "^0.4.0",
"serve-static": "^1.10.0"
},
"devDependencies": {
"git-directory-deploy": "^1.3.0",
"gulp": "^3.9.0",
"gulp-data": "^1.2.0",
"gulp-prettify": "^0.3.0",
"markdown-it": "^5.0.0",
"object-assign": "^4.0.1",
"replace-ext": "0.0.1",
"swig": "^1.4.2",
"through2-map": "^2.0.0",
"vinyl-buffer": "^1.0.0"
}
}
{% extends 'layout.swig' %}
{% block title %}{{ title }}{% endblock %}
{% block head %}
{% parent %}
{% endblock %}
{% block scripts %}
{% parent %}
{% endblock %}
{% block contents %}
{{ contents | safe }}
{% endblock %}
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>{% block title %}Value Flows{% endblock %}</title>
{% block head %}
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="/css/index.css">
{% endblock %}
</head>
<body>
<main>
{% block contents %}{% endblock %}
</main>
{% block scripts %}
{% endblock %}
</body>
</html>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment