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

pasc-scui

v1.2.1

Published

PASC-SCUI Library

Downloads

1

Readme

SCUI 组件库

目录结构

pasc-lib-scui/
├── lib/                 # 构建后文件输出目录
├── src/                 # 源码目录
    ├── components/      # 组件目录
        ├── foo/         # 每个文件夹是一个组件
            ├── modules/ # 当前组件拆分出来的一些模块
            ├── assets/  # 当前组件图片等资源文件存放目录
            ├── Foo.vue  # 当前组件主文件
            └── index.js # 当前组件入口文件
        ├── ...
    └── index.js         # 所有组件聚合文件
├── test                 # 单元测试目录

新增组件

  1. pasc-lib-scui/src/components/ 目录下新增组件目录,初始化组件文件
  2. pasc-lib-scui/src/components/index.js 文件中增加导出代码
  3. pasc-lib-scui/build/entry.js 文件中增加组件入口文件配置
// src/components/index.js
export * from './components/foo/index'      // 组件聚合文件增加导出代码

// build/entry.js
module.exports = {
    'index': './src/index.js',                    // 组件聚合文件入口
    'foo/index': './src/components/foo/index.js'  // foo组件入口文件
    ...                                           // 增加更多
  }

版本号

版本格式: 主版本号.次版本号.修订号,版本号递增; 带 -beta.1 后缀为开发版本;

业务工程使用安装

# 安装组件库
npm install --save pasc-scui

# 安装依赖
npm install --save-dev babel-plugin-transform-import

# 业务工程 babel.config.js 配置(全部加载引用配置)
module.exports = {
  ...,
  plugins: [
    [
      'transform-import',
      {
        'pasc-scui': {
          transform: 'pasc-scui/lib/index',
          style: 'pasc-scui/lib/index.css',
          skipDefaultConversion: true,
          kebabCase: true
        }
      }
    ]
  ]
};

# 业务工程 babel.config.js 配置(或者:按需加载引用配置)
module.exports = {
  ...,
  plugins: [
    [
      'transform-import',
      {
        'pasc-scui': {
          transform: 'pasc-scui/lib/${member}/index.js',
          style: 'pasc-scui/lib/${member}/index.css',
          skipDefaultConversion: true,
          kebabCase: true,
          preventFullImport: true
        }
      }
    ]
  ]
};

# 更新组件库
npm update pasc-scui 或指定版本号
npm update [email protected] 或者卸载再安装
npm uninstall pasc-scui
npm install --save pasc-scui

常见问题

  • 安装 babel-plugin-transform-import 如果出现错误没有安装其依赖,请手动安装(babel-types ^6.6.0, lodash.camelcase ^4.3.0, lodash.kebabcase ^4.1.1, lodash.snakecase ^4.1.1);

License

MIT