0.0.1 • Published 8 years ago

carrefour v0.0.1

Weekly downloads
3
License
UNLICENSED
Repository
github
Last release
8 years ago

carrefour

Codeship Status for MaterialDev/carrefour

Use the carrefour library to generate the Product Variant options for the Material platform based on the values of the different variant groups.

Installation and Usage

Using npm:

$ {sudo -H} npm i -g npm
$ npm i --save @material-dev/carrefour

In Node.js:

const carrefour = require('carrefour');

const variantOptions = carrefour.buildVariants(['Red', 'Blue'], ['S', 'M', 'L']);
/*
[
  { variants: ['Red', 'S'], isShopperVisible: true },
  { variants: ['Red', 'M'], isShopperVisible: true },
  { variants: ['Red', 'L'], isShopperVisible: true },
  { variants: ['Blue', 'S'], isShopperVisible: true },
  { variants: ['Blue', 'S'], isShopperVisible: true },
  { variants: ['Blue', 'S'], isShopperVisible: true },
]
*/

To run the code locally:

  1. Confirm that node v6 and git are installed

  2. Clone the repo

git clone git@github.com:MaterialDev/carrefour.git
  1. Install dependencies
npm install
  1. Run the tests
npm test