|
|
il y a 3 ans | |
|---|---|---|
| assets | il y a 3 ans | |
| doc | il y a 3 ans | |
| settings | il y a 3 ans | |
| wx-open-data-project | il y a 4 ans | |
| .gitignore | il y a 4 ans | |
| README.md | il y a 3 ans | |
| creator.d.ts | il y a 4 ans | |
| jsconfig.json | il y a 4 ans | |
| project.json | il y a 4 ans | |
| template-banner.png | il y a 4 ans | |
| template.json | il y a 4 ans |
dapp-host.js 插件打包和本地预览 dapp-plugin.min.js 插件打包和本地预览
cocos creator 2.1.4 1.本地预览 打开安装目录 CocosCreator_2.1.4\resources\static\preview-templates 下,放入 dapp-plugin.min.js、dapp-host.js, 在 index.jade 里面引入 script(type='text/javascript' charset='utf-8' src='app/editor/static/preview-templates/dapp-host.js') script(type='text/javascript' charset='utf-8' src='app/editor/static/preview-templates/dapp-plugin.min.js')
(注意首行缩进要同一种格式)
2.打包时候,可以处理多种情况 打开安装目录 CocosCreator_2.1.4\resources\static\build-templates\web-mobile\template下,放入 dapp-plugin.min.js、dapp-host.js,
同时编辑同目录的 index.html
VConsole 看情况注释,需要测试可以打开。需要在编辑器里面打包。 打包出来的main.js 的,需要屏蔽自动全屏,直接去除或者注释 //cc.view.enableAutoFullScreen([ // cc.sys.BROWSER_TYPE_BAIDU, // cc.sys.BROWSER_TYPE_WECHAT, // cc.sys.BROWSER_TYPE_MOBILE_QQ, // cc.sys.BROWSER_TYPE_MIUI, //].indexOf(cc.sys.browserType) < 0);
最后打包了,需要在dapp-host里面配置对应的环境