Socket
Socket
Sign inDemoInstall

cortex-playground

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cortex-playground

cortex-playground


Version published
Maintainers
1
Created
Source

cortex-playground NPM version Build Status Dependency Status

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 repos
  • resources: 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');
// copy test fixtures into a temp directory.
normal.copy(function(err, dir){
  dir; // the temp directory
  normal.resolve(); // `dir` itself. 
  normal.resolve('cortex.json'); // returns the absolute path of `cortex.json`.
});

packages([name])

Use a package.

/path/to/playground/
  |-- packages/
             |-- a/                     // package a
                 |-- lib/
                       |-- index.js
             |-- b/                     // package b
  |-- resources/
              |-- a/
              |-- b/
packages(); // -> use all packages
packages('a'); // -> use package `'a'`
packages('a', 'lib'); // -> use the `lib` folder of package `'a'`

.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

Keywords

FAQs

Package last updated on 08 Jun 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc