0.1.2 • Published 1 year ago

jump-vs-notification v0.1.2

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago
$: yarn init -y
$: yarn add rollup rollup-plugin-babel @babel/core @babel/preset-env @babel/preset-react @emotion/babel-preset-css-prop -D
$: yarn add styled-components 有问题
$: yarn add @emotion/core

yarn run rollup --config 简写 yarn run rollup -c

如何调试我们本地的包(先进的yalc)

安装

// NPM:
npm i yalc -g

// Yarn:
yarn global add yalc

发布

  • 在自己开发的库项目根目录下发布依赖 yalc publish

引入

  • yalc add [name]执行后,业务工程的 node_modules 中就会有这个包。眼尖的小伙伴会发现,这个 npm 包不同于其它包,它带有一个转折箭头符号(也就是说这是一个软链接)。 在需要引入库的测试项目中

更新

  • 在我们开发的库内 yarn build && yalc publish
  • 在我们的项目内: 停止项目
  • 在我们的项目内: yalc update
  • 在我们的项目内: 删除npm项目的node_modules下的.cache
  • 在我们的项目内: yarn start
  • 在我们的项目内: 成功,页面更新。

结束调试

  • yalc remove jump-vs-notification

发布我们的包

  • 查看npm配置的地址: npm config get registry
  • 设置镜像源地址
$: npm config set registry https://registry.npmjs.org