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

process-tsvue

v1.1.5-tx

Published

Vue.js的组件库

Downloads

14

Readme

tsVue

Lints和修复文件

npm run lint

打包库

npm run dist

项目工程结构介绍

 |-- tsVue,
      |-- postcss.config,// postcss配置文件
      |-- .eslintignore,//忽视进行eslint的文件
      |-- .eslintrc.js,//eslint配置
      |-- .gitignore,//git忽视文件
      |-- README.md, //插件库使用文档说明【重点】
      |-- babel.config.js,//babel配置文件
      |-- components.json,// 注册组件的统一入口【重点】
      |-- package.json,//npm 配置文件
      |-- vue.config.js,//相关webpack配置文件
      |-- build,//webpack配置文件
      |   |-- config.js,//tsvue 组件库打包配置公共文件
      |   |-- webpack.common.js,//tsvue.common.js配置文件
      |   |-- webpack.component.js,//组件库分包配置文件 
      |   |-- webpack.conf.js,//index.js 配置文件
      |   |-- md-loader,//文档库打包配置
      |   |-- bin,
      |       |-- build-index.js,
      |       |-- gen-cssfile.js,
      |-- lib,//打包完的库
      |-- packages,//组件库
      |   |-- theme,//样式库
      |       |-- README.md,
      |       |-- gulpfile.js,
      |       |-- package.json,
      |       |-- lib,打包样式库
      |       |-- src,//放置样式的文件夹
      |           |-- base.scss,
      |           |-- button.scss,
      |           |-- index.scss,
      |           |-- common,
      |           |-- mixins,
      |-- packages-entry,//插件库入口【重点】
      |   |-- index.js,//引用注册【入口】
      |   |-- directives,//指令文件夹
      |   |-- filters,//过滤器文件夹
      |   |-- utils,//单元文件夹
      |-- public,
      |   |-- favicon.ico,
      |   |-- index.html,
      |-- src,//例子入口
          |-- docs,//api文档编辑
          |-- App.vue,
          |-- main.js,
          |-- assets,
  

组件库开发注意事项

  1. 如果封装组件涉及到样式的,请在 packages/theme/src 添置对应的与组件同名的.scss 文件。方便后续打包自动生成css 分离文件。
  2. 可以手动添加或者执行 npm run build:theme 创建文件
  3. 将组件中编写好的样式直接copy到对应的.scss 文件中
  4. 如果在执行npm run build:theme 相关操作的时候注意核实是否用到样式,防止出现样式未被打包的情况。
  5. 每次新增组件需要手动配置 components.json 进行映射

上传库

1、登入
npm login --registry=http://27.154.242.142:18690/repository/npm-hosted/
2、发布
npm publish --registry=http://27.154.242.142:18690/repository/npm-hosted/
3、下载
 npm  install --registry=http://27.154.242.142:18690/repository/npm-group/
4、替换请求源 让现场人员统一执行这句命令
npm config set registry http://27.154.242.142:18690/repository/npm-group/
4.1执行完这句命令后,安装插件 也是用npm install
4.2 查看是否成功替换请求源
npm config list

注意:  
    package.json配置的地方:
    "name": "tsvue",库名  
    "version": "0.1.0",版本号
生产的库名是tsvue
测试的库名是tsview

packages/theme  中的 package.json
  "name": "tstheme",
  "version": "0.0.0",

这两个版本号要一致

样式的使用

###1、安装

npm i tstheme -S

###2、 使用--使用Sass导入

@import 'tstheme';

Or Use webpack

import 'tstheme';

Or

<link rel="stylesheet" href="path/to/node_modules/tstheme/lib/index.css">

Import on demand

import 'tstheme/lib/input.css';
import 'tstheme/lib/select.css';