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

@lx-frontend/theme-preview

v0.0.1

Published

A development tool to preview library theme.

Downloads

7

Readme

主题库配置

安装预览工具

npm install -D theme-preview

预览工具初始化

在项目根目录下,运行以下命令:

init-preview

该步骤实现两个操作:

  1. 在根目录先创建了preview.config.js配置文件
  2. 创建了preview文件夹,以及预览主题所需的HTML模板文件

其中,第二步所创建的文件结构是可选的,开发者可按照自己的需要创建所需文件,只需要在preview.config.js配置中修改相关路径即可。

预览文件配置

  1. 静态资源配置。将demo展示所需的静态资源放在preview/static目录下,比如,字体文件,图片等。demo示例和HTML模板中可直接通过/static/path/to/source的方式获取资源。
  2. HTML模板文件preview/index.html。该文件用来挂载demo实例。 · 引入任意的样式文件 · 引入库文件,如vue、element-ui、cvux等 · 如有需要,使用script标签自定义逻辑。 · 引入/static/index.css,该文件由组件样式经编译后生成。

配置preview.config.js

根据预览文件配置,修改根目录下preview.config.js配置文件。

启动

在package.json中配置以下命令

"script": {
  "dev": "preview"
}

然后,运行npm run dev即可启动