android - 当我们进行 ionic 状态恢复、保存、清除和重置时,实际发生了什么?

标签 android ios ionic-framework ionic2 ionic-cli

当我们执行以下操作时,项目中实际发生了什么 ionic 态命令?

  • 恢复
  • 保存
  • 清晰
  • 重置

我们需要在什么样的情况下使用它们?

我用谷歌搜索了这个,但找不到任何合适的详细答案。

感谢您的任何帮助。

最佳答案

您始终可以查看他们的 Ionic CLI v1/v2 源代码

save: 'Save the platforms and plugins into package.json',

restore: 'Restore the platforms and plugins from package.json',

clear: 'Clear the package.json of cordovaPlugins and cordovaPlatforms, '
  'as well as clear out the platforms and plugins folders',

reset: 'Clear out the platforms and plugins directories, and reinstall plugins and platforms',

https://github.com/driftyco/ionic-cli/blob/fac1c4d7b49e7c102269f3d5e0acef660d762bf5/lib/ionic/state.js#L20-L33

state 已从 CLI v3 中删除:插件和平台可以完全由 Cordova 管理。请从您的 package.json 文件中删除 cordovaPlatforms 和 cordovaPlugins 键。如果您使用的是 Cordova 7,请查看有关 Cordova 如何使用 config.xml 和 package.json 管理插件和平台的公告。

关于android - 当我们进行 ionic 状态恢复、保存、清除和重置时,实际发生了什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42407206/

相关文章:

java - Android - 检查启动服务是否正在运行

java - 按后退按钮不会关闭 Android 应用程序

angular - 如何在 Ionic 2 中将数据从一个页面传递到另一个页面以进行导航

java - 使用数组时出现 NullPointerException

ios - UIWebview 禁用重定向到 AppStore

ios - 来自 2 个节点的 Firebase 查询

ios - iPhone 设备中的位置问题

node.js - ionic 应用程序中不受信任的 Node 代码 - 如何为我自己的应用程序定义和实现防火墙规则?

angular - [WDS] 断线怎么解决! Angular 7 和 Ionic 4 中的错误

java - 如何从黑莓应用程序发送 smtp 电子邮件