cortex-playground
Collections of test fixtures for cortex.
Install
$ npm install cortex-playground --save
Usage
For details, see test-fixture.
var playground = require('cortex-playground');
var packages = playground.packages;
var resources = playground.resources;
packages
: contains raw files of the user reposresources
: contains built files, and each of the resource folder is built from the package which has the same name.
The usage of resources
is the same as packages
.
var normal = packages('normal');
normal.copy(function(err, dir){
dir;
normal.resolve();
normal.resolve('cortex.json');
});
packages([name])
Use a package.
/path/to/playground/
|-- packages/
|-- a/ // package a
|-- lib/
|-- index.js
|-- b/ // package b
|-- resources/
|-- a/
|-- b/
packages();
packages('a');
packages('a', 'lib');
.copy(callback)
- callback
function(err, dir)
- dir
path
a temporarily directory that contains all resources and nice toys which you will enjoy!
Copy the test fixtures to a temp dir.
.resolve([path...])
.resolve(); // -> the base
Returns path
Available Packages
As well as available resources.
License
MIT