Skip to content

Commit

Permalink
Merge pull request #655 from SUI-Components/feat/sui-app-minor-ajustm…
Browse files Browse the repository at this point in the history
…ents

feat(components/tool/app): Add capacitor app to sui-app
  • Loading branch information
oegea authored Apr 24, 2024
2 parents 827f205 + 4c86db1 commit 45d06e0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions components/tool/app/bin/commands/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ module.exports = async () => {

if (!hasDependency('@capgo/capacitor-updater')) installDependency('@capgo/capacitor-updater')

if (!hasDependency('@capacitor/app')) installDependency('@capacitor/app')

// If app has already been initialized
if (hasCapacitorConfig()) {
reportError(`\nThis project has already-been initialized. Please run sui-app remove before initializing again.\n`)
Expand Down
1 change: 1 addition & 0 deletions components/tool/app/bin/commands/remove.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const uninstallPlugins = () => {
uninstallPackage('@capgo/capacitor-native-biometric')
uninstallPackage('@capacitor/local-notifications')
uninstallPackage('@capgo/capacitor-updater')
uninstallPackage('@capacitor/app')
}

// Business logic
Expand Down
1 change: 1 addition & 0 deletions components/tool/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
},
"dependencies": {
"@capacitor/android": "^5.5.1",
"@capacitor/app": "^5.0.7",
"@capacitor/cli": "^5.5.1",
"@capacitor/core": "^5.5.1",
"@capacitor/ios": "^5.5.1",
Expand Down
2 changes: 2 additions & 0 deletions components/tool/app/src/core.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import {App} from '@capacitor/app'
import {Capacitor} from '@capacitor/core'

export const isNative = () => Capacitor.isNativePlatform()
export const getApp = () => App

0 comments on commit 45d06e0

Please sign in to comment.