npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@composy/website-vue

v0.0.2

Published

Vue website application built on LDesign website core

Readme

@composy/website-vue

网站 Vue 应用基础架构,也可作为 npm 包嵌入已有 Vue 产品。

项目结构与 app-vue 对齐:稳定 npm 入口、Vue website core、默认界面和可运行场景彼此独立;跨框架网站能力由 packages/website 提供。Launcher 负责应用启动、部署构建和预览,Builder 负责 npm 包构建;相关配置集中在 .ldesign/,根 TypeScript 与 ESLint 配置只保留兼容入口。

项目结构

src/
  index.ts                 # npm 稳定入口,无启动副作用
  main.ts                  # 本地可运行应用入口
  core/
    bootstrap/             # createWebsiteVueApp
    dashboard/             # 默认 Vue 网站根组件与样式
    types/                 # 公共配置类型
  apps/default/            # 默认网站场景接线
  types/                   # 公共类型兼容出口
.ldesign/
  launcher.config.ts       # Launcher 开发、站点构建与预览配置
  builder.config.ts        # Builder 发布包配置
  tsconfig.json            # 应用与配置 TypeScript 检查
  eslint.config.js         # 项目 ESLint 规则
pnpm install
pnpm dev
pnpm build       # Launcher 部署站点 dist/ + Builder npm 库 es/ esm/ lib/ + UMD
pnpm build:app   # 仅构建可部署站点
pnpm build:lib   # 仅构建 npm 库与 dist/website-vue.umd(.min).js
pnpm preview     # 预览生产构建
pnpm type-check  # 检查应用源码与 .ldesign 配置
pnpm lint:check  # 严格 ESLint
pnpm format:check
pnpm outputs:check # 检查发布产物和 exports

npm 使用

import { createWebsiteVueApp } from '@composy/website-vue'
import '@composy/website-vue/style.css'

await createWebsiteVueApp({
  selector: '#app',
  appearance: {
    primaryColor: 'azure', // violet | azure | teal
    mode: 'auto', // auto | light | dark
    size: 'comfortable', // compact | default | comfortable
    locale: 'en-US', // zh-CN | en-US
  },
})

也可以显式使用分层子路径:

import type { CreateWebsiteVueAppOptions } from '@composy/website-vue/types'
import { createDefaultWebsiteVueApp } from '@composy/website-vue/apps/default'
import { createWebsiteVueApp } from '@composy/website-vue/core'

传入由 createWebsiteRuntime() 创建的 runtime 可替换默认站点和页面配置。默认网站内置主题色、明暗模式、尺寸密度和中英文控制,并使用 ldesign.website.appearance 持久化;可通过 appearanceStorageKey 改用业务自己的存储键。UMD 全局为 ComposyWebsiteVue,但当前产物仍外置 @composy/solution-core、@composy/solution-core/style、@composy/website-core 和 CSS 模块引用,不能作为独立浏览器脚本直接加载。当前建议使用 npm/ESM 入口;Builder 的 workspace 依赖打包问题需修复后再启用独立 UMD。

NestAPI 登录

默认网站导航已接入 NestAPI 登录按钮,支持登录、退出、令牌自动刷新和本地会话恢复;接口使用同源 /api/v1,开发时由 Launcher /api 代理转发到 http://localhost:37217(可通过 API_TARGET 环境变量覆盖)。CSRF 令牌会先通过 /api/health 握手获取。