ant-design / ant-design-pro-cli Goto Github PK
View Code? Open in Web Editor NEWCli tool of Ant Design Pro
License: MIT License
Cli tool of Ant Design Pro
License: MIT License
pro g 后選擇page
之後就選擇不了了 説是要使用Use arrow keys 我嘗試很多按鍵都無效 連回車也不起作用
cms系统的基本框架:
如上图,我们的cms系统基本上都是上面的结构(搜索 + table列表 + modal弹框输入)
现在的想法是根据一份配置文件直接生成 models
、routes
、services
:
配置文件中写Table列表中每一列的名字以及后台的字段名,Form的输入Item同样(并且向根据不同的类型给不同的组件,例如 Input
、DatePicker
之类的)
相当于说将 routes
中Table的columns以及 Form
的 FormItem
都通过配置文件自动生成:
从而代替人工一个个替换,一个个添加的苦力活。
yeoman
,应该只能初始化项目的目录结构(不知道我说的对不对),想生成项目中的模板文件,可能不太合适ng-cli
或者是 vue-cli
挺像的,也知道 ant-design-pro-cli
也有提供类似的功能,但还没有完成实现以上需求。ant-design-pro-cli
的源码,看能否实现需求。ant-design-pro-cli/package.json
Line 35 in c6f9437
npm install ant-design-pro-cli -g
mkdir my-project && cd my-project
pro init
pro -V
0.2.0
There are pro new
and pro generate
with same function, are they duplicated?
ant-design/ant-design-pro#8659
应该是升级到 pro-cli 2.0 就出现这问题
现有i18n-remove直接移除了国际化支持,请问如何在保留国际化的情况下移除一个内置语言呢?
比如ant design pro v4版本内置了 zh-CN,zh-TW,en-US,pt-BR,如何移除pt-BR呢
The project created with pro, he is not a clean project, contains a lot of demos, I need to remove him one by one, can I generate a clean project?
I used ant-design-pro-cli many times. Recently I couldn't install it again. This is what I tried and the errors I've got:
npm install ant-design-pro-cli
npm ERR! Unexpected end of JSON input while parsing near '...hasum":"2cb9efb834cb0'
npm install @ant-design/pro-cli
npm ERR! Unexpected end of JSON input while parsing near '...7.4.3","@babel/parser'
Environment:
China, no VPN
Windows7 (64-bit)
node 10.16.3 (tried with 8.11.4 too)
nvm
npm 6.11.3
🚨 You need to enable Continuous Integration on Greenkeeper branches of this repository. 🚨
To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.
Since we didn’t receive a CI status on the greenkeeper/initial
branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.
If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/
.
Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please click the 'fix repo' button on account.greenkeeper.io.
Line 209 in a00c32d
在没有使用pro init
初始化的新项目下执行 pro new
创建 models 或者 services时, 假如项目目录下尚未创建 [models|services] 父目录, 则会抛出 ENOENT: no such file or directory
异常。
是否可以在该行前添加一个判断,假如父目录不存在,就先创建父目录:
fs.ensureDir(`${target}`);
补充一下为什么不使用 pro init
初始化项目的原因, 从ant-design-pro 中拷贝过来太多内容, 并不完全是我们的项目想用的内容, 一点点删也很麻烦。用 pro new
创建需要的模块进行增量式开发是我们目前比较期待的参考方式。
fatal - [esbuildHelperChecker] Found conflicts in esbuild helpers: Jt (749.ea5c6f3f.async.js, 980.ed6d7f93.async.js), please set esbuildMinifyIIFE: true in your config file.
Error Message:
Failed to minify the bundle. Error: index.fdfaf320.js from UglifyJs. Unexpected token: name(staticTag)
npm run start都正常工作
参考了一些网上的资料,不知道靠谱靠谱
webpack/webpack#2972
求指导
fetch blocks 可以支持指定下载单个的区块吗?
`kenny@kennydeMBP test % pro create test
? 🐂 使用 umi@4 还是 umi@3 ? umi@4
🧎🏻全量区块暂时不支持 umi@4
Cloning into 'test'...
fatal: unable to access 'https://github.com/ant-design/ant-design-pro/': Failed to connect to github.com port 443 after 3 ms: Connection refused
/usr/local/lib/node_modules/@ant-design/pro-cli/node_modules/execa/lib/error.js:60
error = new Error(message);
^
Error: Command failed with exit code 128: git clone https://github.com/ant-design/ant-design-pro --depth=1 test
at makeError (/usr/local/lib/node_modules/@ant-design/pro-cli/node_modules/execa/lib/error.js:60:11)
at handlePromise (/usr/local/lib/node_modules/@ant-design/pro-cli/node_modules/execa/index.js:118:26)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async AntDesignProGenerator.writing (/usr/local/lib/node_modules/@ant-design/pro-cli/src/create/generators/ant-design-pro/index.js:108:5) {
shortMessage: 'Command failed with exit code 128: git clone https://github.com/ant-design/ant-design-pro --depth=1 test',
command: 'git clone https://github.com/ant-design/ant-design-pro --depth=1 test',
escapedCommand: 'git clone "https://github.com/ant-design/ant-design-pro" "--depth=1" test',
exitCode: 128,
signal: undefined,
signalDescription: undefined,
stdout: undefined,
stderr: undefined,
failed: true,
timedOut: false,
isCanceled: false,
killed: false
}
`
After creating a new project using pro init
, run npm install react-quill --save
in the project and install the unsuccessful other external modules.
npm ERR! path D:\test\js\1102\pro-demo\ant-design-pro\node_modules\ajv-keywordsnpm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall access
npm ERR! enoent ENOENT: no such file or directory, access 'D:\test\js\1102\pro-demo\ant-design-pro\node_modules\ajv-
keywords'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
执行pro new时报“Failed to download repo https://github.com/ant-design/ant-design-pro#master RequestError: self signed certificate in certificate chain”
···
PS D:\Develop\my-project-cli> pro new
? input project name: my-ant-design-pro
? which directory do you want to init to ? (default is current directory ./):
Failed to download repo https://github.com/ant-design/ant-design-pro#master RequestError: self signed certificate in certificate chain
···
npm和yarn的·strict-ssl=false·都已经设置了
还有其他那里需要设置有问题??
node-pre-gyp ERR! Pre-built binaries not installable for [email protected] and [email protected] (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Hit error EACCES: permission denied, mkdir '/usr/local/lib/node_modules/ant-design-pro-cli/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64'
gyp ERR! clean error
gyp ERR! stack Error: EACCES: permission denied, rmdir 'build'
gyp ERR! System Darwin 17.5.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "clean"
gyp ERR! cwd /usr/local/lib/node_modules/ant-design-pro-cli/node_modules/fsevents
gyp ERR! node -v v10.0.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js clean' (1)
node-pre-gyp ERR! stack at ChildProcess. (/usr/local/lib/node_modules/ant-design-pro-cli/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:182:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:947:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:236:5)
node-pre-gyp ERR! System Darwin 17.5.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/ant-design-pro-cli/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/local/lib/node_modules/ant-design-pro-cli/node_modules/fsevents
node-pre-gyp ERR! node -v v10.0.0
node-pre-gyp ERR! node-pre-gyp -v v0.9.1
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js clean' (1)
参考 vue-cli
、angular-cli
,确定了 pro-cli
的定位。基于 Ant Design Pro 脚手架
的辅助配套工具。README
pro init
:初始化 Ant Design Pro 脚手架pro new
:添加 页面、组件、model 模板
脚手架中getGithubUrl方法,返回gitee地址的时候,会导致clone下来的代码不是最新的,因为gitee仓库同步的不及时
RT:
standard
simple
browser history simple
这些什么用的,有什么区别吗?
为什么要去除simple模式,没搞懂!
这个依赖可以先不要用最新的版本吗....我这里install不了啦~
umi 4 距正式发布( 2022.06.21 )已经有一年多了,已经很久了。
由于 umi 3 不再迭代(非重大安全问题、紧急问题不会修复),随着社区上游依赖的变老和过时,旧时代依赖逐渐被淘汰,使用 umi 3 会遇到越来越多的问题,造成巨大的历史技术债,所以不再推荐继续提供 umi 3 项目模板选项了,应默认即自动生成 umi 4 的项目。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.