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

@cyber-insight/cyber-scripts

v5.0.18

Published

Configuration and scripts for Create Cyber React.

Downloads

139

Readme

项目简介

  • 提供命令行工具 cyber-scripts

    cyber-scripts --help 获取帮助 cyber-scripts create PROJECT_NAME 创建 react 前端微服务主应用模板项目代码 cyber-scripts create --sub PROJECT_NAME 创建 react 前端微服务子应用模板项目代码

  • 提供全局的 webpack 配置文件,在模板项目里面通过安装 cyber-scripts 来实现

使用

1, 全局安装

 yarn global add @cyber-insight/cyber-scripts
 npm install -g @cyber-insight/cyber-scripts

3, 创建模板项目

cyber-scripts create PROJECT_NAME
或者
cyber-scripts create --sub PROJECT_NAME

4, 在项目根目录下安装依赖包

yarn

cyber-scripts 版本管理和发布

每次发布 cyber-scripts 的时候,需要首先将 package.json 里面的 version 版本号升级, 然后执行下面的命令。

npm publish

关于 eslint-plugin-react-hooks

eslint-plugin-react-hooks 被默认开启。

在使用 useEffect 的过程中,如果设计不好,exhaustive-deps 规则很有可能引入不必要的依赖,例如 props。

为了解决以上问题,请参考 reactJs 和 redux 的作者之一 Dan Abramov 详解 useEffect 的文章 A Complete Guide to useEffect 以及 reactJs 官方文档

关于 vendor

我们的基础架构会将不常更改的三方库,例如 react、react-dom、redux、antd 等(配置scripts/vendor.js),打包到 vendor 目录中。

需要注意的是,vendor 是由版本号控制(config.js中的 vendorVersion)的。每次修改scripts/vendor.js中的三方包,都需要将版本号+1,然后发现新一版的 cyber-scripts。

在产品功能发布中,一个 vendor 版本号只能被构建一次,不允许重复使用一个版本号进行多次构建。

没有特殊情况,不要私自向 package.json 中添加三方依赖。