@variousjs/create 2.0.1 → 3.0.1
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/.eslintignore +1 -1
- package/.gitignore.copy +1 -0
- package/package-lock.json.copy +7558 -3688
- package/package.json +20 -16
- package/package.json.copy +18 -14
- package/public/dist/app.js +2 -0
- package/public/dist/app.js.map +1 -0
- package/public/dist/card.js +2 -0
- package/public/dist/card.js.map +1 -0
- package/public/dist/next.js +2 -0
- package/public/dist/next.js.map +1 -0
- package/public/dist/top.js +2 -0
- package/public/dist/top.js.map +1 -0
- package/public/index.html +48 -0
- package/src/{entry → components/app}/actions.ts +2 -2
- package/src/components/app/container.less +45 -0
- package/src/{entry → components/app}/container.tsx +17 -20
- package/src/components/app/error.tsx +14 -0
- package/src/components/app/index.ts +16 -0
- package/src/{entry → components/app}/loader.tsx +1 -2
- package/src/components/card/index.tsx +42 -0
- package/src/components/next/index.tsx +54 -0
- package/src/components/top/index.tsx +29 -0
- package/src/declaration.d.ts +0 -26
- package/src/index.html +14 -0
- package/src/types.ts +2 -2
- package/tsconfig.json +4 -2
- package/various.config.js +85 -0
- package/webpack/{entry.js → app.js} +2 -2
- package/webpack/base.js +28 -39
- package/webpack/component.js +2 -2
- package/demo/dist/card.js +0 -2
- package/demo/dist/card.js.map +0 -1
- package/demo/dist/entry.js +0 -2
- package/demo/dist/entry.js.map +0 -1
- package/demo/dist/next.js +0 -2
- package/demo/dist/next.js.map +0 -1
- package/demo/dist/top.js +0 -2
- package/demo/dist/top.js.map +0 -1
- package/demo/index.html +0 -62
- package/src/components/card.less +0 -3
- package/src/components/card.tsx +0 -52
- package/src/components/next.tsx +0 -49
- package/src/components/top.tsx +0 -55
- package/src/entry/entry.less +0 -9
- package/src/entry/error.tsx +0 -19
- package/src/entry/index.ts +0 -5
- /package/src/{entry → components/app}/store.ts +0 -0
- /package/src/components/{i18n → next/i18n}/en.json +0 -0
- /package/src/components/{i18n → next/i18n}/zh.json +0 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React, { FC } from 'react'
|
|
2
|
+
import { ComponentProps, getConfig, ComponentNode } from '@variousjs/various'
|
|
3
|
+
import { useNavigate } from 'react-router-dom'
|
|
4
|
+
import { Config, Store } from '../../types'
|
|
5
|
+
|
|
6
|
+
export const H: FC<ComponentProps<Store>> = () => {
|
|
7
|
+
const $config = getConfig() as Config
|
|
8
|
+
const navigate = useNavigate()
|
|
9
|
+
|
|
10
|
+
const onRouterChange = (p: string) => {
|
|
11
|
+
navigate(p)
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
return (
|
|
15
|
+
<div>
|
|
16
|
+
{$config.links.map(({ path, name }) => (
|
|
17
|
+
<div className="btn" onClick={() => onRouterChange(path)} key={path}>
|
|
18
|
+
{name}
|
|
19
|
+
</div>
|
|
20
|
+
))}
|
|
21
|
+
</div>
|
|
22
|
+
)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export const S = ((props) => {
|
|
26
|
+
return (
|
|
27
|
+
<div>Srore: {props.$store.user.name}</div>
|
|
28
|
+
)
|
|
29
|
+
}) as ComponentNode<Store>
|
package/src/declaration.d.ts
CHANGED
|
@@ -1,29 +1,3 @@
|
|
|
1
|
-
// 这里直接配置 antd 依赖库,因为 antd 是 amd 依赖进来并不参与打包
|
|
2
|
-
// 不过也可以直接安装 antd 依赖,但只是用了 typescript 提示
|
|
3
|
-
declare module 'antd' {
|
|
4
|
-
import { ComponentType, Component } from 'react'
|
|
5
|
-
|
|
6
|
-
export const Spin: ComponentType<any>
|
|
7
|
-
export const Badge: ComponentType<any>
|
|
8
|
-
export const Alert: ComponentType<any>
|
|
9
|
-
export const Button: ComponentType<any>
|
|
10
|
-
export class Radio extends Component<any> {
|
|
11
|
-
static Group: ComponentType<any>
|
|
12
|
-
static Button: ComponentType<any>
|
|
13
|
-
}
|
|
14
|
-
export class Card extends Component<any> {
|
|
15
|
-
static Meta: ComponentType<any>
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export class Descriptions extends Component<any> {
|
|
19
|
-
static Item: ComponentType<any>
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export const message: {
|
|
23
|
-
info: (i: string) => void
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
1
|
declare module '*.less' {
|
|
28
2
|
const resource: Record<string, string>
|
|
29
3
|
export = resource
|
package/src/index.html
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<title> VariousJS </title>
|
|
6
|
+
<script>
|
|
7
|
+
var VARIOUS_CONFIG = <%= htmlWebpackPlugin.options.config %>
|
|
8
|
+
</script>
|
|
9
|
+
</head>
|
|
10
|
+
<body>
|
|
11
|
+
<div id="root"></div>
|
|
12
|
+
<script src="https://cdn.jsdelivr.net/npm/@variousjs/various@4.0.0/dist/loader.js"></script>
|
|
13
|
+
</body>
|
|
14
|
+
</html>
|
package/src/types.ts
CHANGED
package/tsconfig.json
CHANGED
|
@@ -16,7 +16,9 @@
|
|
|
16
16
|
"removeComments": true,
|
|
17
17
|
"stripInternal": true,
|
|
18
18
|
"resolveJsonModule": true,
|
|
19
|
-
"strictPropertyInitialization": false
|
|
19
|
+
"strictPropertyInitialization": false,
|
|
20
|
+
"paths": {
|
|
21
|
+
}
|
|
20
22
|
},
|
|
21
|
-
"exclude": ["dist", "docs"]
|
|
23
|
+
"exclude": ["dist", "docs"]
|
|
22
24
|
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
const path = require('path')
|
|
2
|
+
const fs = require('fs')
|
|
3
|
+
/** @type {import('@variousjs/registry').Packages} */
|
|
4
|
+
const registry = require('@variousjs/registry')
|
|
5
|
+
|
|
6
|
+
const components = fs
|
|
7
|
+
.readdirSync(path.resolve(__dirname, './src/components'))
|
|
8
|
+
.reduce((prev, cur) => {
|
|
9
|
+
return {
|
|
10
|
+
...prev,
|
|
11
|
+
[cur]: path.join(__dirname, `./src/components/${cur}`),
|
|
12
|
+
}
|
|
13
|
+
}, {})
|
|
14
|
+
|
|
15
|
+
const depsComponents = Object.keys(components).reduce((prev, cur) => {
|
|
16
|
+
return {
|
|
17
|
+
...prev,
|
|
18
|
+
[cur]: `./dist/${cur}.js`,
|
|
19
|
+
}
|
|
20
|
+
}, {})
|
|
21
|
+
|
|
22
|
+
const externals = []
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* @param {keyof typeof registry} name
|
|
26
|
+
*/
|
|
27
|
+
const getPackageSrc = (name) => {
|
|
28
|
+
const package = registry[name]
|
|
29
|
+
const version = package['dist-tags'].latest
|
|
30
|
+
const { dist, dependencies } = package.versions[version]
|
|
31
|
+
|
|
32
|
+
if (dependencies) {
|
|
33
|
+
return {
|
|
34
|
+
...Object.keys(dependencies)
|
|
35
|
+
.reduce((prev, cur) => ({ ...prev, ...getPackageSrc(cur) }), {}),
|
|
36
|
+
[name]: dist,
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return { [name]: dist }
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** @type {import('@variousjs/various').Config} */
|
|
43
|
+
const config = {
|
|
44
|
+
env: 'development',
|
|
45
|
+
dependencies: {
|
|
46
|
+
...getPackageSrc('react'),
|
|
47
|
+
...getPackageSrc('react-dom'),
|
|
48
|
+
...getPackageSrc('react-router-dom'),
|
|
49
|
+
...depsComponents,
|
|
50
|
+
},
|
|
51
|
+
pages: [
|
|
52
|
+
{
|
|
53
|
+
path: '/',
|
|
54
|
+
components: ['card', 'next']
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
path: '/next/:id',
|
|
58
|
+
components: ['card', 'next']
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
path: '/error',
|
|
62
|
+
components: ['error'],
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
links: [
|
|
66
|
+
{
|
|
67
|
+
name: 'Home',
|
|
68
|
+
path: '/',
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
name: 'Next',
|
|
72
|
+
path: '/next/5',
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: 'Error',
|
|
76
|
+
path: '/error',
|
|
77
|
+
},
|
|
78
|
+
],
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
module.exports = {
|
|
82
|
+
config,
|
|
83
|
+
components,
|
|
84
|
+
externals,
|
|
85
|
+
}
|
package/webpack/base.js
CHANGED
|
@@ -1,62 +1,51 @@
|
|
|
1
1
|
const path = require('path')
|
|
2
|
+
const HtmlWebpackPlugin = require('html-webpack-plugin')
|
|
3
|
+
const variousConfig = require('../various.config')
|
|
4
|
+
|
|
5
|
+
const { NODE_ENV } = process.env
|
|
2
6
|
|
|
3
7
|
const config = {
|
|
8
|
+
plugins: [new HtmlWebpackPlugin({
|
|
9
|
+
template: path.resolve(__dirname, '../src/index.html'),
|
|
10
|
+
filename: path.resolve(__dirname, '../public/index.html'),
|
|
11
|
+
config: JSON.stringify(variousConfig.config, null, 2),
|
|
12
|
+
inject: false,
|
|
13
|
+
})],
|
|
4
14
|
stats: 'minimal',
|
|
5
|
-
entry:
|
|
6
|
-
entry: path.join(__dirname, '../src/entry'),
|
|
7
|
-
|
|
8
|
-
// 组件入口定义
|
|
9
|
-
card: path.join(__dirname, '../src/components/card.tsx'),
|
|
10
|
-
next: path.join(__dirname, '../src/components/next.tsx'),
|
|
11
|
-
top: path.join(__dirname, '../src/components/top.tsx'),
|
|
12
|
-
},
|
|
15
|
+
entry: variousConfig.components,
|
|
13
16
|
output: {
|
|
14
|
-
path: path.resolve(__dirname, '../
|
|
17
|
+
path: path.resolve(__dirname, '../public/dist'),
|
|
15
18
|
publicPath: '/dist/',
|
|
16
19
|
filename: '[name].js',
|
|
17
20
|
libraryTarget: 'amd',
|
|
18
21
|
},
|
|
19
22
|
target: ['web', 'es5'],
|
|
20
|
-
externals:
|
|
21
|
-
|
|
22
|
-
react
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
},
|
|
30
|
-
'react-router-dom': {
|
|
31
|
-
root: 'ReactRouterDOM',
|
|
32
|
-
amd: 'react-router-dom',
|
|
33
|
-
},
|
|
34
|
-
'@variousjs/various': {
|
|
35
|
-
root: 'various',
|
|
36
|
-
amd: '@variousjs/various',
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
// 自定义
|
|
40
|
-
antd: {
|
|
41
|
-
root: 'antd',
|
|
42
|
-
amd: 'antd',
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
mode: 'production',
|
|
23
|
+
externals: [
|
|
24
|
+
'react',
|
|
25
|
+
'react-dom',
|
|
26
|
+
'react-dom/client',
|
|
27
|
+
'react-router-dom',
|
|
28
|
+
'@variousjs/various',
|
|
29
|
+
...variousConfig.externals,
|
|
30
|
+
],
|
|
31
|
+
mode: NODE_ENV || 'production',
|
|
46
32
|
devtool: 'source-map',
|
|
47
33
|
resolve: {
|
|
48
34
|
// 必须加上 .js,不然 webpack dev server 会报错找不到模块
|
|
49
35
|
extensions: ['.js', '.ts', '.tsx'],
|
|
36
|
+
alias: {
|
|
37
|
+
'@': path.resolve(__dirname, '../src/shadcn-ui'),
|
|
38
|
+
},
|
|
50
39
|
},
|
|
51
40
|
devServer: {
|
|
52
41
|
allowedHosts: 'all',
|
|
53
42
|
port: 2333,
|
|
54
43
|
host: '0.0.0.0',
|
|
55
44
|
static: {
|
|
56
|
-
directory: path.join(__dirname, '../
|
|
45
|
+
directory: path.join(__dirname, '../public'),
|
|
57
46
|
},
|
|
58
47
|
// 监听文件构建后重新刷新页面,包括 html 文件
|
|
59
|
-
watchFiles: ['
|
|
48
|
+
watchFiles: ['public'],
|
|
60
49
|
},
|
|
61
50
|
module: {
|
|
62
51
|
rules: [
|
|
@@ -74,7 +63,7 @@ const config = {
|
|
|
74
63
|
{
|
|
75
64
|
loader: 'css-loader',
|
|
76
65
|
options: {
|
|
77
|
-
sourceMap:
|
|
66
|
+
sourceMap: NODE_ENV === 'development',
|
|
78
67
|
modules: {
|
|
79
68
|
localIdentName: '[local]_[hash:base64:5]',
|
|
80
69
|
},
|
|
@@ -83,7 +72,7 @@ const config = {
|
|
|
83
72
|
{
|
|
84
73
|
loader: 'less-loader',
|
|
85
74
|
options: {
|
|
86
|
-
sourceMap:
|
|
75
|
+
sourceMap: NODE_ENV === 'development',
|
|
87
76
|
lessOptions: {
|
|
88
77
|
javascriptEnabled: true,
|
|
89
78
|
},
|
package/webpack/component.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
const base = require('./base')
|
|
2
2
|
|
|
3
3
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
4
|
-
const {
|
|
4
|
+
const { app, ...rest } = base.entry
|
|
5
5
|
const config = {
|
|
6
6
|
...base,
|
|
7
7
|
// 监听变化,重新构建
|
|
8
8
|
watch: true,
|
|
9
9
|
|
|
10
|
-
// 只构建除主
|
|
10
|
+
// 只构建除主 app 外所有 component
|
|
11
11
|
entry: rest,
|
|
12
12
|
}
|
|
13
13
|
|
package/demo/dist/card.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
define(["react","react-router-dom","antd"],(function(e,t,n){return function(){"use strict";var r={233:function(e,t,n){var r=n(537),o=n.n(r),a=n(645),c=n.n(a)()(o());c.push([e.id,".container_Lng5c {\n margin-top: 30px;\n}\n","",{version:3,sources:["webpack://./src/components/card.less"],names:[],mappings:"AAAA;EACE,gBAAA;AACF",sourcesContent:[".container {\n margin-top: 30px;\n}\n"],sourceRoot:""}]),c.locals={container:"container_Lng5c"},t.Z=c},645:function(e){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,o,a){"string"==typeof e&&(e=[[null,e,void 0]]);var c={};if(r)for(var i=0;i<this.length;i++){var s=this[i][0];null!=s&&(c[s]=!0)}for(var u=0;u<e.length;u++){var l=[].concat(e[u]);r&&c[l[0]]||(void 0!==a&&(void 0===l[5]||(l[1]="@layer".concat(l[5].length>0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=a),n&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=n):l[2]=n),o&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=o):l[4]="".concat(o)),t.push(l))}},t}},537:function(e){e.exports=function(e){var t=e[1],n=e[3];if(!n)return t;if("function"==typeof btoa){var r=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),o="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),a="/*# ".concat(o," */"),c=n.sources.map((function(e){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(e," */")}));return[t].concat(c).concat([a]).join("\n")}return[t].join("\n")}},379:function(e){var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var a={},c=[],i=0;i<e.length;i++){var s=e[i],u=r.base?s[0]+r.base:s[0],l=a[u]||0,p="".concat(u," ").concat(l);a[u]=l+1;var f=n(p),d={css:s[1],media:s[2],sourceMap:s[3],supports:s[4],layer:s[5]};if(-1!==f)t[f].references++,t[f].updater(d);else{var m=o(d,r);r.byIndex=i,t.splice(i,0,{identifier:p,updater:m,references:1})}c.push(p)}return c}function o(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,o){var a=r(e=e||[],o=o||{});return function(e){e=e||[];for(var c=0;c<a.length;c++){var i=n(a[c]);t[i].references--}for(var s=r(e,o),u=0;u<a.length;u++){var l=n(a[u]);0===t[l].references&&(t[l].updater(),t.splice(l,1))}a=s}}},569:function(e){var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},216:function(e){e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},565:function(e,t,n){e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},795:function(e){e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,o&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var a=n.sourceMap;a&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},589:function(e){e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},161:function(t){t.exports=e},439:function(e){e.exports=t},937:function(e){e.exports=n}},o={};function a(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={id:e,exports:{}};return r[e](n,n.exports,a),n.exports}a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,{a:t}),t},a.d=function(e,t){for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nc=void 0;var c={};return function(){a.r(c),a.d(c,{default:function(){return A}});var e=a(161),t=a.n(e),n=a(439),r=a(937),o=a(379),i=a.n(o),s=a(795),u=a.n(s),l=a(569),p=a.n(l),f=a(565),d=a.n(f),m=a(216),v=a.n(m),h=a(589),y=a.n(h),g=a(233),b={};b.styleTagTransform=y(),b.setAttributes=d(),b.insert=p().bind(null,"head"),b.domAPI=u(),b.insertStyleElement=v(),i()(g.Z,b);var x=g.Z&&g.Z.locals?g.Z.locals:void 0;const C=e=>{const{id:o}=(0,n.useParams)();return t().createElement("div",{className:x.container},t().createElement(r.Card,{hoverable:!0,style:{width:240},cover:t().createElement("img",{alt:"example",src:"https://os.alipayobjects.com/rmsportal/QBnOOoLaAfKPirc.png"}),actions:[o?t().createElement(r.Button,{key:"next",onClick:()=>e.$dispatch("next","setValue",1)},"Next"):t().createElement(r.Button,{key:"locale",onClick:()=>e.$dispatch("store","setLocale","zh"===e.$store.locale?"en":"zh")},"locale"),t().createElement(r.Button,{key:"store",type:"primary",onClick:async()=>{await e.$dispatch("store","setName",`${Math.random().toFixed(2)}`),r.message.info("changed")}},"Store")]},t().createElement(r.Card.Meta,{title:"Route Params",description:o||"none"})))};C.getName=e=>r.message.info(e);var A=C}(),c}()}));
|
|
2
|
-
//# sourceMappingURL=card.js.map
|
package/demo/dist/card.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"card.js","mappings":"qJAGIA,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,+CAAgD,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,wCAAwC,MAAQ,GAAG,SAAW,uBAAuB,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,OAAD,CACE3B,IAAI,QACJgC,KAAK,UACLJ,QAASK,gBACDjB,EAAMa,UAAU,QAAS,UAAY,GAAEK,KAAKC,SAASC,QAAQ,MACnEC,EAAAA,QAAAA,KAAa,UAAb,GALJ,WAYF,kBAAC,EAAAjB,KAAA,KAAD,CACEkB,MAAM,eACNC,YAAavJ,GAAM,UAhC3B,EAuCF+H,EAAEyB,QAAW3E,GAAMwE,EAAAA,QAAAA,KAAaxE,GAEhC,O","sources":["webpack://@variousjs/create/./src/components/card.less","webpack://@variousjs/create/./node_modules/css-loader/dist/runtime/api.js","webpack://@variousjs/create/./node_modules/css-loader/dist/runtime/sourceMaps.js","webpack://@variousjs/create/./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js","webpack://@variousjs/create/./node_modules/style-loader/dist/runtime/insertBySelector.js","webpack://@variousjs/create/./node_modules/style-loader/dist/runtime/insertStyleElement.js","webpack://@variousjs/create/./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js","webpack://@variousjs/create/./node_modules/style-loader/dist/runtime/styleDomAPI.js","webpack://@variousjs/create/./node_modules/style-loader/dist/runtime/styleTagTransform.js","webpack://@variousjs/create/external amd {\"root\":\"React\",\"amd\":\"react\"}","webpack://@variousjs/create/external amd {\"root\":\"ReactRouterDOM\",\"amd\":\"react-router-dom\"}","webpack://@variousjs/create/external amd {\"root\":\"antd\",\"amd\":\"antd\"}","webpack://@variousjs/create/webpack/bootstrap","webpack://@variousjs/create/webpack/runtime/compat get default export","webpack://@variousjs/create/webpack/runtime/define property getters","webpack://@variousjs/create/webpack/runtime/hasOwnProperty shorthand","webpack://@variousjs/create/webpack/runtime/make namespace object","webpack://@variousjs/create/webpack/runtime/nonce","webpack://@variousjs/create/./src/components/card.less?0fd9","webpack://@variousjs/create/./src/components/card.tsx"],"sourcesContent":["// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".container_Lng5c {\\n margin-top: 30px;\\n}\\n\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/components/card.less\"],\"names\":[],\"mappings\":\"AAAA;EACE,gBAAA;AACF\",\"sourcesContent\":[\".container {\\n margin-top: 30px;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"container\": \"container_Lng5c\"\n};\nexport default ___CSS_LOADER_EXPORT___;\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n\n content += cssWithMappingToString(item);\n\n if (needLayer) {\n content += \"}\";\n }\n\n if (item[2]) {\n content += \"}\";\n }\n\n if (item[4]) {\n content += \"}\";\n }\n\n return content;\n }).join(\"\");\n }; // import a list of modules into the list\n\n\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n\n var alreadyImportedModules = {};\n\n if (dedupe) {\n for (var _i = 0; _i < this.length; _i++) {\n var id = this[_i][0];\n\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n\n for (var _i2 = 0; _i2 < modules.length; _i2++) {\n var item = [].concat(modules[_i2]);\n\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n\n list.push(item);\n }\n };\n\n return list;\n};","\"use strict\";\n\nmodule.exports = function (item) {\n var content = item[1];\n var cssMapping = item[3];\n\n if (!cssMapping) {\n return content;\n }\n\n if (typeof btoa === \"function\") {\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n var sourceMapping = \"/*# \".concat(data, \" */\");\n var sourceURLs = cssMapping.sources.map(function (source) {\n return \"/*# sourceURL=\".concat(cssMapping.sourceRoot || \"\").concat(source, \" */\");\n });\n return [content].concat(sourceURLs).concat([sourceMapping]).join(\"\\n\");\n }\n\n return [content].join(\"\\n\");\n};","\"use strict\";\n\nvar stylesInDOM = [];\n\nfunction getIndexByIdentifier(identifier) {\n var result = -1;\n\n for (var i = 0; i < stylesInDOM.length; i++) {\n if (stylesInDOM[i].identifier === identifier) {\n result = i;\n break;\n }\n }\n\n return result;\n}\n\nfunction modulesToDom(list, options) {\n var idCountMap = {};\n var identifiers = [];\n\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var count = idCountMap[id] || 0;\n var identifier = \"\".concat(id, \" \").concat(count);\n idCountMap[id] = count + 1;\n var indexByIdentifier = getIndexByIdentifier(identifier);\n var obj = {\n css: item[1],\n media: item[2],\n sourceMap: item[3],\n supports: item[4],\n layer: item[5]\n };\n\n if (indexByIdentifier !== -1) {\n stylesInDOM[indexByIdentifier].references++;\n stylesInDOM[indexByIdentifier].updater(obj);\n } else {\n var updater = addElementStyle(obj, options);\n options.byIndex = i;\n stylesInDOM.splice(i, 0, {\n identifier: identifier,\n updater: updater,\n references: 1\n });\n }\n\n identifiers.push(identifier);\n }\n\n return identifiers;\n}\n\nfunction addElementStyle(obj, options) {\n var api = options.domAPI(options);\n api.update(obj);\n\n var updater = function updater(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {\n return;\n }\n\n api.update(obj = newObj);\n } else {\n api.remove();\n }\n };\n\n return updater;\n}\n\nmodule.exports = function (list, options) {\n options = options || {};\n list = list || [];\n var lastIdentifiers = modulesToDom(list, options);\n return function update(newList) {\n newList = newList || [];\n\n for (var i = 0; i < lastIdentifiers.length; i++) {\n var identifier = lastIdentifiers[i];\n var index = getIndexByIdentifier(identifier);\n stylesInDOM[index].references--;\n }\n\n var newLastIdentifiers = modulesToDom(newList, options);\n\n for (var _i = 0; _i < lastIdentifiers.length; _i++) {\n var _identifier = lastIdentifiers[_i];\n\n var _index = getIndexByIdentifier(_identifier);\n\n if (stylesInDOM[_index].references === 0) {\n stylesInDOM[_index].updater();\n\n stylesInDOM.splice(_index, 1);\n }\n }\n\n lastIdentifiers = newLastIdentifiers;\n };\n};","\"use strict\";\n\nvar memo = {};\n/* istanbul ignore next */\n\nfunction getTarget(target) {\n if (typeof memo[target] === \"undefined\") {\n var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself\n\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n\n memo[target] = styleTarget;\n }\n\n return memo[target];\n}\n/* istanbul ignore next */\n\n\nfunction insertBySelector(insert, style) {\n var target = getTarget(insert);\n\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n\n target.appendChild(style);\n}\n\nmodule.exports = insertBySelector;","\"use strict\";\n\n/* istanbul ignore next */\nfunction insertStyleElement(options) {\n var element = document.createElement(\"style\");\n options.setAttributes(element, options.attributes);\n options.insert(element, options.options);\n return element;\n}\n\nmodule.exports = insertStyleElement;","\"use strict\";\n\n/* istanbul ignore next */\nfunction setAttributesWithoutAttributes(styleElement) {\n var nonce = typeof __webpack_nonce__ !== \"undefined\" ? __webpack_nonce__ : null;\n\n if (nonce) {\n styleElement.setAttribute(\"nonce\", nonce);\n }\n}\n\nmodule.exports = setAttributesWithoutAttributes;","\"use strict\";\n\n/* istanbul ignore next */\nfunction apply(styleElement, options, obj) {\n var css = \"\";\n\n if (obj.supports) {\n css += \"@supports (\".concat(obj.supports, \") {\");\n }\n\n if (obj.media) {\n css += \"@media \".concat(obj.media, \" {\");\n }\n\n var needLayer = typeof obj.layer !== \"undefined\";\n\n if (needLayer) {\n css += \"@layer\".concat(obj.layer.length > 0 ? \" \".concat(obj.layer) : \"\", \" {\");\n }\n\n css += obj.css;\n\n if (needLayer) {\n css += \"}\";\n }\n\n if (obj.media) {\n css += \"}\";\n }\n\n if (obj.supports) {\n css += \"}\";\n }\n\n var sourceMap = obj.sourceMap;\n\n if (sourceMap && typeof btoa !== \"undefined\") {\n css += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \" */\");\n } // For old IE\n\n /* istanbul ignore if */\n\n\n options.styleTagTransform(css, styleElement, options.options);\n}\n\nfunction removeStyleElement(styleElement) {\n // istanbul ignore if\n if (styleElement.parentNode === null) {\n return false;\n }\n\n styleElement.parentNode.removeChild(styleElement);\n}\n/* istanbul ignore next */\n\n\nfunction domAPI(options) {\n var styleElement = options.insertStyleElement(options);\n return {\n update: function update(obj) {\n apply(styleElement, options, obj);\n },\n remove: function remove() {\n removeStyleElement(styleElement);\n }\n };\n}\n\nmodule.exports = domAPI;","\"use strict\";\n\n/* istanbul ignore next */\nfunction styleTagTransform(css, styleElement) {\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = css;\n } else {\n while (styleElement.firstChild) {\n styleElement.removeChild(styleElement.firstChild);\n }\n\n styleElement.appendChild(document.createTextNode(css));\n }\n}\n\nmodule.exports = styleTagTransform;","module.exports = __WEBPACK_EXTERNAL_MODULE__161__;","module.exports = __WEBPACK_EXTERNAL_MODULE__439__;","module.exports = __WEBPACK_EXTERNAL_MODULE__937__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nc = undefined;","\n import API from \"!../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!../../node_modules/less-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./card.less\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!../../node_modules/less-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./card.less\";\n export default content && content.locals ? content.locals : undefined;\n","import React, { FC } from 'react'\nimport { ComponentProps, Invoker } from '@variousjs/various'\nimport { useParams } from 'react-router-dom'\nimport { Card, Button, message } from 'antd'\nimport { Store } from '../types'\nimport csses from './card.less'\n\nconst H: FC<ComponentProps<Store>> & { getName: Invoker } = (props) => {\n const { id } = useParams<{ id: string }>()\n\n return (\n <div className={csses.container}>\n <Card\n hoverable\n style={{ width: 240 }}\n cover={<img alt=\"example\" src=\"https://os.alipayobjects.com/rmsportal/QBnOOoLaAfKPirc.png\" />}\n actions={[\n id ? <Button\n key=\"next\"\n onClick={() => props.$dispatch('next', 'setValue', 1)}\n >\n Next\n </Button> : <Button\n key=\"locale\"\n onClick={() => props.$dispatch('store', 'setLocale', props.$store.locale === 'zh' ? 'en' : 'zh')}\n >\n locale\n </Button>,\n <Button\n key=\"store\"\n type=\"primary\"\n onClick={async () => {\n await props.$dispatch('store', 'setName', `${Math.random().toFixed(2)}`)\n message.info('changed')\n }}\n >\n Store\n </Button>\n ]}\n >\n <Card.Meta\n title=\"Route Params\"\n description={id || 'none'}\n />\n </Card>\n </div>\n )\n}\n\nH.getName = (e) => message.info(e)\n\nexport default H\n"],"names":["___CSS_LOADER_EXPORT___","push","module","id","locals","exports","cssWithMappingToString","list","toString","this","map","item","content","needLayer","concat","length","join","i","modules","media","dedupe","supports","layer","undefined","alreadyImportedModules","_i","_i2","cssMapping","btoa","base64","unescape","encodeURIComponent","JSON","stringify","data","sourceMapping","sourceURLs","sources","source","sourceRoot","stylesInDOM","getIndexByIdentifier","identifier","result","modulesToDom","options","idCountMap","identifiers","base","count","indexByIdentifier","obj","css","sourceMap","references","updater","addElementStyle","byIndex","splice","api","domAPI","update","newObj","remove","lastIdentifiers","newList","index","newLastIdentifiers","_index","memo","insert","style","target","styleTarget","document","querySelector","window","HTMLIFrameElement","contentDocument","head","e","getTarget","Error","appendChild","element","createElement","setAttributes","attributes","styleElement","nonce","setAttribute","insertStyleElement","styleTagTransform","apply","parentNode","removeChild","removeStyleElement","styleSheet","cssText","firstChild","createTextNode","__WEBPACK_EXTERNAL_MODULE__161__","__WEBPACK_EXTERNAL_MODULE__439__","__WEBPACK_EXTERNAL_MODULE__937__","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","nc","H","props","useParams","className","csses","Card","hoverable","width","cover","alt","src","actions","Button","onClick","$dispatch","$store","locale","type","async","Math","random","toFixed","message","title","description","getName"],"sourceRoot":""}
|
package/demo/dist/entry.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
define(["react","@variousjs/various","react-router-dom","antd"],(function(e,n,t,r){return function(){"use strict";var o={674:function(e,n,t){var r=t(537),o=t.n(r),a=t(645),c=t.n(a)()(o());c.push([e.id,".container_moxlt {\n background: #fff;\n padding: 50px;\n}\n.top__WfL2 {\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n","",{version:3,sources:["webpack://./src/entry/entry.less"],names:[],mappings:"AAAA;EACE,gBAAA;EACA,aAAA;AACF;AACA;EACE,aAAA;EACA,mBAAA;EACA,8BAAA;AACF",sourcesContent:[".container {\n background: #fff;\n padding: 50px;\n}\n.top {\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n"],sourceRoot:""}]),c.locals={container:"container_moxlt",top:"top__WfL2"},n.Z=c},645:function(e){e.exports=function(e){var n=[];return n.toString=function(){return this.map((function(n){var t="",r=void 0!==n[5];return n[4]&&(t+="@supports (".concat(n[4],") {")),n[2]&&(t+="@media ".concat(n[2]," {")),r&&(t+="@layer".concat(n[5].length>0?" ".concat(n[5]):""," {")),t+=e(n),r&&(t+="}"),n[2]&&(t+="}"),n[4]&&(t+="}"),t})).join("")},n.i=function(e,t,r,o,a){"string"==typeof e&&(e=[[null,e,void 0]]);var c={};if(r)for(var i=0;i<this.length;i++){var s=this[i][0];null!=s&&(c[s]=!0)}for(var u=0;u<e.length;u++){var l=[].concat(e[u]);r&&c[l[0]]||(void 0!==a&&(void 0===l[5]||(l[1]="@layer".concat(l[5].length>0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=a),t&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=t):l[2]=t),o&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=o):l[4]="".concat(o)),n.push(l))}},n}},537:function(e){e.exports=function(e){var n=e[1],t=e[3];if(!t)return n;if("function"==typeof btoa){var r=btoa(unescape(encodeURIComponent(JSON.stringify(t)))),o="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),a="/*# ".concat(o," */"),c=t.sources.map((function(e){return"/*# sourceURL=".concat(t.sourceRoot||"").concat(e," */")}));return[n].concat(c).concat([a]).join("\n")}return[n].join("\n")}},379:function(e){var n=[];function t(e){for(var t=-1,r=0;r<n.length;r++)if(n[r].identifier===e){t=r;break}return t}function r(e,r){for(var a={},c=[],i=0;i<e.length;i++){var s=e[i],u=r.base?s[0]+r.base:s[0],l=a[u]||0,p="".concat(u," ").concat(l);a[u]=l+1;var f=t(p),d={css:s[1],media:s[2],sourceMap:s[3],supports:s[4],layer:s[5]};if(-1!==f)n[f].references++,n[f].updater(d);else{var m=o(d,r);r.byIndex=i,n.splice(i,0,{identifier:p,updater:m,references:1})}c.push(p)}return c}function o(e,n){var t=n.domAPI(n);return t.update(e),function(n){if(n){if(n.css===e.css&&n.media===e.media&&n.sourceMap===e.sourceMap&&n.supports===e.supports&&n.layer===e.layer)return;t.update(e=n)}else t.remove()}}e.exports=function(e,o){var a=r(e=e||[],o=o||{});return function(e){e=e||[];for(var c=0;c<a.length;c++){var i=t(a[c]);n[i].references--}for(var s=r(e,o),u=0;u<a.length;u++){var l=t(a[u]);0===n[l].references&&(n[l].updater(),n.splice(l,1))}a=s}}},569:function(e){var n={};e.exports=function(e,t){var r=function(e){if(void 0===n[e]){var t=document.querySelector(e);if(window.HTMLIFrameElement&&t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(e){t=null}n[e]=t}return n[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(t)}},216:function(e){e.exports=function(e){var n=document.createElement("style");return e.setAttributes(n,e.attributes),e.insert(n,e.options),n}},565:function(e,n,t){e.exports=function(e){var n=t.nc;n&&e.setAttribute("nonce",n)}},795:function(e){e.exports=function(e){var n=e.insertStyleElement(e);return{update:function(t){!function(e,n,t){var r="";t.supports&&(r+="@supports (".concat(t.supports,") {")),t.media&&(r+="@media ".concat(t.media," {"));var o=void 0!==t.layer;o&&(r+="@layer".concat(t.layer.length>0?" ".concat(t.layer):""," {")),r+=t.css,o&&(r+="}"),t.media&&(r+="}"),t.supports&&(r+="}");var a=t.sourceMap;a&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),n.styleTagTransform(r,e,n.options)}(n,e,t)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)}}}},589:function(e){e.exports=function(e,n){if(n.styleSheet)n.styleSheet.cssText=e;else{for(;n.firstChild;)n.removeChild(n.firstChild);n.appendChild(document.createTextNode(e))}}},161:function(n){n.exports=e},439:function(e){e.exports=t},937:function(e){e.exports=r},437:function(e){e.exports=n}},a={};function c(e){var n=a[e];if(void 0!==n)return n.exports;var t=a[e]={id:e,exports:{}};return o[e](t,t.exports,c),t.exports}c.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(n,{a:n}),n},c.d=function(e,n){for(var t in n)c.o(n,t)&&!c.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},c.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},c.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.nc=void 0;var i={};return function(){c.r(i),c.d(i,{Container:function(){return j},Error:function(){return M},Loader:function(){return T},actions:function(){return e},store:function(){return n}});var e={async setName({emit:e,getStore:n},t){await new Promise((e=>setTimeout(e,1e3)));const{user:r}=n();r.name=t,e({user:r})},async getName({getStore:e}){const{user:n}=e();return n.name},async setLocale({emit:e},n){e({locale:n})}},n={user:{name:"various"},locale:"zh"};function t(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var r=c(161),o=c.n(r),a=c(437),s=c(439),u=c(379),l=c.n(u),p=c(795),f=c.n(p),d=c(569),m=c.n(d),v=c(565),y=c.n(v),g=c(216),h=c.n(g),A=c(589),b=c.n(A),x=c(674),E={};E.styleTagTransform=b(),E.setAttributes=y(),E.insert=m().bind(null,"head"),E.domAPI=f(),E.insertStyleElement=h(),l()(x.Z,E);var C=x.Z&&x.Z.locals?x.Z.locals:void 0;class S extends r.Component{constructor(...e){super(...e),t(this,"config",(0,a.getConfig)()),t(this,"top",(0,r.memo)((0,a.createComponent)("top"))),t(this,"components",this.config.pages.reduce(((e,n)=>(n.components.forEach((n=>{e[n]=(0,r.memo)((0,a.createComponent)(n))})),e)),{}))}render(){const e=this.top,n=this.config;return o().createElement("div",{className:C.container},o().createElement(s.HashRouter,null,o().createElement("div",{className:C.top},o().createElement(e,null)),n.pages.map((({path:e,components:n})=>o().createElement(s.Route,{key:Array.isArray(e)?e.join():e,exact:!0,path:e,component:()=>n.map((e=>{const n=this.components[e];return o().createElement("div",{key:e,style:{display:"inline-block",width:300,verticalAlign:"top"}},o().createElement(n,null))}))})))))}}var j=S,w=c(937);function T(){return o().createElement(w.Spin,null)}var M=({$reload:e,$type:n,$message:t})=>o().createElement(o().Fragment,null,o().createElement(w.Alert,{message:"Error",description:`[${n}]: ${t||"组件错误"}`,type:"error",style:{marginTop:30}}),e&&o().createElement(w.Button,{onClick:e},"刷新"))}(),i}()}));
|
|
2
|
-
//# sourceMappingURL=entry.js.map
|
package/demo/dist/entry.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"entry.js","mappings":"4KAGIA,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,+JAAgK,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,oCAAoC,MAAQ,GAAG,SAAW,2EAA2E,eAAiB,CAAC,oJAAoJ,WAAa,MAE5hBH,EAAwBI,OAAS,CAChC,UAAa,kBACb,IAAO,aAER,K,kBCLAF,EAAOG,QAAU,SAAUC,GACzB,IA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C,EAAAA,UAAU,+CACvBC,EAAAA,EAAAA,cADuB,cAG1B3E,EAAAA,EAAAA,OAAK4E,EAAAA,EAAAA,iBAAgB,SAHK,oBAKnBxI,KAAKyI,OAAOC,MAAMC,QAAO,CAACC,EAAMC,KAC3CA,EAAQC,WAAWC,SAAS7I,IAC1B0I,EAAK1I,IAAQ0D,EAAAA,EAAAA,OAAK4E,EAAAA,EAAAA,iBAAgBtI,GAAlC,IAEK0I,IACN,CAAC,GAV4B,CAYhCI,SACE,MAAMC,EAAMjJ,KAAKkJ,IACXC,EAAUnJ,KAAKyI,OAErB,OACE,yBAAKW,UAAWC,EAAAA,WACd,kBAAC,aAAD,KACE,yBAAKD,UAAWC,EAAAA,KACd,kBAACJ,EAAD,OAGAE,EAAQT,MAAMzI,KAAI,EAAGqJ,OAAMR,gBAcvB,kBAAC,EAAAS,MAAD,CACE5C,IAAK6C,MAAMC,QAAQH,GAAQA,EAAK/I,OAAS+I,EACzCI,OAAK,EACLJ,KAAMA,EACNK,UAjBO,IAAMb,EAAW7I,KAAK+H,IAC/B,MAAM4B,EAAI5J,KAAK8I,WAAWd,GAC1B,OACE,yBACErB,IAAKqB,EACLlE,MAAO,CAAE+F,QAAS,eAAgBC,MAAO,IAAKC,cAAe,QAE7D,kBAACH,EAAD,MALJ,SAuBb,EAGH,Q,SCvDe,SAASI,IACtB,OACE,kBAAC,EAAAC,KAAD,KAEH,CCWD,MAduC,EAAGC,UAASC,QAAOC,cACxD,oCACE,kBAAC,EAAAC,MAAD,CACEC,QAAQ,QACRC,YAAc,IAAGJ,OAAWC,GAAY,SACxCI,KAAK,QACL1G,MAAO,CAAE2G,UAAW,MAGpBP,GAAW,kBAAC,EAAAQ,OAAD,CAAQC,QAAST,GAAjB,M","sources":["webpack://@variousjs/create/./src/entry/entry.less","webpack://@variousjs/create/./node_modules/css-loader/dist/runtime/api.js","webpack://@variousjs/create/./node_modules/css-loader/dist/runtime/sourceMaps.js","webpack://@variousjs/create/./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js","webpack://@variousjs/create/./node_modules/style-loader/dist/runtime/insertBySelector.js","webpack://@variousjs/create/./node_modules/style-loader/dist/runtime/insertStyleElement.js","webpack://@variousjs/create/./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js","webpack://@variousjs/create/./node_modules/style-loader/dist/runtime/styleDomAPI.js","webpack://@variousjs/create/./node_modules/style-loader/dist/runtime/styleTagTransform.js","webpack://@variousjs/create/external amd {\"root\":\"React\",\"amd\":\"react\"}","webpack://@variousjs/create/external amd {\"root\":\"ReactRouterDOM\",\"amd\":\"react-router-dom\"}","webpack://@variousjs/create/external amd {\"root\":\"antd\",\"amd\":\"antd\"}","webpack://@variousjs/create/external amd {\"root\":\"various\",\"amd\":\"@variousjs/various\"}","webpack://@variousjs/create/webpack/bootstrap","webpack://@variousjs/create/webpack/runtime/compat get default export","webpack://@variousjs/create/webpack/runtime/define property getters","webpack://@variousjs/create/webpack/runtime/hasOwnProperty shorthand","webpack://@variousjs/create/webpack/runtime/make namespace object","webpack://@variousjs/create/webpack/runtime/nonce","webpack://@variousjs/create/./src/entry/actions.ts","webpack://@variousjs/create/./src/entry/store.ts","webpack://@variousjs/create/./node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://@variousjs/create/./src/entry/entry.less?fe22","webpack://@variousjs/create/./src/entry/container.tsx","webpack://@variousjs/create/./src/entry/loader.tsx","webpack://@variousjs/create/./src/entry/error.tsx"],"sourcesContent":["// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".container_moxlt {\\n background: #fff;\\n padding: 50px;\\n}\\n.top__WfL2 {\\n display: flex;\\n align-items: center;\\n justify-content: space-between;\\n}\\n\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/entry/entry.less\"],\"names\":[],\"mappings\":\"AAAA;EACE,gBAAA;EACA,aAAA;AACF;AACA;EACE,aAAA;EACA,mBAAA;EACA,8BAAA;AACF\",\"sourcesContent\":[\".container {\\n background: #fff;\\n padding: 50px;\\n}\\n.top {\\n display: flex;\\n align-items: center;\\n justify-content: space-between;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"container\": \"container_moxlt\",\n\t\"top\": \"top__WfL2\"\n};\nexport default ___CSS_LOADER_EXPORT___;\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n\n content += cssWithMappingToString(item);\n\n if (needLayer) {\n content += \"}\";\n }\n\n if (item[2]) {\n content += \"}\";\n }\n\n if (item[4]) {\n content += \"}\";\n }\n\n return content;\n }).join(\"\");\n }; // import a list of modules into the list\n\n\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n\n var alreadyImportedModules = {};\n\n if (dedupe) {\n for (var _i = 0; _i < this.length; _i++) {\n var id = this[_i][0];\n\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n\n for (var _i2 = 0; _i2 < modules.length; _i2++) {\n var item = [].concat(modules[_i2]);\n\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n\n list.push(item);\n }\n };\n\n return list;\n};","\"use strict\";\n\nmodule.exports = function (item) {\n var content = item[1];\n var cssMapping = item[3];\n\n if (!cssMapping) {\n return content;\n }\n\n if (typeof btoa === \"function\") {\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n var sourceMapping = \"/*# \".concat(data, \" */\");\n var sourceURLs = cssMapping.sources.map(function (source) {\n return \"/*# sourceURL=\".concat(cssMapping.sourceRoot || \"\").concat(source, \" */\");\n });\n return [content].concat(sourceURLs).concat([sourceMapping]).join(\"\\n\");\n }\n\n return [content].join(\"\\n\");\n};","\"use strict\";\n\nvar stylesInDOM = [];\n\nfunction getIndexByIdentifier(identifier) {\n var result = -1;\n\n for (var i = 0; i < stylesInDOM.length; i++) {\n if (stylesInDOM[i].identifier === identifier) {\n result = i;\n break;\n }\n }\n\n return result;\n}\n\nfunction modulesToDom(list, options) {\n var idCountMap = {};\n var identifiers = [];\n\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var count = idCountMap[id] || 0;\n var identifier = \"\".concat(id, \" \").concat(count);\n idCountMap[id] = count + 1;\n var indexByIdentifier = getIndexByIdentifier(identifier);\n var obj = {\n css: item[1],\n media: item[2],\n sourceMap: item[3],\n supports: item[4],\n layer: item[5]\n };\n\n if (indexByIdentifier !== -1) {\n stylesInDOM[indexByIdentifier].references++;\n stylesInDOM[indexByIdentifier].updater(obj);\n } else {\n var updater = addElementStyle(obj, options);\n options.byIndex = i;\n stylesInDOM.splice(i, 0, {\n identifier: identifier,\n updater: updater,\n references: 1\n });\n }\n\n identifiers.push(identifier);\n }\n\n return identifiers;\n}\n\nfunction addElementStyle(obj, options) {\n var api = options.domAPI(options);\n api.update(obj);\n\n var updater = function updater(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {\n return;\n }\n\n api.update(obj = newObj);\n } else {\n api.remove();\n }\n };\n\n return updater;\n}\n\nmodule.exports = function (list, options) {\n options = options || {};\n list = list || [];\n var lastIdentifiers = modulesToDom(list, options);\n return function update(newList) {\n newList = newList || [];\n\n for (var i = 0; i < lastIdentifiers.length; i++) {\n var identifier = lastIdentifiers[i];\n var index = getIndexByIdentifier(identifier);\n stylesInDOM[index].references--;\n }\n\n var newLastIdentifiers = modulesToDom(newList, options);\n\n for (var _i = 0; _i < lastIdentifiers.length; _i++) {\n var _identifier = lastIdentifiers[_i];\n\n var _index = getIndexByIdentifier(_identifier);\n\n if (stylesInDOM[_index].references === 0) {\n stylesInDOM[_index].updater();\n\n stylesInDOM.splice(_index, 1);\n }\n }\n\n lastIdentifiers = newLastIdentifiers;\n };\n};","\"use strict\";\n\nvar memo = {};\n/* istanbul ignore next */\n\nfunction getTarget(target) {\n if (typeof memo[target] === \"undefined\") {\n var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself\n\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n\n memo[target] = styleTarget;\n }\n\n return memo[target];\n}\n/* istanbul ignore next */\n\n\nfunction insertBySelector(insert, style) {\n var target = getTarget(insert);\n\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n\n target.appendChild(style);\n}\n\nmodule.exports = insertBySelector;","\"use strict\";\n\n/* istanbul ignore next */\nfunction insertStyleElement(options) {\n var element = document.createElement(\"style\");\n options.setAttributes(element, options.attributes);\n options.insert(element, options.options);\n return element;\n}\n\nmodule.exports = insertStyleElement;","\"use strict\";\n\n/* istanbul ignore next */\nfunction setAttributesWithoutAttributes(styleElement) {\n var nonce = typeof __webpack_nonce__ !== \"undefined\" ? __webpack_nonce__ : null;\n\n if (nonce) {\n styleElement.setAttribute(\"nonce\", nonce);\n }\n}\n\nmodule.exports = setAttributesWithoutAttributes;","\"use strict\";\n\n/* istanbul ignore next */\nfunction apply(styleElement, options, obj) {\n var css = \"\";\n\n if (obj.supports) {\n css += \"@supports (\".concat(obj.supports, \") {\");\n }\n\n if (obj.media) {\n css += \"@media \".concat(obj.media, \" {\");\n }\n\n var needLayer = typeof obj.layer !== \"undefined\";\n\n if (needLayer) {\n css += \"@layer\".concat(obj.layer.length > 0 ? \" \".concat(obj.layer) : \"\", \" {\");\n }\n\n css += obj.css;\n\n if (needLayer) {\n css += \"}\";\n }\n\n if (obj.media) {\n css += \"}\";\n }\n\n if (obj.supports) {\n css += \"}\";\n }\n\n var sourceMap = obj.sourceMap;\n\n if (sourceMap && typeof btoa !== \"undefined\") {\n css += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \" */\");\n } // For old IE\n\n /* istanbul ignore if */\n\n\n options.styleTagTransform(css, styleElement, options.options);\n}\n\nfunction removeStyleElement(styleElement) {\n // istanbul ignore if\n if (styleElement.parentNode === null) {\n return false;\n }\n\n styleElement.parentNode.removeChild(styleElement);\n}\n/* istanbul ignore next */\n\n\nfunction domAPI(options) {\n var styleElement = options.insertStyleElement(options);\n return {\n update: function update(obj) {\n apply(styleElement, options, obj);\n },\n remove: function remove() {\n removeStyleElement(styleElement);\n }\n };\n}\n\nmodule.exports = domAPI;","\"use strict\";\n\n/* istanbul ignore next */\nfunction styleTagTransform(css, styleElement) {\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = css;\n } else {\n while (styleElement.firstChild) {\n styleElement.removeChild(styleElement.firstChild);\n }\n\n styleElement.appendChild(document.createTextNode(css));\n }\n}\n\nmodule.exports = styleTagTransform;","module.exports = __WEBPACK_EXTERNAL_MODULE__161__;","module.exports = __WEBPACK_EXTERNAL_MODULE__439__;","module.exports = __WEBPACK_EXTERNAL_MODULE__937__;","module.exports = __WEBPACK_EXTERNAL_MODULE__437__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nc = undefined;","import { Actions } from '@variousjs/various'\nimport { Store } from '../types'\n\nconst actions: Actions<Store> = {\n async setName({ emit, getStore }, value) {\n await new Promise((r) => setTimeout(r, 1000))\n const { user } = getStore()\n user.name = value\n emit({ user })\n },\n async getName({ getStore }) {\n const { user } = getStore()\n return user.name\n },\n async setLocale({ emit }, value) {\n emit({ locale: value })\n }\n}\n\nexport default actions\n","export default {\n user: {\n name: 'various',\n },\n locale: 'zh',\n}\n","export default function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}","\n import API from \"!../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!../../node_modules/less-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./entry.less\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!../../node_modules/less-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./entry.less\";\n export default content && content.locals ? content.locals : undefined;\n","import React, { Component, ComponentType, memo } from 'react'\nimport { createComponent, getConfig } from '@variousjs/various'\nimport { HashRouter as Router, Route } from 'react-router-dom'\nimport { Config } from '../types'\nimport csses from './entry.less'\n\nclass Container extends Component {\n config = getConfig() as Config\n\n top = memo(createComponent('top'))\n\n components = this.config.pages.reduce((prev, current) => {\n current.components.forEach((item) => {\n prev[item] = memo(createComponent(item))\n })\n return prev\n }, {} as Record<string, ReturnType<typeof createComponent>>)\n\n render() {\n const Top = this.top\n const $config = this.config\n\n return (\n <div className={csses.container}>\n <Router>\n <div className={csses.top}>\n <Top />\n </div>\n {\n $config.pages.map(({ path, components }) => {\n const cs = () => components.map((name) => {\n const C = this.components[name]\n return (\n <div\n key={name}\n style={{ display: 'inline-block', width: 300, verticalAlign: 'top' }}\n >\n <C />\n </div>\n )\n })\n\n return (\n <Route\n key={Array.isArray(path) ? path.join() : path}\n exact\n path={path}\n component={cs as unknown as ComponentType}\n />\n )\n })\n }\n </Router>\n </div>\n )\n }\n}\n\nexport default Container\n","import React from 'react'\nimport { Spin } from 'antd'\n\nexport default function Loader() {\n return (\n <Spin />\n )\n}\n","import React, { FC } from 'react'\nimport { Alert, Button } from 'antd'\nimport { ErrorProps } from '@variousjs/various'\n\nconst errorComponent: FC<ErrorProps> = ({ $reload, $type, $message }) => (\n <>\n <Alert\n message=\"Error\"\n description={`[${$type}]: ${$message || '组件错误'}`}\n type=\"error\"\n style={{ marginTop: 30 }}\n />\n {\n $reload && <Button onClick={$reload}>刷新</Button>\n }\n </>\n)\n\nexport default errorComponent\n"],"names":["___CSS_LOADER_EXPORT___","push","module","id","locals","exports","cssWithMappingToString","list","toString","this","map","item","content","needLayer","concat","length","join","i","modules","media","dedupe","supports","layer","undefined","alreadyImportedModules","_i","_i2","cssMapping","btoa","base64","unescape","encodeURIComponent","JSON","stringify","data","sourceMapping","sourceURLs","sources","source","sourceRoot","stylesInDOM","getIndexByIdentifier","identifier","result","modulesToDom","options","idCountMap","identifiers","base","count","indexByIdentifier","obj","css","sourceMap","references","updater","addElementStyle","byIndex","splice","api","domAPI","update","newObj","remove","lastIdentifiers","newList","index","newLastIdentifiers","_index","memo","insert","style","target","styleTarget","document","querySelector","window","HTMLIFrameElement","contentDocument","head","e","getTarget","Error","appendChild","element","createElement","setAttributes","attributes","styleElement","nonce","setAttribute","insertStyleElement","styleTagTransform","apply","parentNode","removeChild","removeStyleElement","styleSheet","cssText","firstChild","createTextNode","__WEBPACK_EXTERNAL_MODULE__161__","__WEBPACK_EXTERNAL_MODULE__439__","__WEBPACK_EXTERNAL_MODULE__937__","__WEBPACK_EXTERNAL_MODULE__437__","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","nc","async","emit","getStore","Promise","setTimeout","user","name","locale","_defineProperty","configurable","writable","Container","Component","getConfig","createComponent","config","pages","reduce","prev","current","components","forEach","render","Top","top","$config","className","csses","path","Route","Array","isArray","exact","component","C","display","width","verticalAlign","Loader","Spin","$reload","$type","$message","Alert","message","description","type","marginTop","Button","onClick"],"sourceRoot":""}
|
package/demo/dist/next.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
define(["react","@variousjs/various","antd"],(function(e,t,r){return function(){"use strict";var n={161:function(t){t.exports=e},937:function(e){e.exports=r},437:function(e){e.exports=t}},o={};function a(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={exports:{}};return n[e](r,r.exports,a),r.exports}a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,{a:t}),t},a.d=function(e,t){for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return function(){function e(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}a.r(i),a.d(i,{default:function(){return m}});var t=a(161),r=a.n(t),n=a(437),o=a(937),u=JSON.parse('{"title":"标题,{name}"}'),l=JSON.parse('{"title":"Title, {name}"}');const{createStore:s,connect:c,emit:p,getStore:f}=new n.Store;s({value:0});class d extends t.Component{render(){const{user:e}=this.props.$store,{value:t,$t:n}=this.props;return r().createElement(o.Descriptions,{style:{marginTop:30},bordered:!0,title:"Next Component",size:"small"},r().createElement(o.Descriptions.Item,{label:"Store"},e.name),r().createElement(o.Descriptions.Item,{label:"Value"},t),r().createElement(o.Descriptions.Item,{label:"Title"},n("title",{name:"various"})))}}e(d,"setValue",(async e=>{const t=f();p({value:e+t.value},!0)})),e(d,"$i18n",(()=>({localeKey:"locale",resources:{zh:u,en:l}})));var m=c("value")(d)}(),i}()}));
|
|
2
|
-
//# sourceMappingURL=next.js.map
|
package/demo/dist/next.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"next.js","mappings":"oHAAAA,EAAOC,QAAUC,C,kBCAjBF,EAAOC,QAAUE,C,kBCAjBH,EAAOC,QAAUG,C,GCCbC,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaP,QAGrB,IAAID,EAASK,EAAyBE,GAAY,CAGjDN,QAAS,CAAC,GAOX,OAHAS,EAAoBH,GAAUP,EAAQA,EAAOC,QAASK,GAG/CN,EAAOC,OACf,CCrBAK,EAAoBK,EAAI,SAASX,GAChC,IAAIY,EAASZ,GAAUA,EAAOa,WAC7B,WAAa,OAAOb,EAAgB,OAAG,EACvC,WAAa,OAAOA,CAAQ,EAE7B,OADAM,EAAoB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A,YACuBgB,UACzB,MAAMC,EAAQnB,IACdD,EAAK,CAAEN,MAAOA,EAAQ0B,EAAM1B,QAAS,EAArC,I,EAHES,EAAAA,SAMiB,KAAM,CACzBkB,UAAW,SACXC,UAAW,CAAEC,GAAF,EAAMC,GAAEA,OAsBvB,MAAezB,EAAQ,QAAvB,CAAgCI,E","sources":["webpack://@variousjs/create/external amd {\"root\":\"React\",\"amd\":\"react\"}","webpack://@variousjs/create/external amd {\"root\":\"antd\",\"amd\":\"antd\"}","webpack://@variousjs/create/external amd {\"root\":\"various\",\"amd\":\"@variousjs/various\"}","webpack://@variousjs/create/webpack/bootstrap","webpack://@variousjs/create/webpack/runtime/compat get default export","webpack://@variousjs/create/webpack/runtime/define property getters","webpack://@variousjs/create/webpack/runtime/hasOwnProperty shorthand","webpack://@variousjs/create/webpack/runtime/make namespace object","webpack://@variousjs/create/./node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://@variousjs/create/./src/components/next.tsx"],"sourcesContent":["module.exports = __WEBPACK_EXTERNAL_MODULE__161__;","module.exports = __WEBPACK_EXTERNAL_MODULE__937__;","module.exports = __WEBPACK_EXTERNAL_MODULE__437__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export default function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}","import React, { Component } from 'react'\nimport { ComponentProps, Store, Invoker, Ii8n } from '@variousjs/various'\nimport { Descriptions } from 'antd'\nimport { Store as GlobalStore } from '../types'\nimport zh from './i18n/zh.json'\nimport en from './i18n/en.json'\n\ntype S = { value: number }\n\nconst {\n createStore,\n connect,\n emit,\n getStore,\n} = new Store<S>()\n\ncreateStore({ value: 0 })\n\nclass X extends Component<S & ComponentProps<GlobalStore>> {\n static setValue: Invoker = async (value) => {\n const store = getStore()\n emit({ value: value + store.value }, true)\n }\n\n static $i18n: Ii8n = () => ({\n localeKey: 'locale',\n resources: { zh, en },\n })\n\n render() {\n const { user } = this.props.$store\n const { value, $t } = this.props\n\n return (\n <Descriptions\n style={{ marginTop: 30 }}\n bordered\n title=\"Next Component\"\n size=\"small\"\n >\n <Descriptions.Item label=\"Store\">{user.name}</Descriptions.Item>\n <Descriptions.Item label=\"Value\">{value}</Descriptions.Item>\n <Descriptions.Item label=\"Title\">{$t('title', { name: 'various' })}</Descriptions.Item>\n </Descriptions>\n )\n }\n}\n\nexport default connect('value')(X)\n"],"names":["module","exports","__WEBPACK_EXTERNAL_MODULE__161__","__WEBPACK_EXTERNAL_MODULE__937__","__WEBPACK_EXTERNAL_MODULE__437__","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","_defineProperty","configurable","writable","createStore","connect","emit","getStore","Store","X","Component","render","user","this","props","$store","$t","Descriptions","style","marginTop","bordered","title","size","label","name","async","store","localeKey","resources","zh","en"],"sourceRoot":""}
|
package/demo/dist/top.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
define(["react","@variousjs/various","react-router-dom","antd"],(function(e,t,n,r){return function(){"use strict";var o={161:function(t){t.exports=e},439:function(e){e.exports=n},937:function(e){e.exports=r},437:function(e){e.exports=t}},a={};function u(e){var t=a[e];if(void 0!==t)return t.exports;var n=a[e]={exports:{}};return o[e](n,n.exports,u),n.exports}u.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return u.d(t,{a:t}),t},u.d=function(e,t){for(var n in t)u.o(t,n)&&!u.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},u.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},u.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return function(){u.r(i);var e=u(161),t=u.n(e),n=u(437),r=u(439),o=u(937);i.default=a=>{const u=(0,n.getConfig)(),{pathname:i}=(0,r.useLocation)(),c=(0,r.useHistory)(),[l,s]=(0,e.useState)("");return(0,e.useEffect)((()=>{s(i)}),[]),t().createElement(t().Fragment,null,t().createElement(o.Radio.Group,{size:"large",value:l,onChange:e=>{c.push(e.target.value),s(e.target.value)},buttonStyle:"solid"},u.links.map((({path:e,name:n})=>t().createElement(o.Radio.Button,{key:e,value:e},n)))),t().createElement("div",null,"Store:",t().createElement(o.Badge,{style:{marginLeft:10},count:a.$store.user.name}),t().createElement(o.Button,{style:{marginLeft:10},onClick:()=>a.$dispatch("card","getName","Card")},"Card Name")))}}(),i}()}));
|
|
2
|
-
//# sourceMappingURL=top.js.map
|
package/demo/dist/top.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"top.js","mappings":"yIAAAA,EAAOC,QAAUC,C,kBCAjBF,EAAOC,QAAUE,C,kBCAjBH,EAAOC,QAAUG,C,kBCAjBJ,EAAOC,QAAUI,C,GCCbC,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaR,QAGrB,IAAID,EAASM,EAAyBE,GAAY,CAGjDP,QAAS,CAAC,GAOX,OAHAU,EAAoBH,GAAUR,EAAQA,EAAOC,QAASM,GAG/CP,EAAOC,OACf,CCrBAM,EAAoBK,EAAI,SAASZ,GAChC,IAAIa,EAASb,GAAUA,EAAOc,WAC7B,WAAa,OAAOd,EAAgB,OAAG,EACvC,WAAa,OAAOA,CAAQ,EAE7B,OADAO,EAAoBQ,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CACR,ECNAN,EAAoBQ,EAAI,SAASd,EAASgB,GACzC,IAAI,IAAIC,KAAOD,EACXV,EAAoBY,EAAEF,EAAYC,KAASX,EAAoBY,EAAElB,EAASiB,IAC5EE,OAAOC,eAAepB,EAASiB,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAG3E,ECPAX,EAAoBY,EAAI,SAASK,EAAKC,GAAQ,OAAOL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,EAAO,ECCtGlB,EAAoBsB,EAAI,SAAS5B,GACX,oBAAX6B,QAA0BA,OAAOC,aAC1CX,OAAOC,eAAepB,EAAS6B,OAAOC,YAAa,CAAEC,MAAO,WAE7DZ,OAAOC,eAAepB,EAAS,aAAc,CAAE+B,OAAO,GACvD,E,mFCgDA,UAhDsCC,IACpC,MAAMC,GAAUC,EAAAA,EAAAA,cACV,SAAEC,IAAaC,EAAAA,EAAAA,eACfC,GAAUC,EAAAA,EAAAA,eACTC,EAAMC,IAAWC,EAAAA,EAAAA,UAAS,IAWjC,OATAC,EAAAA,EAAAA,YAAU,KACRF,EAAQL,EAAR,GACC,IAQD,oCACA,kBAAC,EAAAQ,MAAA,MAAD,CACEC,KAAK,QACLb,MAAOQ,EACPM,SAVoBC,IACtBT,EAAQU,KAAKD,EAAEE,OAAOjB,OACtBS,EAAQM,EAAEE,OAAOjB,MAAjB,EASEkB,YAAY,SAGVhB,EAAQiB,MAAMC,KAAI,EAAGZ,OAAMa,UACzB,kBAAC,EAAAT,MAAA,OAAD,CAAc1B,IAAKsB,EAAMR,MAAOQ,GAC7Ba,MAKT,sCAEE,kBAAC,EAAAC,MAAD,CACEC,MAAO,CAAEC,WAAY,IACrBC,MAAOxB,EAAMyB,OAAOC,KAAKN,OAEzB,kBAAC,EAAAO,OAAD,CACEL,MAAO,CAAEC,WAAY,IACrBK,QAAS,IAAM5B,EAAM6B,UAAU,OAAQ,UAAW,SAFpD,cAtBN,C","sources":["webpack://@variousjs/create/external amd {\"root\":\"React\",\"amd\":\"react\"}","webpack://@variousjs/create/external amd {\"root\":\"ReactRouterDOM\",\"amd\":\"react-router-dom\"}","webpack://@variousjs/create/external amd {\"root\":\"antd\",\"amd\":\"antd\"}","webpack://@variousjs/create/external amd {\"root\":\"various\",\"amd\":\"@variousjs/various\"}","webpack://@variousjs/create/webpack/bootstrap","webpack://@variousjs/create/webpack/runtime/compat get default export","webpack://@variousjs/create/webpack/runtime/define property getters","webpack://@variousjs/create/webpack/runtime/hasOwnProperty shorthand","webpack://@variousjs/create/webpack/runtime/make namespace object","webpack://@variousjs/create/./src/components/top.tsx"],"sourcesContent":["module.exports = __WEBPACK_EXTERNAL_MODULE__161__;","module.exports = __WEBPACK_EXTERNAL_MODULE__439__;","module.exports = __WEBPACK_EXTERNAL_MODULE__937__;","module.exports = __WEBPACK_EXTERNAL_MODULE__437__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import React, { FC, useState, useEffect } from 'react'\nimport { ComponentProps, getConfig } from '@variousjs/various'\nimport { useLocation, useHistory } from 'react-router-dom'\nimport { Radio, Badge, Button } from 'antd'\nimport { Config, Store } from '../types'\n\nconst H: FC<ComponentProps<Store>> = (props) => {\n const $config = getConfig() as Config\n const { pathname } = useLocation()\n const history = useHistory()\n const [path, setPath] = useState('')\n\n useEffect(() => {\n setPath(pathname)\n }, [])\n\n const onRouterChange = (e: any) => {\n history.push(e.target.value)\n setPath(e.target.value)\n }\n\n return (\n <>\n <Radio.Group\n size=\"large\"\n value={path}\n onChange={onRouterChange}\n buttonStyle=\"solid\"\n >\n {\n $config.links.map(({ path, name }) => (\n <Radio.Button key={path} value={path}>\n {name}\n </Radio.Button>\n ))\n }\n </Radio.Group>\n <div>\n Store:\n <Badge\n style={{ marginLeft: 10 }}\n count={props.$store.user.name}\n />\n <Button\n style={{ marginLeft: 10 }}\n onClick={() => props.$dispatch('card', 'getName', 'Card')}\n >\n Card Name\n </Button>\n </div>\n </>\n )\n}\n\nexport default H\n"],"names":["module","exports","__WEBPACK_EXTERNAL_MODULE__161__","__WEBPACK_EXTERNAL_MODULE__439__","__WEBPACK_EXTERNAL_MODULE__937__","__WEBPACK_EXTERNAL_MODULE__437__","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","props","$config","getConfig","pathname","useLocation","history","useHistory","path","setPath","useState","useEffect","Radio","size","onChange","e","push","target","buttonStyle","links","map","name","Badge","style","marginLeft","count","$store","user","Button","onClick","$dispatch"],"sourceRoot":""}
|
package/demo/index.html
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" />
|
|
5
|
-
<title> VariousJS </title>
|
|
6
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/antd@4.16.13/dist/antd.compact.min.css" />
|
|
7
|
-
<script>
|
|
8
|
-
var VARIOUS_CONFIG = {
|
|
9
|
-
env: 'development', // 开发模式,显示所有组件错误
|
|
10
|
-
root: '#root',
|
|
11
|
-
entry: './dist/entry.js',
|
|
12
|
-
dependencies: {
|
|
13
|
-
// 内置依赖,如果不定义会默认使用 unpkg cdn 链接
|
|
14
|
-
react: 'https://cdn.jsdelivr.net/npm/react@18/umd/react.production.min.js',
|
|
15
|
-
'react-dom': 'https://cdn.jsdelivr.net/npm/react-dom@18/umd/react-dom.production.min.js',
|
|
16
|
-
|
|
17
|
-
// 依赖定义
|
|
18
|
-
'react-router-dom': 'https://cdn.jsdelivr.net/npm/react-router-dom@5.3.0/umd/react-router-dom.min.js',
|
|
19
|
-
moment: 'https://cdn.jsdelivr.net/npm/moment@2.29.1/min/moment.min.js',
|
|
20
|
-
antd: 'https://cdn.jsdelivr.net/npm/antd@4.16.13/dist/antd-with-locales.min.js',
|
|
21
|
-
},
|
|
22
|
-
components: {
|
|
23
|
-
// 组件定义
|
|
24
|
-
card: './dist/card.js',
|
|
25
|
-
next: './dist/next.js',
|
|
26
|
-
top: './dist/top.js',
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
-
// 以下属于自定义属性
|
|
30
|
-
pages: [
|
|
31
|
-
{
|
|
32
|
-
path: ['/', '/com/:id'],
|
|
33
|
-
components: ['card', 'next']
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
path: '/error',
|
|
37
|
-
components: ['error'],
|
|
38
|
-
},
|
|
39
|
-
],
|
|
40
|
-
links: [
|
|
41
|
-
{
|
|
42
|
-
name: 'Router `/`',
|
|
43
|
-
path: '/',
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
name: 'Router `/com/5`',
|
|
47
|
-
path: '/com/5',
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
name: 'Router `error`',
|
|
51
|
-
path: '/error',
|
|
52
|
-
},
|
|
53
|
-
],
|
|
54
|
-
}
|
|
55
|
-
</script>
|
|
56
|
-
</head>
|
|
57
|
-
<body>
|
|
58
|
-
<div id="root"></div>
|
|
59
|
-
<script src="https://cdn.jsdelivr.net/npm/requirejs@2.3.6/require.js"></script>
|
|
60
|
-
<script src="https://cdn.jsdelivr.net/npm/@variousjs/various@3.0.2/dist/index.js"></script>
|
|
61
|
-
</body>
|
|
62
|
-
</html>
|