activity-mocks
v0.0.0-dev.1
Published
Mock [JSON Activity Streams](http://tools.ietf.org/html/draft-snell-activitystreams-09) Objects you can use to develop other components.
Downloads
2
Readme
activity-mocks
Mock JSON Activity Streams Objects you can use to develop other components.
Using
The source is intended to be run by node (not, e.g. cajon).
A UMD build is distributed in dist/, and can be generated with make dist
.
Mocks
From jasnell/activitystreams.jsonld README.
- strings - Has only string values for Activity properties
- jsonld - The 'extended example' whose .object has its own jsonld context
From the Spec
- spec.minimal - Example 1: Minimal Activity
- spec.basicWithDetail - Example 2: Basic activity with some additional detail
- spec.extended - Example 3: An extended activity
Vendors
Livefyre
API
The main export is a tree of the different sets of mocks
var activityMocks = require('activity-mocks');
activityMocks.strings;
activityMocks.jsonld;
activityMocks.livefyre.userPostMessage;
activityMocks.livefyre.sitePostCollection;
You can create a new instance of a mock by name
var activityMocks = require('activity-mocks');
activityMocks.create('strings');
activityMocks.create('jsonld');
activityMocks.create('livefyre.userPostMessage');
activityMocks.create('livefyre.sitePostCollection');
You can get an array of all mocks
require('activity-mocks').toArray();
You can get a list of all names
var activityMocks = require('activity-mocks');
activityMocks.names
.filter(function (name) {
return name.indexOf('livefyre.') === 0;
})
.map(activityMocks.create);
make
commands
make build
- willnpm install
andbower install
make dist
- will use r.js optimizer to compile the source, UMD wrap, and place that and source maps in dist/make clean
make server
- serve the repo over httpmake deploy [env={*prod,uat,qa}]
- Deploy to lfcdn, optionally specifying a bucket env