ant-tool / antd-bin Goto Github PK
View Code? Open in Web Editor NEWDeprecated. Use antd-init instead
Deprecated. Use antd-init instead
去除 server, hot load 等功能
/Users/sean/code/javascript/emcoo/node_modules/antd-bin/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client dependency git url: https://github.com/rase-/node-XMLHttpRequest/archive/a6b6f2.tar.gz
, maybe very slow, please keep patience...
> antd server
The file "/Users/sang/workspace/xbm.im/xbm-wms-frontend/node_modules/antd-bin/node_modules/koa/node_modules/composition/index.js" requires `Promise`,
but neither `bluebird` nor the native `Promise` implementation were found.
Please install `bluebird` yourself.
报错信息如下:
[email protected] dev G:\coding\antdone
antd server
listened on 8000
error ./src/component/App.jsx
Module not found: Error: Cannot resolve module 'antd/lib/datepicker' in G:\codin
g\antdone\src\component
resolve module antd/lib/datepicker in G:\coding\antdone\src\component
looking for modules in C:\Users\BYONE\AppData\Roaming\npm\node_modules\antd-bi
n\node_modules
C:\Users\BYONE\AppData\Roaming\npm\node_modules\antd-bin\node_modules\antd d
oesn't exist (module as directory)
[C:\Users\BYONE\AppData\Roaming\npm\node_modules\antd-bin\node_modules\antd]
@ ./src/component/App.jsx 13:25-55
error ./src/common/lib.js
Module not found: Error: Cannot resolve module 'antd/lib/index.css' in G:\coding
\antdone\src\common
resolve module antd/lib/index.css in G:\coding\antdone\src\common
looking for modules in C:\Users\BYONE\AppData\Roaming\npm\node_modules\antd-bi
n\node_modules
C:\Users\BYONE\AppData\Roaming\npm\node_modules\antd-bin\node_modules\antd d
oesn't exist (module as directory)
[C:\Users\BYONE\AppData\Roaming\npm\node_modules\antd-bin\node_modules\antd]
@ ./src/common/lib.js 3:0-29
Hash: 4e427d07a13e99f0ecd8
Version: webpack 1.9.13
Time: 1379ms
Asset Size Chunks Chunk Names
index.js 3.12 kB 0 [emitted] index
index.js.map 2.66 kB 0 [emitted] index
chunk {0} index.js, index.js.map (index) 1.09 kB [rendered]
[0] ./src/entry/index.jsx 361 bytes {0} [built]
[1] ./src/common/lib.js 45 bytes {0} [built] [1 error]
[2] ./src/component/App.jsx 638 bytes {0} [built] [1 error]
[3] external "window.React" 42 bytes {0} [not cacheable]
ERROR in ./src/component/App.jsx
Module not found: Error: Cannot resolve module 'antd/lib/datepicker' in G:\codin
g\antdone\src\component
@ ./src/component/App.jsx 13:25-55
ERROR in ./src/common/lib.js
Module not found: Error: Cannot resolve module 'antd/lib/index.css' in G:\coding
\antdone\src\common
@ ./src/common/lib.js 3:0-29
webpack: bundle is now VALID.
请问是什么问题?很看好该项目,但是一开场就不顺,很郁闷啊。烦请帮助解决,万分感谢!
怎么解决?
代替目前在业务开发中使用的 charles 。
【rm -rf dist && antd-build && mkdir -p dist/${npm_package_name}/${npm_package_version} && mv dist/. dist/${npm_package_name}/${npm_package_version}/】
The script can only be implemented under Linux, Recommended adding the description, To avoid misunderstanding
按照步骤执行了antd-init 和npm install,但run dev时出现如此错误:
ERROR in Cannot find module '../modules/web.dom.iterable'
目前antd-bin -v
是直接执行初始化动作
好像没有配置react hot loader吧,自己该怎么配置呢?
按照文档的步骤安装后,启动就报错了。 另外安装Ant Design React 的快速开发的文档,启动后报同样的错误。
SyntaxError: Unexpected token *
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at module.exports (/usr/local/lib/node_modules/antd-bin/lib/server.js:16:13)
at Object. (/usr/local/lib/node_modules/antd-bin/bin/antd-server:11:25)
at Module._compile (module.js:460:26)
yaodeMacBook-Air-2:grizzli yao$
Error: Cannot find module "react/lib/joinClasses"
用的是node.js 5.0 集成npm
windows 7 64
D:\antd-demo>antd-init
Write ..eslintrc
Write .\gitignore
Write .\index.html
Write .\package.json
Write .\README.md
Write .\lib.js
Write .\App.jsx
Write .\index.jsx
events.js:141
throw er; // Unhandled 'error' event
^
Error: spawn which ENOENT
at exports._errnoException (util.js:860:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
at onErrorNT (internal/child_process.js:344:16)
at doNTCallback2 (node.js:450:9)
at process._tickCallback (node.js:364:17)
antd server
运行之后,
打开地址 localhost:8000
,
默认访问的是当前目录下的 index.html
。
怎么配置添加识别其他文件?
例如 index.htm
BTW 刚看到 ant.design 好像快要完成了呢~,
设计标签也激活了,加油~
出正式版,我直接上 ^__^
目前的痛点是需要首先安装 antd-bin 到全局用于 init 。
然后还要在项目目录里安装一遍 antd-bin
,用于 scripts 的命令。
$ npm install antd-bin -g
$ mkdir antd-demo && cd antd-demo
$ antd init
$ npm install // 这里又会安装一遍 antd-bin
解决方案有两种:
使用 yeoman 或 slush
$ npm install yeoman -g
$ npm install generator-antd -g
$ mkdir antd-demo && cd antd-demo
$ yo antd
或者抽离 antd-init
$ npm install antd-init -g
$ mkdir antd-demo && cd antd-demo
$ antd init
$ npm install
如何进行配置,可以写个实例参考一下吗
资源文件 hash
如题
现在有点多。
npm ERR! Darwin 15.2.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/lib/node_modules/cnpm/node_modules/.bin/npm" "--userconfig=/Users/jj/.cnpmrc" "--disturl=https://npm.taobao.org/mirrors/node" "--cache=/Users/jj/.cnpm" "--registry=https://registry.npm.taobao.org" "--node-gyp=/usr/local/lib/node_modules/cnpm/node_modules/node-gyp/bin/node-gyp.js" "install"
npm ERR! node v4.2.1
npm ERR! npm v2.14.11
npm ERR! code EPEERINVALID
npm ERR! peerinvalid The package [email protected] does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer [email protected] wants atool-build@^0.3.1
npm ERR! peerinvalid Peer [email protected] wants atool-build@^0.4.2
npm ERR! Please include the following file with any support request:
npm ERR! /Users/jj/Workplace/Frontend/antd/playground/npm-debug.log
测试相关
两种模式
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.