E5ED GitHub - gobengo/activity-mocks: JSON Activity Streams 2.0 mock activities
[go: up one dir, main page]

Skip to content

gobengo/activity-mocks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

  • strings - Has only string values for Activity properties
  • jsonld - The 'extended example' whose .object has its own jsonld context

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 - will npm install and bower 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 http
  • make deploy [env={*prod,uat,qa}] - Deploy to lfcdn, optionally specifying a bucket env

About

JSON Activity Streams 2.0 mock activities

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  
0