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 🙏

© 2024 – Pkg Stats / Ryan Hefner

uc-npm

v1.0.16

Published

统一配置包

Downloads

23

Readme

uc-npm

[TOC]

介绍

该包主要用于统一多个子系统的通用部分,其中包括样式、logo、文字等公共部分。

使用 pnpm+workspace+turborepo 实现的 monorepo 管理方式的公共 npm 包 项目使用 pnpm 作为包管理工具。请自行全局下载。

安装依赖

pnpm install

打包发布

在登陆过 npm 情况下,发布需要修改根下 version,并关闭所有的 private 属性。

pnpm run push

使用

npm i uc-npm

// main.ts
import "uc-npm/packages/core/dist/index.css";
// 使用方法
<script setup lang="ts">
import { getUCConfig } from "uc-npm";
</script>

配置文件

main.config.ts 是整个配置中心的核心配置文件。

文字

| 属性 | 用途 | 类型 | | ---------- | ------------ | ------ | | name | 首页项目名称 | string | | title | 页面标题 | string | | copyright | 版权信息 | string | | caseNumber | 备案号 | string |

图片

| 属性 | 用途 | 类型 | | ------------- | --------- | ---------------------------- | | logoImg | logo 图片 | {path:string, base64:base64} | | backgroundImg | 背景图片 | {path:string, base64:base64} |

样式

属性后缀含有特殊意义,代表要转换的样式名称。详情查看generatecss.config.json配置文件

| 属性 | 用途 | 类型 | | -------------- | ---------------------------- | ------ | | defaultTC | 默认字体颜色 | string | | clickTC | 点击字体颜色 | string | | markTC | 标记字体颜色(表格单位) | string | | focusTC | 重点字体颜色(标题) | string | | funcTC | 功能字体颜色(菜单增加按钮) | string | | aidTC | 辅助字体颜色(灰色) | string | | formItemTC | 表单控件描述字体颜色 | string | | whiteTC | 白字 | string | | blackTC | 黑字 | string | | themeBGC | 主题背景颜色 | string | | tabHeaderBGC | 选项卡头部背景颜色 | string | | whiteBGC | 白背景颜色 | string | | blackTCBGC | 黑背景颜色 | string | | tableHeaderBGC | 表格头部背景颜色 | string | | tableBC | 表格边框颜色 | string | | largeTitleTS | 大标题字体 | string | | mediumTitleTS | 中标题字体 | string | | defaultTitleTS | 默认标题字体大小 | string | | miniTitleTS | 小标题字体 | string | | largeTS | 大字体 | string | | mediumTS | 中字体 | string | | defaultTS | 默认字体大小 | string | | miniTS | 小字体 | string |

generatecss.config.rule

| 属性 | 用途 | | ---- | ---------------- | | TC | color | | BGC | background-color | | BC | border-color | | TS | font-size | | BGI | background-image |