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

项目简介

  • 提供命令行工具 cyber-scripts

    cyber-scripts create PROJECT_NAME 创建 react 前端微服务主应用模板项目代码
    cyber-scripts create PROJECT_NAME --sub 创建 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

3, 创建模板项目

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

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

yarn

cyber-scripts版本管理和发布

利用npm的next标签,我们将cyber-scripts的最新版发布在next标签上,这样每次在项目里面可以用下面的命令来安装最新版的cyber-scripts。

yarn add @cyber-insight/cyber-scripts@next

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

npm publish --tag next

关于 vendor

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

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

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

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

关于 eslint-plugin-react-hooks

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

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

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

Current Tags

  • 2.1.3                                ...           latest (7 months ago)
  • 2.1.2                                ...           next (9 months ago)

95 Versions

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

Copyright 2014 - 2017 © taobao.org |