kdu-router 2.7.0 → 4.0.16-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +2 -2
- package/README.md +7 -41
- package/dist/kdu-router.cjs.js +3481 -0
- package/dist/kdu-router.cjs.prod.js +2759 -0
- package/dist/kdu-router.d.ts +1349 -0
- package/dist/kdu-router.esm-browser.js +3457 -0
- package/dist/kdu-router.esm-bundler.js +3475 -0
- package/dist/kdu-router.global.js +3650 -0
- package/dist/kdu-router.global.prod.js +6 -0
- package/ketur/attributes.json +32 -0
- package/ketur/tags.json +10 -0
- package/package.json +104 -65
- package/dist/kdu-router.common.js +0 -2507
- package/dist/kdu-router.esm.js +0 -2505
- package/dist/kdu-router.js +0 -2513
- package/dist/kdu-router.min.js +0 -6
- package/src/components/link.js +0 -138
- package/src/components/view.js +0 -96
- package/src/create-matcher.js +0 -201
- package/src/create-route-map.js +0 -165
- package/src/history/abstract.js +0 -51
- package/src/history/base.js +0 -328
- package/src/history/hash.js +0 -97
- package/src/history/html5.js +0 -69
- package/src/index.js +0 -235
- package/src/install.js +0 -52
- package/src/util/async.js +0 -18
- package/src/util/dom.js +0 -3
- package/src/util/location.js +0 -68
- package/src/util/params.js +0 -26
- package/src/util/path.js +0 -74
- package/src/util/push-state.js +0 -59
- package/src/util/query.js +0 -96
- package/src/util/resolve-components.js +0 -100
- package/src/util/route.js +0 -110
- package/src/util/scroll.js +0 -111
- package/src/util/warn.js +0 -17
- package/types/index.d.ts +0 -21
- package/types/kdu.d.ts +0 -23
- package/types/router.d.ts +0 -126
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,45 +1,11 @@
|
|
|
1
1
|
# kdu-router
|
|
2
2
|
|
|
3
|
-
> This is
|
|
4
|
-
|
|
5
|
-
### Introduction
|
|
6
|
-
|
|
7
|
-
`kdu-router` is the official router for Kdu.js. It deeply integrates with Kdu.js core to make building Single Page Applications with Kdu.js a breeze. Features include:
|
|
8
|
-
|
|
9
|
-
- Nested route/view mapping
|
|
10
|
-
- Modular, component-based router configuration
|
|
11
|
-
- Route params, query, wildcards
|
|
12
|
-
- View transition effects powered by Kdu.js' transition system
|
|
13
|
-
- Fine-grained navigation control
|
|
14
|
-
- Links with automatic active CSS classes
|
|
15
|
-
- HTML5 history mode or hash mode, with auto-fallback in IE9
|
|
16
|
-
- Customizable Scroll Behavior
|
|
17
|
-
|
|
18
|
-
Get started with the [documentation](http://khanhduy1407.github.io/kdu-router), or play with the [examples](https://github.com/khanhduy1407/kdu-router/tree/dev/examples) (see how to run them below).
|
|
19
|
-
|
|
20
|
-
### Development Setup
|
|
21
|
-
|
|
22
|
-
``` bash
|
|
23
|
-
# install deps
|
|
24
|
-
npm install
|
|
25
|
-
|
|
26
|
-
# build dist files
|
|
27
|
-
npm run build
|
|
28
|
-
|
|
29
|
-
# serve examples at localhost:8080
|
|
30
|
-
npm run dev
|
|
31
|
-
|
|
32
|
-
# lint & run all tests
|
|
33
|
-
npm test
|
|
34
|
-
|
|
35
|
-
# serve docs at localhost:4000 (requires global gitbook-cli)
|
|
36
|
-
npm run docs
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
## License
|
|
40
|
-
|
|
41
|
-
[MIT](http://opensource.org/licenses/MIT)
|
|
42
|
-
|
|
43
|
-
Copyright (c) 2022 NKDuy
|
|
3
|
+
> This is the repository for Kdu Router 4 (for Kdu 3)
|
|
44
4
|
|
|
5
|
+
## Quickstart
|
|
45
6
|
|
|
7
|
+
- Via CDN: `<script src="https://unpkg.com/kdu-router@4"></script>`
|
|
8
|
+
- Add it to an existing Kdu Project:
|
|
9
|
+
```bash
|
|
10
|
+
npm install kdu-router@4
|
|
11
|
+
```
|