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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@kjts20/tool-weixin-mp

v0.1.25

Published

wkj

Downloads

133

Readme

时时工具包-微信小程序工具

安装方式

npm install @kjts20/tool-weixin-mp

功能说明

  • 请求封装为 httpServer 形式
  • 仓库封装为 store 调用
  • 事件实例化: Event
  • 跳转: goto、back
  • 自定义 wxs
  • 自定义脚手架
  • 同一定义样式

前序说明

下载依赖

  • npm install @kjts20/tool

初始化小程序

  • 使用 TS、scss 为小程序编程语言
  • 使用 Tdesign 作为 UI 组件库

小程序初始化操作

一、安装依赖

  • yarn

二、构建 npm

  • 工具 -> 构建 npm

三、在 app.[j|t]s 中初始化项目配置

  • 在 App 前面(非 App 内部)添加如下代码
import { startApp, hideApp } from '@/lib/index';
// 初始化app
initApp();
  • 在 App 的钩子函数 onHide 添加代码:hideApp();
App<IAppOption>({
    ...
    onShow() {
        startApp();
    },
    onHide() {
        hideApp();
    }
});

四、导入公共样式

  • 在 app.[wx|sc]ss 中底一行添加如下样式
@import './miniprogram_npm/@kjts20/tool/wx.wxss';
@import './style/wr-iconfont/iconfont.wxss';

.t-tabs__item--active {
    font-weight: 400 !important;
}

开发说明

注意事项

app.json 中自定义 tabbar 时候,图标使用的 icon 字段

"tabBar": {
    "custom": true,
    "list": [
        {
            "selectedColor": "#000000",
            "text": "测试",
            "pagePath": "pages/index/index",
            "icon": "home"
        },
        {
            "selectedColor": "#000000",
            "text": "测试2",
            "pagePath": "pages/logs/logs",
            "icon": "user"
        }
    ]
}

初始化的部分包含 tabbar,如果不需要需要自定去除

··