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

sy-web

v0.0.1-4

Published

私域赢家 web 端组件

Downloads

5

Readme

一套数云风格的 PC 端 React 组件库,服务于数云的的 PC 端 React 开发的产品中。

npm version npm downloads

安装

使用 npmyarn 安装

npm i cloud-react -S
yarn add cloud-react --save

示例

// 引入样式
import 'cloud-react/cloud-react.css';

// 引入单个组件
import { Button } from 'cloud-react';
ReactDOM.render(<Button>按钮</Button>, mountNode);

目前处于项目试用阶段,暂无按需引入方式,后续逐一添加

分支命名管理

  • 开发新功能,基于master新建分支,命名为feature/**,其中*为组件名称。
  • 修复bug,基于master新建分支,命名为bugfix/**,其中*为组件的名称。

开发新组件

如果组件比较特殊,使用到了ReactDOM.createPortal API或者存在动态创建节点(组件)的行为,必须使用ContextProvider来修改window、document和body 详情请看 /src/contexts/context-provider.js 文件,有更详细的描述

1、新拉分支。
2、执行npm run new:component 脚本,会在 src/components 目录生成一个new-component目录,里面包含新组件的基础文件和模版。
3、将 new-component 文件夹名称修改为对应的组件名称,相应的里面NewComponent组件名称也需要做修改。
4、愉快的进行自己组件代码的编写。

commit提交信息

  • 选用合适的gitmoji来表达本次的修改
  • 组件名称
  • 描述本次改动的内容

举个🌰

🐛[Button] 解决点击按钮失效问题

提交pull request

  • 使用当前分支与develop分支做比较,提交pr,通知相关同学进行review

发布版本

1、 先做代码review
2、 合并代码到develop分支,不删除源分支
3、 发布测试版本用于项目上进行验证
4、 有问题继续在源分支进行修复,重复 1 2 3 步骤
5、 没有问题,发版同学提交pr到master分支
6、 使用rebase的方式进行代码合并
7、 发布正式版本

npm version <version_category: major | minor | patch | premajor| preminor | prepatch | prerelease>

执行后会自动运行以下操作:

  • 检查当前代码是否 commit
  • 执行测试脚本npm run lint
  • 执行构建脚本npm run build, 版本号会根据参数进行递增。major: 主版本, minor: 次版本, patch: 补丁
  • 执行发布脚本npm publish dist
  • 执行提交代码脚本git push && git push --tags
  1. 功能性开发:one component,one feature,one commit。
  2. 修复 issue: one issue,one commit,便于代码 review 和出问题后追踪,撤销。
  3. 开发一半要提交怎么办?直接commit,但是请不要push,等到完成开发完成之后amend commit
  4. 开发了一半,commit了,手贱也push了,怎么办?那么请了解一下git rebase合并下您的commit记录,然后git push --force了解下。谨记,这个只限于你自己的分支。不要在多个人同时使用的分支上使用force push
  5. 提交代码的时候message要足够清晰。