valaxy 0.0.8 → 0.0.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valaxy",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "description": "📄 Vite & Vue powered static blog generator.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -9,6 +9,10 @@
9
9
  "vue",
10
10
  "blog"
11
11
  ],
12
+ "exports": {
13
+ ".": "./src/index.ts",
14
+ "./*": "./*"
15
+ },
12
16
  "bin": {
13
17
  "vala": "./bin/valaxy.js",
14
18
  "valaxy": "./bin/valaxy.js"
@@ -1,7 +1,7 @@
1
1
  <script lang="ts" setup>
2
- import { useConfig } from 'valaxy'
3
2
  import { computed } from 'vue'
4
3
  import { useI18n } from 'vue-i18n'
4
+ import { useConfig } from '../config'
5
5
 
6
6
  const { t, locale } = useI18n()
7
7
 
@@ -1,5 +1,5 @@
1
1
  import { createI18n } from 'vue-i18n'
2
- import { initConfig, valaxyConfigSymbol } from 'valaxy'
2
+ import { initConfig, valaxyConfigSymbol } from '../config'
3
3
  import type { UserModule } from '~/types'
4
4
 
5
5
  // Import i18n resources
@@ -1,6 +1,12 @@
1
1
  import dayjs from 'dayjs'
2
2
  import type { Post } from '../../types'
3
3
 
4
+ /**
5
+ * use dayjs format date
6
+ * @param date
7
+ * @param template
8
+ * @returns
9
+ */
4
10
  export function formatDate(date: string | number | Date, template = 'YYYY-MM-DD') {
5
11
  const today = dayjs(date)
6
12
  return today.format(template)
@@ -16,9 +16,10 @@ export function createConfigPlugin(options: ResolvedValaxyOptions): Plugin {
16
16
  '@valaxyjs/client': `${toAtFS(options.clientRoot)}/`,
17
17
  '@valaxyjs/config': '/@valaxyjs/config',
18
18
  'valaxy/package.json': toAtFS(resolve(options.clientRoot, '../../package.json')),
19
+ 'valaxy/': `${toAtFS(resolve(options.clientRoot, '../..'))}/`,
19
20
  'valaxy': toAtFS(resolve(options.clientRoot, '../index.ts')),
20
- '@valaxyjs/core': toAtFS(resolve(options.clientRoot, '../core')),
21
- [`valaxy-theme-${options.theme}`]: `${toAtFS(resolve(options.themeRoot))}/`,
21
+ [`valaxy-theme-${options.theme}/`]: `${toAtFS(resolve(options.themeRoot))}/`,
22
+ [`valaxy-theme-${options.theme}`]: `${toAtFS(resolve(options.themeRoot))}`,
22
23
  },
23
24
  },
24
25
 
package/tsup.config.ts CHANGED
@@ -7,7 +7,8 @@ export default defineConfig((options) => {
7
7
  'src/node/cli.ts',
8
8
  'src/index.ts',
9
9
  ],
10
- splitting: true,
10
+ // splitting: true,
11
+ splitting: false,
11
12
  clean: true,
12
13
  dts: true,
13
14
  format: ['cjs', 'esm'],
@@ -1 +0,0 @@
1
- import{f as o}from"./chunk-MWP3FN5Q.mjs";import{f as i}from"./chunk-RKUUEWDF.mjs";i();import{mergeConfig as r,build as f}from"vite";async function a(n,e={}){let t=r(e,o(n));await f(t)}export{a as build};
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkEM2KSV5Vjs = require('./chunk-EM2KSV5V.js');var _chunk44DGW27Sjs = require('./chunk-44DGW27S.js');_chunk44DGW27Sjs.f.call(void 0, );var _vite = require('vite');async function a(n,e={}){let t=_vite.mergeConfig.call(void 0, e,_chunkEM2KSV5Vjs.f.call(void 0, n));await _vite.build.call(void 0, t)}exports.build = a;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var c=Object.create;var a=Object.defineProperty,p=Object.defineProperties,m=Object.getOwnPropertyDescriptor,d=Object.getOwnPropertyDescriptors,u=Object.getOwnPropertyNames,s=Object.getOwnPropertySymbols,y=Object.getPrototypeOf,g=Object.prototype.hasOwnProperty,b=Object.prototype.propertyIsEnumerable;var l=(e,n,t)=>n in e?a(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,x= exports.a =(e,n)=>{for(var t in n||(n={}))g.call(n,t)&&l(e,t,n[t]);if(s)for(var t of s(n))b.call(n,t)&&l(e,t,n[t]);return e},k= exports.b =(e,n)=>p(e,d(n));var w=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(n,t)=>(typeof require!="undefined"?require:n)[t]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var f=(e,n)=>()=>(e&&(n=e(e=0)),n);var C=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports);var h=(e,n,t,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let i of u(n))!g.call(e,i)&&i!==t&&a(e,i,{get:()=>n[i],enumerable:!(r=m(n,i))||r.enumerable});return e};var V=(e,n,t)=>(t=e!=null?c(y(e)):{},h(n||!e||!e.__esModule?a(t,"default",{value:e,enumerable:!0}):t,e));var o=f(()=>{});o();var Y={url:"",lang:"en",title:"Valaxy Blog",subtitle:"Next Generation Static Blog Framework.",author:{avatar:"https://cdn.jsdelivr.net/gh/YunYouJun/yun/images/meme/yun-good-with-bg.jpg",name:"YunYouJun",status:{emoji:"\u{1F60A}",message:"All at sea."}},social:[],description:"A blog generated by Valaxy.",license:{enabled:!0,language:"",type:"by-nc-sa"},sponsor:{enable:!0,title:"\u6211\u5F88\u53EF\u7231\uFF0C\u8BF7\u7ED9\u6211\u94B1",methods:[{name:"\u652F\u4ED8\u5B9D",url:"https://cdn.jsdelivr.net/gh/YunYouJun/cdn/img/donate/alipay-qrcode.jpg",color:"#00A3EE",icon:"i-ri-alipay-line"},{name:"QQ \u652F\u4ED8",url:"https://cdn.jsdelivr.net/gh/YunYouJun/cdn/img/donate/qqpay-qrcode.png",color:"#12B7F5",icon:"i-ri-qq-line"},{name:"\u5FAE\u4FE1\u652F\u4ED8",url:"https://cdn.jsdelivr.net/gh/YunYouJun/cdn/img/donate/wechatpay-qrcode.jpg",color:"#2DC100",icon:"i-ri-wechat-pay-line"}]},search:{algolia:{enable:!1,appId:"",apiKey:"",indexName:"",chunkSize:5e3}},comment:{waline:{enable:!1,serverURL:""}},theme:"yun",themeConfig:{},unocss:{},markdown:{excerpt:"<!-- more -->"},markdownIt:{toc:{listType:"ol"},katex:{}}};o();o();exports.a = x; exports.b = k; exports.c = w; exports.d = C; exports.e = V; exports.f = o; exports.g = Y;
@@ -1 +0,0 @@
1
- import{f as r}from"./chunk-MWP3FN5Q.mjs";import{f as e}from"./chunk-RKUUEWDF.mjs";e();import{createServer as n,mergeConfig as a}from"vite";async function c(o,t={},i={}){return process.env.EDITOR=process.env.EDITOR||"code",await n(a(t,r(o,i)))}export{c as a};