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

cs-wehcat

v0.1.0

Published

**技术栈** vue + vuex + vue-router + axios + vant

Downloads

10

Readme

0.1. cs-wechat

技术栈 vue + vuex + vue-router + axios + vant

0.2. Project setup

npm install

0.2.1. Compiles and hot-reloads for development

npm run serve

0.2.2. Compiles and minifies for production

npm run build

0.2.3. Run your tests

npm run test

0.2.4. Lints and fixes files

npm run lint

0.2.5. Run your end-to-end tests

npm run test:e2e

0.2.6. Run your unit tests

npm run test:unit

0.2.7. Run your mock data

npm run mock 

打开本地的 http://localhost:3000/dev-api/user/info

0.2.8

< npm run build:dev 对应develop环境 < npm run build:sit 对应site环境 < npm run build:pre 对应预发布环境 < npm run build:prod 对应线上环境

.env.xx文件,对应配置不同的环境。 修改参数VUE_APP_BASE_API,配置对应环境接口地址

0.3. 项目目录

├── examples // 源代码 │   ├── api // 所有请求 │   ├── assets // 主题 字体等静态资源 │   ├── components // 全局公用组件 │   ├── icons // 项目所有 svg icons │   ├── mock // 项目mock 模拟数据 │   ├── router // 路由 │   ├── store // 全局 store管理 │   ├── styles // 全局样式 │   ├── utils // 全局公用方法 │   ├── vendor // 公用vendor 公共库 │   ├── views // view 页面 │   ├── docs // markdowm文件 │   ├── App.vue // 入口页面 │   ├── main.js // 入口 加载组件 初始化等 ├── static // 第三方不打包资源 │   └── Tinymce // 富文本 ├── .babelrc // babel-loader 配置 ├── eslintrc.js // eslint 配置项 ├── .gitignore // git 忽略项 ├── public // public │   ├──index.html // html 文件 │   ├──favicon.ico // favicon文件 ├── packages // 自定义封装组件 │   ├──color-picker // 颜色选择器 │   ├──index.js // 组件安装 ├── .browserslistrc // 浏览器安装版本 ├── .env.development // development环境下配置 ├── .env.site // site环境下配置 ├── .env.production // production环境下配置 ├── .eslintrc.js // eslint编译规则 └── package.json // package.json

postcss-px2rem

将px转化rem 将px转化位rem remUnit: 75,//rem对应px值 750/10=75 propWhiteList: ['width'],同 propList: ['width'],指定哪些属性可以被转化位rem minPixelValue: 2,//小于这个值不转化位rem 关于postcss-px2rem见。postcssrc.js 或者在webpack中plugins中添加

 new webpack.LoaderOptionsPlugin({
 // webpack 2.0之后, 此配置不能直接写在自定义配置项中, 必须写在此处
  vue: {
    postcss: [require('postcss-px2rem')({ remUnit: 75, propWhiteList: [] })]
  },
 })

vue-cli3中写在vue.config.js

postcss: {
  plugins: [
    require('postcss-px2rem')({
      remUnit: 75, // ui设计稿750像素, 换算的基数 750/10
      propList: ['*'],
      mediaQuery: false, // 允许在媒体查询中转换px。
      exclude: '/node_modules/',
      minPixelValue: 3, //设置要替换的最小像素值(3px会被转rem)。 默认 0
      selectorBlackList: ['weui', 'mu'] // 忽略转换正则匹配项
    })
  ]
}