将外部配置/参数传递给Meteor *mobile*构建
Passing external configuration / parameters to a Meteor *mobile* build?
我需要能够传递配置值/参数或类似于流星移动构建-以便这些值可以被设备上运行的流星代码访问。
我正在寻找类似于如何将设置文件传递到流星服务器部署(通过meteor --settings settings.json
)但用于移动构建的东西。
我认为meteor的mobile-config.js可能是一种可能性,但它仅限于某些输入,并且在构建后似乎无法用于应用程序。
甚至在构建过程中打包文本文件的能力也很有用,因为它可以使用类似https://github.com/apache/cordova-plugin-file的东西来读取。
任何想法?
注意,如果需要根据mobile-config.js文件中的环境变量进行切换,如下所示:
if (this.process.env.NODE_ENV === 'production') {
// production
} else {
// local
}
——移动设置
$ NODE_ENV=production
$ meteor build ../app --server http://<app-server> --mobile-settings settings.json
相关文章:
- 通过在Dojo mobile ViewController.openExternalView中动态更改打开同一外部视图的
- Meteor如何接收HTTP请求
- Meteor-将选定窗体中的对象添加到集合中
- 无法从jquery Mobile导航栏重定向到另一个页面
- Meteor上的启动页面
- Meteor方法在客户端返回null,在客户端运行的相同方法返回正确的值
- Meteor-添加用户自定义字段的方法不起作用
- Meteor忘记了密码的实现
- 链接所有<a>Meteor
- 在Meteor项目中安装并包含npm模块后出错
- Meteor JS中代码的重复使用部分
- Meteor Router数据函数被调用两次
- jquery mobile上多个页面上的一个表单
- 基于localStorage的Meteor激活模板
- React+Meteor:this.ops返回未定义
- window.location使用jquery mobile实现chrome跳转
- 如何将PHP get查询转换为Meteor's HTTP.get()
- Meteor.js Facebook使用“Apple-mobile-web-app-able”登录
- 从Meteor Mobile Application验证到S3
- 将外部配置/参数传递给Meteor *mobile*构建