Skip to content

MathieuDoyon/toggle

Repository files navigation

Toggle

Toggle is a library used to turn on and off feature flags

Packages

This repository is a monorepo that we manage using Lerna and yarn. Several packages are published to npm from the same codebase, including:

Package Version Description
toggle npm Toggle core library
toggle-react npm React binder
toggle-querystring npm Query string utilities use for toggle your feature in your client javascript file
toggle-middleware npm Server middleware compatible with restify, fastify and express
toggle-next-wrapper npm Next.js Toggle wrapper
toggle-restify npm Restify middleware (deprecated use @mathdoy/toggle-middleware instead)

Development

Install

make install

Available Scripts

make help
build                          compile ES6 files to JS
doc                            compile doc as html and launch doc web server
install                        install dependencies
lint                           lint the code and check coding conventions
prettier                       prettify the source code using prettier
run-react                      run the react example
run-restify                    run the restify example
watch-react                    watch toggle react module
watch-restify                  watch toggle restify module
watch                          watch toggle module

Running examples

make run-react
# or
make run-restify

watching

make watch