| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
A library providing a means to toggle or branch web application code.
This library provides a means to toggle or branch application code at runtime, whilst mitigating the carrying costs of doing so.
It aims to enable low friction feature toggling aspect/advice1 in a codebase.
It suggests a convention-based approach to storing variant code, aiming to mitigate boilerplate whilst developing new features, and reduce the friction of accepting or rejecting toggled variations, if and when the time arises.
Originally developed for experiment toggles / flags, it acts only as a means to implement a toggle point, separating any toggle router concern, so is agnostic of the type of toggle or flag.
For a full introduction, please see some articles on medium.com
There are a few moving parts, and they can be combined in different combinations, depending on use case.
The bare minimum would be injecting a plugin from the webpack package into a build process, and connecting it with appropriate target modules. The other packages are utilities to support that. To consider what's possible, and how you might set things up, see the examples for inspiration!
Then:
This repository is made up of four packages:
@asos/web-toggle-point-features - Stores for holding feature toggle state.
@asos/web-toggle-point-react-pointcuts - React application code for varying a component or hook, based on a given feature toggle state.
@asos/web-toggle-point-ssr - Code for serializing JSON as part of a server rendering process, to be deserialized in client code into an appropriate feature toggle state store. Includes additional React-specific exports, for use in React applications.
@asos/web-toggle-point-webpack - Detection and insertion of toggle point code during a webpack build process.
Please see separate examples documentation.
Please see discussions and issues, and please consider contributing!
(ab)using some terminology from aspect-oriented programming ↩
Currently, only webpack is supported. See Issue #7 for plans to introduce a Rollup / Vite equivalent. ↩
| Back | FazBrowse Home | New Git URL |