我的rails应用程序和index.html
文件托管在heroku上,其余资产位于s3上,manifest.json
为了使chrome在android上启用移动网络应用程序模式,需要一个文件,如下所示:
{
"short_name": "Kinlan's Amaze App",
"name": "Kinlan's Amazing Application ++",
"icons": [
{
"src": "launcher-icon-2x.png",
"sizes": "96x96",
"type": "image/png"
},
{
"src": "launcher-icon-3x.png",
"sizes": "144x144",
"type": "image/png"
},
{
"src": "launcher-icon-4x.png",
"sizes": "192x192",
"type": "image/png"
}
],
"start_url": "/index.html",
"display": "standalone",
"orientation": "landscape"
}
在我中,brocfile.js
我包括了json
可指纹文件列表的扩展名。
实际文件会被指纹识别,但诸如此类的内容"src": "launcher-icon-3x.png"
不会。
无论如何要执行此操作,还是我需要制作一个In-Repo插件来处理文件的创建?
在查看源代码之后,可以通过添加json
到replaceExtensions选项来完成以下操作:
var app = new EmberApp({
fingerprint: {
prepend: fingerprint,
extensions: ['js', 'css', 'png', 'jpg', 'gif', 'svg', 'json'],
replaceExtensions: ['html', 'css', 'js', 'json']
}
});
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句