Compare commits
No commits in common. "55376db1c2ed417831913c56e9ad335c34174a16" and "66c2b162db2903e81cc1cb034ee248394c66745b" have entirely different histories.
55376db1c2
...
66c2b162db
1
.gitignore
vendored
1
.gitignore
vendored
@ -13,4 +13,3 @@ pnpm-lock.yaml
|
|||||||
updux-5.0.0.tgz
|
updux-5.0.0.tgz
|
||||||
.envrc
|
.envrc
|
||||||
.task
|
.task
|
||||||
releases
|
|
||||||
|
@ -26,8 +26,3 @@ updux-*.tgz
|
|||||||
vitest.config.js
|
vitest.config.js
|
||||||
yarn-error.log
|
yarn-error.log
|
||||||
yarn.lock
|
yarn.lock
|
||||||
docs*
|
|
||||||
.envrc
|
|
||||||
contrib/*
|
|
||||||
typedoc.json
|
|
||||||
dist/tutorial/*
|
|
||||||
|
@ -6,21 +6,11 @@ vars:
|
|||||||
PARENT_BRANCH: main
|
PARENT_BRANCH: main
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
pack:
|
|
||||||
cmds:
|
|
||||||
- npm pack --pack-destination releases
|
|
||||||
|
|
||||||
build: tsc
|
build: tsc
|
||||||
|
|
||||||
checks:
|
checks:
|
||||||
deps: [test, build]
|
deps: [test, build]
|
||||||
|
|
||||||
prepare:
|
|
||||||
desc: build and bundle the package
|
|
||||||
cmds:
|
|
||||||
- { task: build }
|
|
||||||
- { task: pack }
|
|
||||||
|
|
||||||
integrate:
|
integrate:
|
||||||
deps: [checks]
|
deps: [checks]
|
||||||
cmds:
|
cmds:
|
||||||
|
8
guides/+page.js
Normal file
8
guides/+page.js
Normal 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');
|
||||||
|
}
|
47
guides/[...001]introduction.md
Normal file
47
guides/[...001]introduction.md
Normal 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
16
mkdocs.yml
Normal 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
|
@ -27,7 +27,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"docsify:serve": "docsify serve docs"
|
"docsify:serve": "docsify serve docs"
|
||||||
},
|
},
|
||||||
"version": "4.0.0-alpha.1",
|
"version": "5.1.0",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git+https://github.com/yanick/updux.git"
|
"url": "git+https://github.com/yanick/updux.git"
|
||||||
|
Loading…
Reference in New Issue
Block a user