Comments (15)
@theprimone
如果我想不修改直接publish到私有服务器上,不修改包名,没有修改任何地方
npm run pub
还是会出现这些错误
C:\workspace\ant-design\node_modules\async-done\index.js:18
throw err;
^
Error [ERR_UNHANDLED_ERROR]: Unhandled error. ({
uid: 11,
name: '',
branch: false,
error: 1,
duration: [ 1, 936748000 ],
time: 1622450060616
})
at Gulp.emit (events.js:304:17)
at Gulp.EventEmitter.emit (domain.js:467:12)
at Object.error (C:\workspace\ant-design\node_modules\undertaker\lib\helpers\createExtensions.js:61:10)
at handler (C:\workspace\ant-design\node_modules\now-and-later\lib\mapSeries.js:47:14)
at f (C:\workspace\ant-design\node_modules\once\once.js:25:25)
at f (C:\workspace\ant-design\node_modules\once\once.js:25:25)
at tryCatch (C:\workspace\ant-design\node_modules\async-done\index.js:24:15)
at done (C:\workspace\ant-design\node_modules\async-done\index.js:40:12)
at C:\workspace\ant-design\node_modules@ant-design\tools\lib\gulpfile.js:378:9
at ChildProcess. (C:\workspace\ant-design\node_modules@ant-design\tools\lib\runCmd.js:23:7)
at ChildProcess.emit (events.js:315:20)
at ChildProcess.EventEmitter.emit (domain.js:529:15)
at maybeClose (internal/child_process.js:1048:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
at Process.callbackTrampoline (internal/async_hooks.js:131:14) {
code: 'ERR_UNHANDLED_ERROR',
context: {
uid: 11,
name: '',
branch: false,
error: 1,
duration: [ 1, 936748000 ],
time: 1622450060616
}
}
from antd-tools.
@theprimone 在 antd 源代码中找到 webpack.config.js 文件修改processWebpackThemeConfig
以下代码即可正常编译
from antd-tools.
重新打包发布了 antd-tools,把 antd 关键词全部替换成自定义的包名,好像可用了。
另外,需要重新打包的 antd 中安装依赖时使用 yarn 好像有些问题,删除 node_modules 使用 npm i 之后就没问题了。
from antd-tools.
重新打包发布了 antd-tools,把 antd 关键词全部替换成自定义的包名,好像可用了。
另外,需要重新打包的 antd 中安装依赖时使用 yarn 好像有些问题,删除 node_modules 使用 npm i 之后就没问题了。
请问在antd-tools中替换了哪些antd关键字,修改了ant-desgin中了哪些文件?
from antd-tools.
展开举例说明一下,以下假设是将 antd 打包成 beed。
antd-tools => beed-tools
- 全局搜索 antd 替换成 beed,存在一些关联的根据 antd 字段拼成的变量也一起改一下;
- 然后把 antd-tools package.json 中的 name 改成 beed-tools,bin 中对应的脚本定义以及关联的文件重命名一下
- npm run pub 发布 beed-tools
antd => beed
- antd 所在项目中的 package.json 中的 name 改为 beed,相关的 antd-tools 命令替换 beed-tools
- 全局搜索 antd 改成 beed
- eslintrc.js 中添加如下字段 overrides.parserOptions.project: './tsconfig.json' 保证项目内 eslint 正常解析 beed
- 清空 CHANGLOG.*.md 写上自己的版本发布信息,日期必填
- npm run pub 发布 beed
以上应该差不多完成改造了,可能会有一些报错信息,根据提示修改就行了,当前我暂时禁用了 test-all.sh 中 test 相关脚本。至于如果使用私有镜像仓库,beed-tools 新增 .npmrc 配置 registry=https://your/npm/registry/
即可。另外由于 beed 使用了 beed-tools 发布,需要修改 package.json 中的 publishConfig.registry 解决。
from antd-tools.
另外,注意还有一些名称中存在 antd 的包那就不要改了,除非你还想重新发布一个。
from antd-tools.
- https://github.com/mzohaibqc/antd-theme-generator
- https://github.com/chenshuai2144/antd-pro-merge-less
这两个包也得定制一下。。。
from antd-tools.
@liqupan 你是怎么安装项目依赖的?
from antd-tools.
@theprimone
通过yarn,如果npm会出现错误
λ npm i
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR! dev react@"^17.0.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.0.0" from @ant-design/[email protected]
npm ERR! node_modules/@ant-design/hitu
npm ERR! dev @ant-design/hitu@"^0.0.0-alpha.13" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\54460\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\54460\AppData\Local\npm-cache_logs\2021-06-01T01_49_39_079Z-debug.log
from antd-tools.
那就很奇怪了,我刚才使用通过 yarn 安装的,没什么问题的 😂
from antd-tools.
再补充:
- antd-theme-generator => beed-theme-generator
- beed 中 components 中的组件样式需要调整,主要是将 ant => bee
from antd-tools.
最终解决方案是:没有修改antd名称,最终publish到了私服里面。
from antd-tools.
最终解决方案是:没有修改antd名称,最终publish到了私服里面。
还是啥都不用干呗,不过你这个需求有点离谱啊 😂
from antd-tools.
@theprimone 在 antd 源代码中找到 webpack.config.js 文件修改
processWebpackThemeConfig
以下代码即可正常编译
这看起来只是处理主题 less 文件而已啊
from antd-tools.
@theprimone 在 antd 源代码中找到 webpack.config.js 文件修改
processWebpackThemeConfig
以下代码即可正常编译
It works for me =_=v
from antd-tools.
Related Issues (20)
- 想请教一个问题,如下代码所示delete 操作的作用
- Error locating tsconfig.json HOT 1
- 请问一下每个组件的*.tsx文件经过compile后对应的*.d.ts是怎么生成的 HOT 1
- 关于打包有几个问题想请教一下 HOT 1
- Hi, 能给个粗略文档吗 HOT 2
- doc: antd-tools 文档说明
- how to publish a beta version with antd-tools cmd HOT 2
- 请问为啥选择webpack而不是rollup,为什么选择gulp HOT 2
- 请教一下,这个工具以后还会升级吗? HOT 1
- Here's a bug about Enter the search value in this box, use the direction key to slide up and down to select, the scroll bar has no linkage
- 关于dependencies疑问
- Several high vulnerabilities CVE-2019-16772, CVE-2019-16769, CVE-2020-7660 are introduced in @ant-design/tools
- antd Form.List嵌套Form.List用form.getFieldsValue()t获取不到内层的Form.List的值
- git tags HOT 1
- antd-tools run compile-experimental
- antd-tools 编译时报错
- Action required: Greenkeeper could not be activated 🚨
- Improve antd-tools publish HOT 2
- warning when publish antd
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 antd-tools.