@croct/rule-engine-experiments
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

Croct
Experiments Extension
A Rule Engine extension for A/B and multivariate testing.

Version Build Maintainability Coverage

📦Releases · 🐞Report Bug · Request Feature

Installation

The recommended way to install this plugin is using NPM. It pairs nicely with module bundlers such as Rollup, Webpack or Browserify and includes Typescript typings.

Run the following command to install the latest version:

npm install @croct/rule-engine-experiments

Basic usage

import croct from '@croct/plug';
import '@croct/rule-engine';
import '@croct/rule-engine-experiments';

croct.plug({
    plugins: {
        rules: {
            extensions: {
                audiences: {
                    'returning-users': 'user is returning',
                },
            },
            pages: {
                '/home': [
                    {
                        rules: [
                            {
                                name: 'welcome-returning-users',
                                properties: {
                                    audience: 'returning-users',
                                }
                            }
                        ]
                    }
                ]
            }
        },
    },
});

Contributing

Contributions to the package are always welcome!

  • Report any bugs or issues on the issue tracker.
  • For major changes, please open an issue first to discuss what you would like to change.
  • Please make sure to update tests as appropriate.

Testing

Before running the test suites, the development dependencies must be installed:

npm install

Then, to run all tests:

npm run test

Run the following command to check the code against the style guide:

npm run lint

Building

Before building the project, the dependencies must be installed:

npm install

Then, to build the CommonJS module:

npm run build

Copyright Notice

This project is released under the MIT License.

Package Sidebar

Install

npm i @croct/rule-engine-experiments

Weekly Downloads

0

Version

0.2.0

License

MIT

Unpacked Size

20.9 kB

Total Files

9

Last publish

Collaborators

  • croct-bot
  • fryuni
  • marcospassos