@moneko/core 3.9.0 → 3.9.1-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/paths.js +1 -1
- package/lib/seo.js +1 -1
- package/lib/vm/routes.js +1 -1
- package/package.json +2 -2
package/lib/paths.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"url";
|
|
1
|
+
import e from"url";let o=JSON.parse(process.env.npm_config_argv||"{}")?.original;export const yarnArgv={};o?.forEach(e=>{let o=e.split("=");Object.assign(yarnArgv,{[o[0]]:o[1]||!0})});export const CUSTOMCONFIG=process.env.npm_config_config||yarnArgv.config;let c=process.cwd(),t=`${c}/node_modules/.cache/.mo`;export default{corePath:e.fileURLToPath(new URL(".",import.meta.url)),programPath:c,webpackCachePath:`${c}/node_modules/.temp_cache`,cachePath:t,httpCachePath:`${c}/node_modules/.cache/http`,swcCachePath:`${c}/node_modules/.swc`,configPath:`${c}/config/index.ts`,customConfigPath:`${c}/config/${CUSTOMCONFIG}.ts`,coveragePath:`${c}/coverage/clover.xml`,pagesPath:`${c}/src/pages`,componentsPath:`${c}/components`};
|
package/lib/seo.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{join as t}from"path";import{
|
|
1
|
+
import{join as t}from"path";import{saveFileSync as o}from"@moneko/mdx";import{outputConfig as r}from"./common.js";import{CONFIG as m}from"./config.js";import{resolveProgramPath as e}from"./utils.js";import{routes as i}from"./vm/routes.js";export default(()=>{let{domain:s,nojekyll:p,path:n}=m.seo||{},a=n&&e(n)||r?.path;if(!s||!a)return;let f=m.basename,h=f.endsWith("/")?f:`${f}/`;o(t(a,"CNAME"),s),o(t(a,"robots"),`Sitemap: https://${s}${h}sitemap.txt`);let l=[];!function t(o){o.forEach(o=>{l.push(`https://${s}${h}${o.key}`),Array.isArray(o.children)&&t(o.children)})}(i),o(t(a,"sitemap.txt"),l.join("\n")),p&&o(t(a,".nojekyll"),"")});
|
package/lib/vm/routes.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{generateRouter as e,generateRouterLibrary as t,scanFolder as o}from"@moneko/mdx";import{getTree as r,mergeRouter as s,watchFiles as a}from"./utils.js";import{CONFIG as m}from"../config.js";import p from"../paths.js";import{FRAMEWORK as i,isDev as u,isLibrary as n}from"../process-env.js";import l from"../reactive-object.js";export const routesModuleName="@app/routes";export const route=new l({[routesModuleName]:"export default []"});export let routes=[];let f=n?p.componentsPath:p.pagesPath,c=n?/(?<!README\.mdx?)$/:/(?<!index\.tsx?)$/,x=n?"@pkg":"@/pages",d=n?t:e;function j(e){routes=s(r({base:f,files:e,alia:x}),"key"),route.setData(routesModuleName,d(p.componentsPath,`${m.alias["@"]}/router/index.ts`,i,m.alias["@"]))}let g=o(f).filter(e=>!c.test(e));j(g),u&&a(f,c,j,g);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moneko/core",
|
|
3
|
-
"version": "3.9.0",
|
|
3
|
+
"version": "3.9.1-beta.0",
|
|
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.14",
|
|
17
17
|
"@swc/core": "1.3.100",
|
|
18
18
|
"@swc/css": "0.0.28",
|
|
19
19
|
"@swc/helpers": "0.5.3",
|