Code Monkey home page Code Monkey logo

react-rollup's Introduction

使用verdaccio 搭建私有npm 服务器

  • npm install verdaccio -g
  • verdaccio 启动
  • nrm ls 查看所有源 (需要npm install nrm -g)
  • 本地添加一个源 nrm add registryName http://localhost:4873
  • 将当前 npm 服务指向私库 nrm use registryName
  • 注册用户 (npm adduser –registry http://localhost:4873,按照提示输入userName 和 password,email)
  • npm publish 发布包到私库

react-rollup

开发react插件

  • 进入package.json文件,全局替换 my-react-plugin 成你的包名。
  • npm install 安装依赖
  • npm run dev 启动项目
  • 在components 文件中复制demo 文件进行开发

打包插件

  • dist 输出文件
  • my-react-plugin.esm.js
  • my-react-plugin.cjs.js
  • my-react-plugin.min.js
  • my-react-plugin.umd.js
  • my-react-plugin.min.css

发布插件

  • dist
  • src
  • package.json

引用插件

  • 在项目下 新增 .npmrc 文件 ,添加 registry=http://localhost:4873
  • npm install @i61/my-react-plugin
  • import MyPlugin from "@i61/my-react-plugin"
  • import "@i61/my-react-plugin/dist/my-plugins.min.css"

react-rollup's People

Contributors

kwhbill avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.