@cyber-insight/cyber-scripts
Configuration and scripts for Create Cyber React.
Last updated 3 months ago by cyber-insight .
UNLICENSED · Original npm · Tarball · package.json
$ cnpm install @cyber-insight/cyber-scripts 
SYNC missed versions from official npm registry.

项目简介

  • 提供命令行工具 cyber-scripts

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

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

使用

1, 配置 registry

 npm config set registry http://nexus.w3.cyber-insight.com/repository/cyber/

2, 全局安装

 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 中添加三方依赖。

Current Tags

  • 6.0.0-alpha.4                                ...           alpha (2 months ago)
  • 5.0.4                                ...           latest (3 months ago)
  • 2.1.2                                ...           next (2 years ago)

100 Versions

  • 6.0.0-alpha.4                                ...           2 months ago
  • 6.0.0-alpha.3                                ...           2 months ago
  • 6.0.0-alpha.1                                ...           2 months ago
  • 6.0.0-alpha.0                                ...           2 months ago
  • 5.0.4                                ...           3 months ago
  • 2.1.3                                ...           2 years ago
  • 2.1.2                                ...           2 years ago
  • 1.9.6                                ...           2 years ago
  • 1.9.5                                ...           2 years ago
  • 1.9.4                                ...           2 years ago
  • 1.9.3                                ...           2 years ago
  • 1.9.2                                ...           2 years ago
  • 1.9.1                                ...           2 years ago
  • 1.9.0                                ...           2 years ago
  • 1.8.9                                ...           2 years ago
  • 1.8.8                                ...           2 years ago
  • 1.8.7                                ...           2 years ago
  • 1.8.6                                ...           2 years ago
  • 1.8.5                                ...           2 years ago
  • 1.8.4                                ...           2 years ago
  • 1.8.3                                ...           2 years ago
  • 1.8.2                                ...           2 years ago
  • 1.8.1                                ...           2 years ago
  • 1.8.0                                ...           2 years ago
  • 1.7.9                                ...           2 years ago
  • 1.7.8                                ...           2 years ago
  • 1.7.7                                ...           2 years ago
  • 1.7.6                                ...           2 years ago
  • 1.7.5                                ...           2 years ago
  • 1.7.4                                ...           2 years ago
  • 1.7.3                                ...           2 years ago
  • 1.7.2                                ...           2 years ago
  • 1.7.1                                ...           2 years ago
  • 1.7.0                                ...           2 years ago
  • 1.6.9                                ...           2 years ago
  • 1.6.8                                ...           2 years ago
  • 1.6.7                                ...           2 years ago
  • 1.6.6                                ...           2 years ago
  • 1.6.5                                ...           2 years ago
  • 1.6.4                                ...           2 years ago
  • 1.6.3                                ...           2 years ago
  • 1.6.2                                ...           2 years ago
  • 1.6.1                                ...           2 years ago
  • 1.6.0                                ...           2 years ago
  • 1.5.8                                ...           2 years ago
  • 1.5.7                                ...           2 years ago
  • 1.5.6                                ...           2 years ago
  • 1.5.5                                ...           2 years ago
  • 1.5.4                                ...           2 years ago
  • 1.5.3                                ...           2 years ago
  • 1.5.2                                ...           2 years ago
  • 1.5.1                                ...           2 years ago
  • 1.5.0                                ...           2 years ago
  • 1.4.7                                ...           2 years ago
  • 1.4.6                                ...           2 years ago
  • 1.4.5                                ...           2 years ago
  • 1.4.4                                ...           2 years ago
  • 1.4.3                                ...           2 years ago
  • 1.4.2                                ...           2 years ago
  • 1.4.1                                ...           2 years ago
  • 1.4.0                                ...           2 years ago
  • 1.3.9                                ...           2 years ago
  • 1.3.8                                ...           2 years ago
  • 1.3.7                                ...           2 years ago
  • 1.3.6                                ...           2 years ago
  • 1.3.5                                ...           2 years ago
  • 1.3.4                                ...           2 years ago
  • 1.3.3                                ...           2 years ago
  • 1.3.2                                ...           2 years ago
  • 1.3.1                                ...           2 years ago
  • 1.3.0                                ...           2 years ago
  • 1.2.9                                ...           2 years ago
  • 1.2.8                                ...           2 years ago
  • 1.2.7                                ...           2 years ago
  • 1.2.6                                ...           2 years ago
  • 1.2.5                                ...           2 years ago
  • 1.2.4                                ...           2 years ago
  • 1.2.3                                ...           2 years ago
  • 1.2.2                                ...           2 years ago
  • 1.2.1                                ...           2 years ago
  • 1.2.0                                ...           2 years ago
  • 1.1.9                                ...           2 years ago
  • 1.1.8                                ...           2 years ago
  • 1.1.7                                ...           2 years ago
  • 1.1.6                                ...           2 years ago
  • 1.1.5                                ...           2 years ago
  • 1.1.3                                ...           2 years ago
  • 1.1.2                                ...           2 years ago
  • 1.1.1                                ...           2 years ago
  • 1.1.0                                ...           2 years ago
  • 1.0.9                                ...           2 years ago
  • 1.0.8                                ...           2 years ago
  • 1.0.7                                ...           2 years ago
  • 1.0.6                                ...           2 years ago
  • 1.0.5                                ...           2 years ago
  • 1.0.4                                ...           2 years ago
  • 1.0.3                                ...           2 years ago
  • 1.0.2                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 101
Last Day 0
Last Week 100
Last Month 114
Dependencies (85)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |