@moneko/core 3.9.16 → 3.9.17
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/lib/common.d.ts +1 -1
- package/lib/common.js +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/info.js +1 -1
- package/lib/module.config.js +1 -1
- package/lib/plugin/virtual-module.js +1 -1
- package/lib/plugins.config.d.ts +3 -0
- package/lib/plugins.config.js +1 -0
- package/lib/process-env.d.ts +1 -3
- package/lib/process-env.js +1 -1
- package/lib/seo.js +1 -1
- package/lib/swcrc.d.ts +1 -1
- package/lib/swcrc.js +1 -1
- package/lib/vm/coverage.d.ts +2 -2
- package/lib/vm/coverage.js +1 -1
- package/lib/vm/docs.js +1 -1
- package/lib/vm/routes.js +1 -1
- package/package.json +2 -2
package/lib/common.d.ts
CHANGED
package/lib/common.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{CONFIG as e,PUBLICPATH as t}from"./config.js";import o from"./module.config.js";import s,{CUSTOMCONFIG as r}from"./paths.js";import n from"./plugin/override-resolve.js";import l from"./plugins.config.js";import{PACKAGENAME as i,PACKAGEVERSION as a,isDev as p,isLibrary as c}from"./process-env.js";import{resolveNodeModulesPath as u,resolveProgramPath as m}from"./utils.js";export const outputConfig={path:m(c?"docs":"dist"),filename:"js/[name].bundle.js",chunkFilename:`js/[${p?"name":"chunkhash"}].js`,assetModuleFilename:e=>{let t=e.filename;return t&&t.endsWith("?url")&&/(?:webworker|worker)(\.|\b).*\.(js|ts)\b/.test(t.replace("?url",""))?"worker/[name][ext]":"assets/[name][hash][ext]"},library:{name:i,type:"window"},globalObject:"window",chunkLoadingGlobal:`webpackJsonp_${i}`,pathinfo:p,clean:!0,publicPath:t,asyncChunks:!0,charset:!0};let f={main:u("@app/entry")};e.polyfill&&Object.assign(f,{"dom-polyfills":[`${s.corePath}/polyfills/replace-children.js`]}),e.entry&&("string"==typeof e.entry?f={main:e.entry}:Object.keys(e.entry)&&Object.assign(f,e.entry)),e.output&&("string"==typeof e.output?outputConfig.path=e.output:Object.keys(e.output)&&Object.assign(outputConfig,e.output));let y=!1;e.cacheDirectory&&(y=p?{type:"memory"}:{type:"filesystem",store:"pack",allowCollectingMemory:!0,cacheDirectory:e.cacheDirectory,memoryCacheUnaffected:!0,name:[r,process.env.NODE_ENV].filter(Boolean).join("-"),version:a});let d=Object.assign({original:e.alias["@"],override:r&&m(r)},e.overrideResolve);export const clientConfig={entry:f,stats:"errors-only",cache:y,infrastructureLogging:{level:"error"},target:"web",externalsPresets:e.externalsPresets,plugins:l,node:{global:!1},experiments:{topLevelAwait:!0,asyncWebAssembly:!0,cacheUnaffected:!0,layers:!0,lazyCompilation:p&&{imports:!1,entries:!1},buildHttp:e.buildHttp,backCompat:!0,futureDefaults:!1,css:!1,outputModule:!1},resolve:{extensions:["...",".jsx",".ts",".tsx"],alias:e.alias,modules:[s.nodeModules],mainFields:["browser","module","main"],mainFiles:["index"],plugins:[e.overrideResolve&&new n(d),...e.resolvePlugins].filter(Boolean),fallback:{path:!1,fs:!1,crypto:!1,assert:!1}},module:o,externals:e.externals,output:outputConfig};
|
package/lib/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { default as paths, CUSTOMCONFIG } from './paths.js';
|
|
2
|
-
export {
|
|
2
|
+
export { PACKAGENAME, PACKAGEVERSION, coreName, isDev, isLibrary, isMicro, mainDirectory, } from './process-env.js';
|
|
3
3
|
export { realResolve, resolveNodeModulesPath, resolveProgramPath, log } from './utils.js';
|
|
4
4
|
export { getIPv4, getPort } from './net.js';
|
|
5
5
|
export { default as osTmpDir } from './os-tmp-dir.js';
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{default as paths,CUSTOMCONFIG}from"./paths.js";export{
|
|
1
|
+
export{default as paths,CUSTOMCONFIG}from"./paths.js";export{PACKAGENAME,PACKAGEVERSION,coreName,isDev,isLibrary,isMicro,mainDirectory}from"./process-env.js";export{realResolve,resolveNodeModulesPath,resolveProgramPath,log}from"./utils.js";export{getIPv4,getPort}from"./net.js";export{default as osTmpDir}from"./os-tmp-dir.js";
|
package/lib/info.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{loadFileSync as e}from"@moneko/mdx";import{CONFIG as r}from"./config.js";import{APPTYPE as o,PACKAGENAME as t,PACKAGEVERSION as s}from"./process-env.js";import{resolveProgramPath as
|
|
1
|
+
import{loadFileSync as e}from"@moneko/mdx";import{CONFIG as r}from"./config.js";import{APPTYPE as o,PACKAGENAME as t,PACKAGEVERSION as s}from"./process-env.js";import{resolveProgramPath as p,toUpperCaseString as i}from"./utils.js";let{description:m,author:n,repository:a,keywords:c}=JSON.parse(e(p("package.json"))||"{}"),d="string"==typeof n,f={name:t,projectName:i(t).replace(/-/g," "),version:s,base:r.basename,type:o,routerMode:r.routerMode,prefixCls:r.prefixCls,theme:r.theme,description:m,author:d?{name:n}:n,repository:d?{url:a}:a};export const description=m;export const keywords=Array.isArray(c)?c.toString():"";export default f;
|
package/lib/module.config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"mini-css-extract-plugin";import{CONFIG as s,PUBLICPATH as t}from"./config.js";import o from"./modify-vars.js";import r,{CUSTOMCONFIG as a}from"./paths.js";import{FRAMEWORK as i,isDev as l,isLibrary as n,isMicro as
|
|
1
|
+
import e from"mini-css-extract-plugin";import{CONFIG as s,PUBLICPATH as t}from"./config.js";import o from"./modify-vars.js";import r,{CUSTOMCONFIG as a}from"./paths.js";import{FRAMEWORK as i,isDev as l,isLibrary as n,isMicro as d}from"./process-env.js";import m from"./svg-to-data-uri.js";import c from"./swcrc.js";import{getLightningCssTargets as p}from"./targets.js";import u from"./tsloader.config.js";import{resolveNodeModulesPath as f,resolveProgramPath as y}from"./utils.js";import{comment as g,getCommentPath as j}from"./vm/docs.js";import v from"./vm/generate-doc.js";let x=d?t:"../",$={loader:e.loader,options:{publicPath:"/"!==x?x:"../"}},h={loader:`${r.corePath}/loader/lightningcss.cjs`,options:{sourceMap:!!s.sourceMap,analyzeDependencies:!1,targets:p(),drafts:{nesting:!0,customMedia:!0},errorRecovery:!1,unusedSymbols:[],rem:!!s.rem}};l&&($="style-loader");let b=[...s.cssModules,`@moneko/${i}`,"neko-ui"].map(f),w=["components","example","mock","site","src","server"].map(y);a&&w.push(y(a)),s.overrideResolve&&s.overrideResolve.override&&w.push(s.overrideResolve.override);let _={loader:"css-loader",options:{modules:{auto:e=>{for(let s=0,t=b.length;s<t;s++)if(e&&e?.includes(b[s]))return/(.*(?<!\.?global\.(le|c|sc|sa)ss)$)/i.test(e);return/(^(?!.*node_modules))(.*(?<!\.?global\.(le|c|sc|sa)ss)$)/i.test(e)},localIdentName:"[path][name]__[local]",exportLocalsConvention:"dashesOnly"},importLoaders:2}},M=[$,_,h,{loader:"less-loader",options:{sourceMap:!!s.sourceMap,lessOptions:{modifyVars:o,javascriptEnabled:!0}}},{loader:"style-resources-loader",options:{patterns:["src/styles/variables.less","src/styles/mixins.less","site/styles/variables.less","site/styles/mixins.less"].map(y)}}].filter(Boolean),k="tsc"===s.compiler;function B(e){return w.concat(s.rulesInclude?.[e]?.map(f)||[])}let P=B("css"),R=B("js"),L=B("media"),O=B("wasm"),I=B("font"),J={noParse:[/jquery|lodash|prismjs|prism\.js/,/react\.min\.js$/,/marked\.min\.js$/],rules:[n&&l&&{test:/^(?![._]).*(?<!\.test)\.(tsx?)$/,include:s.alias["@pkg"],exclude:[/node_modules/,/(.+)\/__tests__\/(.+)/i],enforce:"pre",loader:`${r.corePath}/loader/ts-doc.cjs`,options:{comment:g,generateDoc:v,getCommentPath:j}},{oneOf:[{resourceQuery:/raw/i,type:"asset/source"},{resourceQuery:/url/i,type:"asset/resource",generator:{filename:e=>{let s=e.filename;return s&&s.endsWith("wasm?url")?"wasm/[name][ext]":"assets/[name][ext]"}}},{test:/\.wasm$/i,type:"webassembly/async",include:O},{test:/\.txt$/i,type:"asset/source"},{test:/\.ico$/i,type:"asset/inline",include:L},{test:/\.svg$/i,type:"asset/inline",generator:{dataUrl:e=>m(e.toString())},include:L},{test:/\.(gif|png|jpe?g|webp)$/i,type:"asset",dependency:{not:["url"]},generator:{filename:"assets/images/[name][ext]"},include:L},{test:/\.(webm|mp4|ogv)$/i,type:"asset",dependency:{not:["url"]},generator:{filename:"assets/video/[name][ext]"},include:L},{test:/\.(woff2?|eot|ttf|otf)(\?.*)?$/i,type:"asset",dependency:{not:["url"]},generator:{filename:"assets/fonts/[name][ext]"},include:I},{test:/\.(sa|sc)ss$/i,use:[$,_,h,{loader:"sass-loader",options:{implementation:await import("sass"),sassOptions:{}}}].filter(Boolean),include:P},{test:/\.less$/i,use:M,include:P},{test:/\.css$/i,use:[$,"css-loader",h].filter(Boolean),include:P},{test:/\.(cj|mj|t|j)s(|x)$/i,use:[...s.prefixJsLoader,{loader:k?"ts-loader":"swc-loader",options:k?u:c}].filter(Boolean),include:R},{test:/\.mdx?$/i,use:[...s.prefixJsLoader,{loader:`${r.corePath}/loader/mdx.cjs`,options:s.mdx}].filter(Boolean),exclude:[/node_modules/]},{type:"asset/source",include:[/(.+)\/examples\/(.+).*?$/i]}]},...s.moduleRules].filter(e=>"object"==typeof e)};export default J;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{join as
|
|
1
|
+
import{join as o}from"path";import{getAppEntry as t,getAppFallback as e,getAppMdxScope as p,getAppMergeRouter as r,getAppNormalizeCss as a,getAppPrefixRouter as s,getAppRem as i,getAppSuspense as m}from"@moneko/mdx";import n from"webpack-virtual-modules";import{CONFIG as f}from"../config.js";import l from"../info.js";import c from"../paths.js";import{APPTYPE as h,FRAMEWORK as d,isLibrary as g}from"../process-env.js";import{resolveNodeModulesPath as u,resolveProgramPath as x}from"../utils.js";import j from"../vm/coverage.js";import{comment as v,docs as y,docsModuleName as k}from"../vm/docs.js";import{exampleModuleName as b,examples as w}from"../vm/example.js";import{locales as O,localesModuleName as P}from"../vm/locales.js";import{route as z,routesModuleName as D}from"../vm/routes.js";export default class{constructor(o){this.options=o,this.hasTapped=!1}apply(S){let T=new n({[u("@app/info")]:`export default ${JSON.stringify(l)}`,[u("@app/entry")]:t(o(f.alias["@"],"./index.ts"),!!f.rem,!!f.normalizeCss,h,d),[u("@app/rem")]:i(f.rem?.designSize||1680),[u("@app/fallback")]:e(f.fallbackCompPath),[u("@app/coverage")]:j(c.coveragePath),[u("@app/merge-router")]:r(),[u("@app/prefix-router")]:s(),[u("@app/normalize/index.css")]:a(),[u("@app/suspense/index.tsx")]:m(h,d),[u("@app/mdx-scope")]:p(x("site/mdx-scope.ts")),[u(D)]:z.getData(D),[u(b)]:"export default []",[u(P)]:O.getData(P),[u(k)]:y.getData(k)});function C(o,t){let e=u(o);T.writeModule(e,t||"")}T.apply(S),z.on("change",C),O.on("change",C),g&&(w.on("change",C),y.on("change",C),v.on("change",C)),S.hooks.compilation.tap("VirtualModuleWebpackPlugin",()=>{if(!this.hasTapped){for(let o in this.hasTapped=!0,this.options)if(Object.prototype.hasOwnProperty.call(this.options,o)){let t=this.options[o];C(o,"string"==typeof t?t:`export default ${JSON.stringify(t)}`)}for(let o of w)C(...o);for(let o of y)C(...o);for(let o of v)C(...o)}})}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"add-asset-html-webpack-plugin";import t from"html-webpack-plugin";import l from"webpack";import{CONFIG as o}from"./config.js";import i from"./html-plugin-option.js";import r from"./module-federation.js";import n from"./plugin/add-entry-attribute.js";import p from"./plugin/virtual-module.js";import{isMicro as a}from"./process-env.js";let{AutomaticPrefetchPlugin:s,DefinePlugin:m,SourceMapDevToolPlugin:c,IgnorePlugin:h}=l,u=o.basename.split("/").filter(Boolean).length,f=`${Array(u).fill("..").join("/")+(u?"/":"")}404.html`,{pathSegmentsToKeep:d=u,path:w=f}=o.fixBrowserRouter||{},g=o.assetHtml.map(e=>({publicPath:"",...e})),j=[...r,new p(o.virtualModule),new s,o.htmlPluginOption&&new t(i),o.fixBrowserRouter&&new t({filename:w,inject:!1,templateContent:()=>`<html lang="en"><head><title>${i.title}</title><script>const pathKeep = ${d||u};const l = window.location;l.replace(l.protocol + '//' + l.hostname + (l.port ? ':' + l.port : '') + l.pathname.split('/').slice(0, 1 + pathKeep).join('/') + '/?/' + l.pathname.slice(1).split('/').slice(pathKeep).join('/').replace(/&/g, '~and~') + (l.search ? '&' + l.search.slice(1).replace(/&/g, '~and~') : '') + l.hash);</script></head><body></body></html>`}),new e(g),a&&new n({test:/main\.bundle\.js$/}),new m({"process.env":JSON.stringify(o.env)}),new h({resourceRegExp:/\/__tests__\//}),o.sourceMap&&new c(o.sourceMap),...o.plugins].filter(e=>!!e);export default j;
|
package/lib/process-env.d.ts
CHANGED
|
@@ -9,9 +9,6 @@ export declare const isSolid: boolean;
|
|
|
9
9
|
/** 项目主要文件夹 */
|
|
10
10
|
export declare const mainDirectory: string;
|
|
11
11
|
export declare const jsxImportSource: string;
|
|
12
|
-
export declare const createElement: string;
|
|
13
|
-
/** 框架名称 */
|
|
14
|
-
export declare const FRAMEWORKNAME: string;
|
|
15
12
|
/** 应用名称 */
|
|
16
13
|
export declare const PACKAGENAME: string;
|
|
17
14
|
/** 版本号 */
|
|
@@ -20,3 +17,4 @@ export declare const PACKAGEVERSION: string;
|
|
|
20
17
|
export declare const coreName: string;
|
|
21
18
|
/** 是否为本地开发环境 */
|
|
22
19
|
export declare const isDev: boolean;
|
|
20
|
+
export declare const routeDir: string;
|
package/lib/process-env.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const APPTYPE=process.env.APPTYPE;export const FRAMEWORK=process.env.FRAMEWORK;export const isLibrary="library"===APPTYPE;export const isMicro="micro"===APPTYPE;export const isMobile="mobile"===APPTYPE;export const isReact="react"===FRAMEWORK;export const isSolid="solid"===FRAMEWORK;export const mainDirectory=isLibrary?"site":"src";export const jsxImportSource={react:"react",solid:"solid-js/h"}[FRAMEWORK];export const
|
|
1
|
+
import o from"./paths.js";export const APPTYPE=process.env.APPTYPE;export const FRAMEWORK=process.env.FRAMEWORK;export const isLibrary="library"===APPTYPE;export const isMicro="micro"===APPTYPE;export const isMobile="mobile"===APPTYPE;export const isReact="react"===FRAMEWORK;export const isSolid="solid"===FRAMEWORK;export const mainDirectory=isLibrary?"site":"src";export const jsxImportSource={react:"react",solid:"solid-js/h"}[FRAMEWORK];export const PACKAGENAME=process.env.npm_package_name;export const PACKAGEVERSION=process.env.npm_package_version;export const coreName="@moneko/core";export const isDev="development"===process.env.NODE_ENV;export const routeDir=isLibrary?o.componentsPath:o.pagesPath;
|
package/lib/seo.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{join as
|
|
1
|
+
import{join as o}from"path";import{saveFileSync as t,scanRouter as m,sitemap as r}from"@moneko/mdx";import{outputConfig as e}from"./common.js";import{CONFIG as p}from"./config.js";import{isLibrary as i,routeDir as s}from"./process-env.js";import{resolveProgramPath as f}from"./utils.js";export default(()=>{let{domain:n,nojekyll:a,path:j}=p.seo||{},l=j&&f(j)||e?.path;if(!n||!l)return;let x=`https://${n}${p.basename}`;t(o(l,"CNAME"),n),t(o(l,"robots"),`Sitemap: ${x}/sitemap.txt`),t(o(l,"sitemap.txt"),r(s,x,m(s,i)).join("\n")),a&&t(o(l,".nojekyll"),"")});
|
package/lib/swcrc.d.ts
CHANGED
package/lib/swcrc.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{merge as e}from"webpack-merge";import{CONFIG as o}from"./config.js";import r from"./paths.js";import s from"./polyfills.js";import{
|
|
1
|
+
import{merge as e}from"webpack-merge";import{CONFIG as o}from"./config.js";import r from"./paths.js";import s from"./polyfills.js";import{isDev as t,isReact as n,isSolid as i,jsxImportSource as p}from"./process-env.js";export const swcMinifyOption={compress:{top_retain:[],keep_infinity:!0,global_defs:{"@alert":"console.log"},pure_funcs:["console.log","console.warn","console.error","console.info"],toplevel:!1,drop_console:!0,drop_debugger:!0,module:!1,ecma:2015,ie8:!1,keep_classnames:void 0,keep_fnames:!1},mangle:!0};let c={module:{type:"es6",resolveFully:!0},jsc:{parser:{syntax:"typescript",tsx:!0,decorators:!0,dynamicImport:!0},loose:!0,target:"es2017",externalHelpers:!1,transform:{legacyDecorator:!0,decoratorMetadata:!0,react:{runtime:"automatic",throwIfNamespace:!0,refresh:n&&t,development:t,importSource:p},optimizer:{simplify:!1}},minify:t?void 0:swcMinifyOption,experimental:{emitAssertForImportAttributes:!0,cacheRoot:r.swcCachePath,plugins:[["swc-plugin-another-transform-imports",function(e){for(let o=0,r=Object.keys(e),s=r.length;o<s;o++)e[r[o]].transform=`${r[o]}/${e[r[o]].transform}`,e[r[o]].style&&(e[r[o]].style=`${r[o]}/${e[r[o]].style}`);return e}(o.importOnDemand||{})],i&&["@moneko/jsx-dom-expressions",o.jsxDomExpressions||{}]].filter(Boolean)}},sourceMaps:!0,parseMap:!0};o.polyfill&&(c.jsc.target=void 0,c.env={include:s(),mode:"entry",coreJs:"3.34"});export default e(c,"function"==typeof o.swcrc?o.swcrc(t):o.swcrc||{});
|
package/lib/vm/coverage.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare
|
|
2
|
-
export default
|
|
1
|
+
declare function getCoverage(coveragePath: string): string;
|
|
2
|
+
export default getCoverage;
|
package/lib/vm/coverage.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{fileExists as e,loadFileSync as r}from"@moneko/mdx";import{Parser as t}from"xml2js";import
|
|
1
|
+
import{fileExists as e,loadFileSync as r}from"@moneko/mdx";import{Parser as t}from"xml2js";import{PACKAGENAME as o}from"../process-env.js";export default function(c){let a={},i="export default {}";if(e(c))try{let e=r(c);(0,new t({explicitArray:!1,async:!1}).parseString)(e,(e,r)=>{e||(Object.assign(a,{[o]:r.coverage.project.metrics.$}),r.coverage.project.package.forEach(e=>{Object.assign(a,{[e.$.name]:e.metrics.$})})),i=`export default ${JSON.stringify(a)}`})}catch(e){}return i}
|
package/lib/vm/docs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{loadFileSync as e,scanFolder as t}from"@moneko/mdx";import o from"./generate-doc.js";import{CONFIG as r}from"../config.js";import{
|
|
1
|
+
import{loadFileSync as e,scanFolder as t}from"@moneko/mdx";import o from"./generate-doc.js";import{CONFIG as r}from"../config.js";import{FRAMEWORK as n,isLibrary as a,isReact as s,isSolid as p}from"../process-env.js";import m from"../reactive-object.js";let l={react:"createElement",solid:"createComponent"}[n];export const docsModuleName="@app/docs";export const docs=new m({[docsModuleName]:"export default {}"});export const comment=new m({});export const getCommentPath=function(){let e=/^\/?(.+?)\.tsx?$/,t=r.alias["@pkg"].length;return o=>o.substring(t).replace(e,"@app/comment/$1.md")}();if(a){let a={},m=`import { ${l}${p?",Dynamic":""} } from "${{react:"react",solid:"solid-js"}[n]}${p?"/web":""}";import SuspenseComp from "@app/suspense";function call_then(res) {return {default: ${s?"() =>":""}${l}(${p?"Dynamic":"'n-md'"}, {text: res.default, ${p?"component: 'n-md', ":""}css: 'table td a {display:inline-flex;align-items:center;gap:2px;}table td a n-img{display:inline-block;overflow:hidden;border-radius:var(--border-radius);inline-size:18px;block-size:18px;}' })};}`,c=(e,t)=>{let o=e.replace(/^@app\/comment\//,"").split("/"),r=o.pop(),n=o.join("/");a[n]||(a[n]={}),t?a[n][r]&&delete a[n][r]:a[n][r]=`rr(() => ${l}(SuspenseComp, { comp: () => import(/* webpackChunkName: '${e}' */ '${e}?raw').then(call_then)}))rr`;let s={};for(let e in a)Object.prototype.hasOwnProperty.call(a,e)&&(s[e]=Object.values(a[e]));docs.setData(docsModuleName,`${m}export default ${JSON.stringify(s).replace(/"rr\((.+?)\)rr"/g,"$1")}`)};comment.on("change",(e,t)=>{c(e,t?.length<0)}),t(r.alias["@pkg"]).filter(e=>/^(?![._]).*(?<!\.test)\.(tsx?)$/i.test(e)).forEach(t=>{let r=e(t);r&&comment.setData(getCommentPath(t),o(r,t))})}
|
package/lib/vm/routes.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{generateRouter as o}from"@moneko/mdx";import{watchFiles as e}from"./utils.js";import{CONFIG as t}from"../config.js";import
|
|
1
|
+
import{generateRouter as o}from"@moneko/mdx";import{watchFiles as e}from"./utils.js";import{CONFIG as t}from"../config.js";import{FRAMEWORK as r,isDev as s,isLibrary as m,routeDir as u}from"../process-env.js";import n from"../reactive-object.js";let i=m?"@pkg":"@/pages";export const routesModuleName="@app/routes";function p(){return o(u,`${t.alias["@"]}/router/index.ts`,r,i,m)}export const route=new n({[routesModuleName]:p()});export function generatorRouter(){route.setData(routesModuleName,p())}s&&e(u,m?/(?<!README\.mdx?)$/:/(?<!index\.tsx?)$/,generatorRouter);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moneko/core",
|
|
3
|
-
"version": "3.9.
|
|
3
|
+
"version": "3.9.17",
|
|
4
4
|
"description": "core",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"author": "moneko",
|
|
14
14
|
"license": "MIT",
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@moneko/mdx": "0.1.
|
|
16
|
+
"@moneko/mdx": "0.1.23",
|
|
17
17
|
"@swc/core": "1.3.100",
|
|
18
18
|
"add-asset-html-webpack-plugin": "6.0.0",
|
|
19
19
|
"core-js": "3.34.0",
|