Comments (5)
npm run publish:lib是啥意思呀?请问
from blog.
npm run publish:lib是啥意思呀?请问
是 npm scripts,它要做的事情就是:
思考一下我们需要什么哪些操作?
版本日志 根据simple-ui提交记录 生成CHANGELOG.md文件
把dist/simple-ui文件拷贝到simple-ui-builds里面
修改版本号 把package.json里的version+1,这里需要做个配置,不然会一直累加
自动提交本地文件 git add .
自动写提交日志 git commit -m "release: cut the vxx.xx.xx release"
不需要拉代码,没有git pull一说,
自动提交代码并打tag git push --follow-tags origin master
扩展功能:需不需要去通知使用者更新。
这里需要写脚本来支持,我们先放在一边,后面慢慢来说明。
from blog.
-
您好,npm run publish:lib这些我都手动操作了,我想问的是simple-ui-builds是要新建一个angular项目吗??如果是的话我将simple-ui打包后,应该拷贝到simple-ui-builds哪个地方呢? 如果只是一个文件夹,我拷贝到该目录push到gitlab后,在别的项目中通过npm git+引入会失败,应该是没有package.json导致的
-
我现在的情况是创建了一个名为simple-ui-builds的angular项目,将simple-ui打包后拷贝到该目录的根目录下,然后push到gitlab中,在别的项目中通过npm git+引入进来了,但不知道该如何使用,不知这样是否操作正确
from blog.
simple-ui-builds
是一个发布项目,一般对外开发都是发布到npm里面,就没有这个项目,对内如果不想另外搭建私有npm,就需要有个发布项目来存储,我把 simple-ui
编译好了,发布到 simple-ui-builds
项目里,这样就可以公司内部通过 npm git+引入使用了。
- simple-ui 组件库
- simple-ui-builds 组件发布库
- angular-demo 开发库
simple-ui
使用 npm run publish:lib
把打包好的 dist
目录文件拷贝到 simple-ui-builds
里,在 angular-demo
就可以 npm git+ install
,这样就和平常使用 npm 包一样了。
给你举几个例子:
angular 官方的表单模块:
- 源码 https://github.com/angular/angular/tree/master/packages/forms
- 发布 https://github.com/angular/forms-builds
我当时也是参考这个命名的。
from blog.
simple-ui-builds
是一个发布项目,一般对外开发都是发布到npm里面,就没有这个项目,对内如果不想另外搭建私有npm,就需要有个发布项目来存储,我把simple-ui
编译好了,发布到simple-ui-builds
项目里,这样就可以公司内部通过 npm git+引入使用了。
- simple-ui 组件库
- simple-ui-builds 组件发布库
- angular-demo 开发库
simple-ui
使用npm run publish:lib
把打包好的dist
目录文件拷贝到simple-ui-builds
里,在angular-demo
就可以npm git+ install
,这样就和平常使用 npm 包一样了。给你举几个例子:
angular 官方的表单模块:
- 源码 https://github.com/angular/angular/tree/master/packages/forms
- 发布 https://github.com/angular/forms-builds
我当时也是参考这个命名的。
非常感谢,已经通了!
from blog.
Related Issues (20)
- 一招让Angular-cli速度增强 HOT 4
- 让我们用Nestjs来重写一个CNode(下) HOT 4
- Angular常见错误及解决方案 HOT 5
- 关于js代码方面的,我现在调用 HOT 1
- 构建企业级的Angular项目结构
- 使用Angular和Nx构建可伸缩的多平台项目
- 使用angular schematics快速生成代码
- 类与数据结构
- 在NestJS中使用Typegoose分享
- JavaScript中最常用的几种数组操作
- TypeScript中的Mixins模式
- Angular 事件绑定扩展增强 - Angular Events Plugin
- ES6之变量和作用域
- TypeScript 指南
- TypeScript 实现依赖注入
- 学习 TypeScript 中的内置实用工具类型
- 抽象语法树 - 编译器背后的魔法
- 第一次使用Typeorm的挖坑总结
- 从零构建一个 Monorepo 项目工程
- Angular 自定义表单控件
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blog.