Compare commits

..

No commits in common. "55376db1c2ed417831913c56e9ad335c34174a16" and "66c2b162db2903e81cc1cb034ee248394c66745b" have entirely different histories.

7 changed files with 72 additions and 17 deletions

1
.gitignore vendored
View File

@ -13,4 +13,3 @@ pnpm-lock.yaml
updux-5.0.0.tgz
.envrc
.task
releases

View File

@ -26,8 +26,3 @@ updux-*.tgz
vitest.config.js
yarn-error.log
yarn.lock
docs*
.envrc
contrib/*
typedoc.json
dist/tutorial/*

View File

@ -6,21 +6,11 @@ vars:
PARENT_BRANCH: main
tasks:
pack:
cmds:
- npm pack --pack-destination releases
build: tsc
checks:
deps: [test, build]
prepare:
desc: build and bundle the package
cmds:
- { task: build }
- { task: pack }
integrate:
deps: [checks]
cmds:

8
guides/+page.js Normal file
View File

@ -0,0 +1,8 @@
import { redirect } from '@sveltejs/kit';
export const prerender = true;
/** @type {import('./$types').PageLoad} */
export function load() {
throw redirect(307, '/docs/first-category/first-page');
}

View File

@ -0,0 +1,47 @@
---
title: Introduction
---
Updux is a class that collects together all the stuff pertaining to a Redux
reducer -- actions, middleware, subscriptions, selectors -- in a way that
is as modular and as TypeScript-friendly as possible.
While it has originally been created to play well with [updeep][], it also
work wells with plain JavaScript, and
interfaces very neatly with other immutability/deep merging libraries
like
[Mutative], [immer][], [updeep][],
[remeda][],
[lodash][], etc.
## Updux terminology
<dl>
<dt>Updux</dt>
<dd>Object encapsulating the information pertinent for a Redux reducer.
Named thus because it has been designed to work well with [updeep][],
and follows my spin on
the [Ducks pattern](https://github.com/erikras/ducks-modular-redux).</dd>
<dt>Mutation</dt>
<dd>Reducing function, mostly associated with an action. All mutations of
an updux object are combined to form its reducer.</dd>
<dt>Subdux</dt>
<dd>Updux objects associated with sub-states of a main updux. The main
updux will inherit all of its subduxes actions, mutations, reactions,
etc.</dd>
<dt>Effect</dt>
<dd>A Redux middleware, augmented with a few goodies.</dd>
<dt>Reaction</dt>
<dd>Subscription to a updux. Unlike regular Redux subscriptions, don't
trigger if the state of the updux isn't changed by the reducing.</dd>
</dl>
[updeep]: https://www.npmjs.com/package/@yanick/updeep-remeda
[immer]: https://www.npmjs.com/package/immer
[lodash]: https://www.npmjs.com/package/lodash
[ts-action]: https://www.npmjs.com/package/ts-action
[remeda]: remedajs.com/
[Mutative]: https://mutative.js.org/

16
mkdocs.yml Normal file
View File

@ -0,0 +1,16 @@
site_name: Updux
theme:
name: material
markdown_extensions:
- pymdownx.snippets
- pymdownx.inlinehilite
- pymdownx.superfences
- pymdownx.highlight:
default_lang: js
anchor_linenums: true
line_spans: __span
pygments_lang_class: true
nav:
- Home: index.md
- Tutorial: tutorial.md
- API: api/modules.md

View File

@ -27,7 +27,7 @@
"scripts": {
"docsify:serve": "docsify serve docs"
},
"version": "4.0.0-alpha.1",
"version": "5.1.0",
"repository": {
"type": "git",
"url": "git+https://github.com/yanick/updux.git"