@capgo/capacitor-navigation-bar 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,17 @@
1
+ require 'json'
2
+
3
+ package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
4
+
5
+ Pod::Spec.new do |s|
6
+ s.name = 'CapgoCapacitorNavigationBar'
7
+ s.version = package['version']
8
+ s.summary = package['description']
9
+ s.license = package['license']
10
+ s.homepage = package['repository']['url']
11
+ s.author = package['author']
12
+ s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
13
+ s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
14
+ s.ios.deployment_target = '13.0'
15
+ s.dependency 'Capacitor'
16
+ s.swift_version = '5.1'
17
+ end
package/README.md ADDED
@@ -0,0 +1,47 @@
1
+ # capacitor-navigation-bar
2
+
3
+ Set navigation bar color for android lolipop and higher
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install capacitor-navigation-bar
9
+ npx cap sync
10
+ ```
11
+
12
+ ## API
13
+
14
+ <docgen-index>
15
+
16
+ * [`setNavigationBarColor(...)`](#setnavigationbarcolor)
17
+ * [`getNavigationBarColor()`](#getnavigationbarcolor)
18
+
19
+ </docgen-index>
20
+
21
+ <docgen-api>
22
+ <!--Update the source file JSDoc comments and rerun docgen to update the docs below-->
23
+
24
+ ### setNavigationBarColor(...)
25
+
26
+ ```typescript
27
+ setNavigationBarColor(options: { color: string; }) => Promise<void>
28
+ ```
29
+
30
+ | Param | Type |
31
+ | ------------- | ------------------------------- |
32
+ | **`options`** | <code>{ color: string; }</code> |
33
+
34
+ --------------------
35
+
36
+
37
+ ### getNavigationBarColor()
38
+
39
+ ```typescript
40
+ getNavigationBarColor() => Promise<{ color: string; }>
41
+ ```
42
+
43
+ **Returns:** <code>Promise&lt;{ color: string; }&gt;</code>
44
+
45
+ --------------------
46
+
47
+ </docgen-api>
@@ -0,0 +1,57 @@
1
+ ext {
2
+ junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
3
+ androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.4.2'
4
+ androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.3'
5
+ androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.4.0'
6
+ }
7
+
8
+ buildscript {
9
+ repositories {
10
+ google()
11
+ mavenCentral()
12
+ }
13
+ dependencies {
14
+ classpath 'com.android.tools.build:gradle:7.2.1'
15
+ }
16
+ }
17
+
18
+ apply plugin: 'com.android.library'
19
+
20
+ android {
21
+ compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 32
22
+ defaultConfig {
23
+ minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 22
24
+ targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 32
25
+ versionCode 1
26
+ versionName "1.0"
27
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
28
+ }
29
+ buildTypes {
30
+ release {
31
+ minifyEnabled false
32
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
33
+ }
34
+ }
35
+ lintOptions {
36
+ abortOnError false
37
+ }
38
+ compileOptions {
39
+ sourceCompatibility JavaVersion.VERSION_11
40
+ targetCompatibility JavaVersion.VERSION_11
41
+ }
42
+ }
43
+
44
+ repositories {
45
+ google()
46
+ mavenCentral()
47
+ }
48
+
49
+
50
+ dependencies {
51
+ implementation fileTree(dir: 'libs', include: ['*.jar'])
52
+ implementation project(':capacitor-android')
53
+ implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
54
+ testImplementation "junit:junit:$junitVersion"
55
+ androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
56
+ androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
57
+ }
@@ -0,0 +1,3 @@
1
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android"
2
+ package="ee.forgr.capacitor_navigation_bar">
3
+ </manifest>
@@ -0,0 +1,63 @@
1
+ package ee.forgr.capacitor_navigation_bar;
2
+
3
+ import android.os.Build;
4
+
5
+ import com.getcapacitor.JSObject;
6
+ import com.getcapacitor.Plugin;
7
+ import com.getcapacitor.PluginCall;
8
+ import com.getcapacitor.PluginMethod;
9
+ import com.getcapacitor.util.WebColor;
10
+ import com.getcapacitor.annotation.CapacitorPlugin;
11
+ import java.util.Locale;
12
+
13
+ @CapacitorPlugin(name = "NavigationBar")
14
+ public class NavigationBarPlugin extends Plugin {
15
+
16
+ @PluginMethod
17
+ public void setNavigationBarColor(PluginCall call) {
18
+ final String color = call.getString("color");
19
+ if (color == null) {
20
+ call.reject("Color must be provided");
21
+ return;
22
+ }
23
+
24
+ getBridge()
25
+ .executeOnMainThread(
26
+ () -> {
27
+ try {
28
+ final int parsedColor = WebColor.parseColor(color.toUpperCase(Locale.ROOT));
29
+ if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
30
+ getActivity().getWindow().setNavigationBarColor(parsedColor);
31
+ }
32
+ call.resolve();
33
+ } catch (IllegalArgumentException ex) {
34
+ call.reject("Invalid color provided. Must be a hex string (ex: #ff0000");
35
+ }
36
+ }
37
+ );
38
+ }
39
+
40
+ @PluginMethod
41
+ public void getNavigationBarColor(PluginCall call) {
42
+ getBridge()
43
+ .executeOnMainThread(
44
+ () -> {
45
+ try {
46
+ if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
47
+ JSObject ret = new JSObject();
48
+ int intColor = getActivity().getWindow().getNavigationBarColor();
49
+ String hexColor = String.format("#%06X", (0xFFFFFF & intColor));
50
+ ret.put("color", hexColor);
51
+ call.resolve(ret);
52
+ return;
53
+ }
54
+ JSObject ret = new JSObject();
55
+ ret.put("color", "#000000");
56
+ call.resolve(ret);
57
+ } catch (IllegalArgumentException ex) {
58
+ call.reject("Invalid color provided. Must be a hex string (ex: #ff0000");
59
+ }
60
+ }
61
+ );
62
+ }
63
+ }
File without changes
package/dist/docs.json ADDED
@@ -0,0 +1,41 @@
1
+ {
2
+ "api": {
3
+ "name": "NavigationBarPlugin",
4
+ "slug": "navigationbarplugin",
5
+ "docs": "",
6
+ "tags": [],
7
+ "methods": [
8
+ {
9
+ "name": "setNavigationBarColor",
10
+ "signature": "(options: { color: string; }) => Promise<void>",
11
+ "parameters": [
12
+ {
13
+ "name": "options",
14
+ "docs": "",
15
+ "type": "{ color: string; }"
16
+ }
17
+ ],
18
+ "returns": "Promise<void>",
19
+ "tags": [],
20
+ "docs": "",
21
+ "complexTypes": [],
22
+ "slug": "setnavigationbarcolor"
23
+ },
24
+ {
25
+ "name": "getNavigationBarColor",
26
+ "signature": "() => Promise<{ color: string; }>",
27
+ "parameters": [],
28
+ "returns": "Promise<{ color: string; }>",
29
+ "tags": [],
30
+ "docs": "",
31
+ "complexTypes": [],
32
+ "slug": "getnavigationbarcolor"
33
+ }
34
+ ],
35
+ "properties": []
36
+ },
37
+ "interfaces": [],
38
+ "enums": [],
39
+ "typeAliases": [],
40
+ "pluginConfigs": []
41
+ }
@@ -0,0 +1,8 @@
1
+ export interface NavigationBarPlugin {
2
+ setNavigationBarColor(options: {
3
+ color: string;
4
+ }): Promise<void>;
5
+ getNavigationBarColor(): Promise<{
6
+ color: string;
7
+ }>;
8
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=definitions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["export interface NavigationBarPlugin {\n setNavigationBarColor(options: { color: string }): Promise<void>;\n getNavigationBarColor(): Promise<{ color: string }>;\n}\n"]}
@@ -0,0 +1,4 @@
1
+ import type { NavigationBarPlugin } from './definitions';
2
+ declare const NavigationBar: NavigationBarPlugin;
3
+ export * from './definitions';
4
+ export { NavigationBar };
@@ -0,0 +1,7 @@
1
+ import { registerPlugin } from '@capacitor/core';
2
+ const NavigationBar = registerPlugin('NavigationBar', {
3
+ web: () => import('./web').then(m => new m.NavigationBarWeb()),
4
+ });
5
+ export * from './definitions';
6
+ export { NavigationBar };
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,aAAa,GAAG,cAAc,CAAsB,eAAe,EAAE;IACzE,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,gBAAgB,EAAE,CAAC;CAC/D,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,aAAa,EAAE,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { NavigationBarPlugin } from './definitions';\n\nconst NavigationBar = registerPlugin<NavigationBarPlugin>('NavigationBar', {\n web: () => import('./web').then(m => new m.NavigationBarWeb()),\n});\n\nexport * from './definitions';\nexport { NavigationBar };\n"]}
@@ -0,0 +1,10 @@
1
+ import { WebPlugin } from '@capacitor/core';
2
+ import type { NavigationBarPlugin } from './definitions';
3
+ export declare class NavigationBarWeb extends WebPlugin implements NavigationBarPlugin {
4
+ setNavigationBarColor(options: {
5
+ color: string;
6
+ }): Promise<void>;
7
+ getNavigationBarColor(): Promise<{
8
+ color: string;
9
+ }>;
10
+ }
@@ -0,0 +1,13 @@
1
+ import { WebPlugin } from '@capacitor/core';
2
+ export class NavigationBarWeb extends WebPlugin {
3
+ async setNavigationBarColor(options) {
4
+ console.log('Cannot setNavigationBarColor on web', options);
5
+ return;
6
+ }
7
+ ;
8
+ async getNavigationBarColor() {
9
+ console.log('Cannot getNavigationBarColor on web');
10
+ return { color: '#000000' };
11
+ }
12
+ }
13
+ //# sourceMappingURL=web.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,OAAO,gBAAiB,SAAQ,SAAS;IAC7C,KAAK,CAAC,qBAAqB,CAAC,OAA0B;QACpD,OAAO,CAAC,GAAG,CAAC,qCAAqC,EAAE,OAAO,CAAC,CAAC;QAC5D,OAAO;IACT,CAAC;IAAA,CAAC;IACF,KAAK,CAAC,qBAAqB;QACzB,OAAO,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC;QACnD,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;IAC9B,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type { NavigationBarPlugin } from './definitions';\n\nexport class NavigationBarWeb extends WebPlugin implements NavigationBarPlugin {\n async setNavigationBarColor(options: { color: string }): Promise<void> {\n console.log('Cannot setNavigationBarColor on web', options);\n return;\n };\n async getNavigationBarColor(): Promise<{ color: string }> {\n console.log('Cannot getNavigationBarColor on web');\n return { color: '#000000' };\n }\n}\n"]}
@@ -0,0 +1,29 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var core = require('@capacitor/core');
6
+
7
+ const NavigationBar = core.registerPlugin('NavigationBar', {
8
+ web: () => Promise.resolve().then(function () { return web; }).then(m => new m.NavigationBarWeb()),
9
+ });
10
+
11
+ class NavigationBarWeb extends core.WebPlugin {
12
+ async setNavigationBarColor(options) {
13
+ console.log('Cannot setNavigationBarColor on web', options);
14
+ return;
15
+ }
16
+ ;
17
+ async getNavigationBarColor() {
18
+ console.log('Cannot getNavigationBarColor on web');
19
+ return { color: '#000000' };
20
+ }
21
+ }
22
+
23
+ var web = /*#__PURE__*/Object.freeze({
24
+ __proto__: null,
25
+ NavigationBarWeb: NavigationBarWeb
26
+ });
27
+
28
+ exports.NavigationBar = NavigationBar;
29
+ //# sourceMappingURL=plugin.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst NavigationBar = registerPlugin('NavigationBar', {\n web: () => import('./web').then(m => new m.NavigationBarWeb()),\n});\nexport * from './definitions';\nexport { NavigationBar };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class NavigationBarWeb extends WebPlugin {\n async setNavigationBarColor(options) {\n console.log('Cannot setNavigationBarColor on web', options);\n return;\n }\n ;\n async getNavigationBarColor() {\n console.log('Cannot getNavigationBarColor on web');\n return { color: '#000000' };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;;;AACK,MAAC,aAAa,GAAGA,mBAAc,CAAC,eAAe,EAAE;AACtD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,gBAAgB,EAAE,CAAC;AAClE,CAAC;;ACFM,MAAM,gBAAgB,SAASC,cAAS,CAAC;AAChD,IAAI,MAAM,qBAAqB,CAAC,OAAO,EAAE;AACzC,QAAQ,OAAO,CAAC,GAAG,CAAC,qCAAqC,EAAE,OAAO,CAAC,CAAC;AACpE,QAAQ,OAAO;AACf,KAAK;AACL;AACA,IAAI,MAAM,qBAAqB,GAAG;AAClC,QAAQ,OAAO,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC;AAC3D,QAAQ,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;AACpC,KAAK;AACL;;;;;;;;;"}
package/dist/plugin.js ADDED
@@ -0,0 +1,32 @@
1
+ var capacitorNavigationBar = (function (exports, core) {
2
+ 'use strict';
3
+
4
+ const NavigationBar = core.registerPlugin('NavigationBar', {
5
+ web: () => Promise.resolve().then(function () { return web; }).then(m => new m.NavigationBarWeb()),
6
+ });
7
+
8
+ class NavigationBarWeb extends core.WebPlugin {
9
+ async setNavigationBarColor(options) {
10
+ console.log('Cannot setNavigationBarColor on web', options);
11
+ return;
12
+ }
13
+ ;
14
+ async getNavigationBarColor() {
15
+ console.log('Cannot getNavigationBarColor on web');
16
+ return { color: '#000000' };
17
+ }
18
+ }
19
+
20
+ var web = /*#__PURE__*/Object.freeze({
21
+ __proto__: null,
22
+ NavigationBarWeb: NavigationBarWeb
23
+ });
24
+
25
+ exports.NavigationBar = NavigationBar;
26
+
27
+ Object.defineProperty(exports, '__esModule', { value: true });
28
+
29
+ return exports;
30
+
31
+ })({}, capacitorExports);
32
+ //# sourceMappingURL=plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst NavigationBar = registerPlugin('NavigationBar', {\n web: () => import('./web').then(m => new m.NavigationBarWeb()),\n});\nexport * from './definitions';\nexport { NavigationBar };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class NavigationBarWeb extends WebPlugin {\n async setNavigationBarColor(options) {\n console.log('Cannot setNavigationBarColor on web', options);\n return;\n }\n ;\n async getNavigationBarColor() {\n console.log('Cannot getNavigationBarColor on web');\n return { color: '#000000' };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,aAAa,GAAGA,mBAAc,CAAC,eAAe,EAAE;IACtD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,gBAAgB,EAAE,CAAC;IAClE,CAAC;;ICFM,MAAM,gBAAgB,SAASC,cAAS,CAAC;IAChD,IAAI,MAAM,qBAAqB,CAAC,OAAO,EAAE;IACzC,QAAQ,OAAO,CAAC,GAAG,CAAC,qCAAqC,EAAE,OAAO,CAAC,CAAC;IACpE,QAAQ,OAAO;IACf,KAAK;IACL;IACA,IAAI,MAAM,qBAAqB,GAAG;IAClC,QAAQ,OAAO,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC;IAC3D,QAAQ,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;IACpC,KAAK;IACL;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,24 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>CFBundleDevelopmentRegion</key>
6
+ <string>$(DEVELOPMENT_LANGUAGE)</string>
7
+ <key>CFBundleExecutable</key>
8
+ <string>$(EXECUTABLE_NAME)</string>
9
+ <key>CFBundleIdentifier</key>
10
+ <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
11
+ <key>CFBundleInfoDictionaryVersion</key>
12
+ <string>6.0</string>
13
+ <key>CFBundleName</key>
14
+ <string>$(PRODUCT_NAME)</string>
15
+ <key>CFBundlePackageType</key>
16
+ <string>FMWK</string>
17
+ <key>CFBundleShortVersionString</key>
18
+ <string>1.0</string>
19
+ <key>CFBundleVersion</key>
20
+ <string>$(CURRENT_PROJECT_VERSION)</string>
21
+ <key>NSPrincipalClass</key>
22
+ <string></string>
23
+ </dict>
24
+ </plist>
@@ -0,0 +1,10 @@
1
+ #import <UIKit/UIKit.h>
2
+
3
+ //! Project version number for Plugin.
4
+ FOUNDATION_EXPORT double PluginVersionNumber;
5
+
6
+ //! Project version string for Plugin.
7
+ FOUNDATION_EXPORT const unsigned char PluginVersionString[];
8
+
9
+ // In this header, you should import all the public headers of your framework using statements like #import <Plugin/PublicHeader.h>
10
+
@@ -0,0 +1,8 @@
1
+ #import <Foundation/Foundation.h>
2
+ #import <Capacitor/Capacitor.h>
3
+
4
+ // Define the plugin using the CAP_PLUGIN Macro, and
5
+ // each method the plugin supports using the CAP_PLUGIN_METHOD macro.
6
+ CAP_PLUGIN(NavigationBarPlugin, "NavigationBar",
7
+ CAP_PLUGIN_METHOD(echo, CAPPluginReturnPromise);
8
+ )
@@ -0,0 +1,24 @@
1
+ import Foundation
2
+ import Capacitor
3
+
4
+ /**
5
+ * Please read the Capacitor iOS Plugin Development Guide
6
+ * here: https://capacitorjs.com/docs/plugins/ios
7
+ */
8
+ @objc(NavigationBarPlugin)
9
+ public class NavigationBarPlugin: CAPPlugin {
10
+
11
+ @objc func setNavigationBarColor(_ call: CAPPluginCall) {
12
+ let color = call.getString("color") ?? ""
13
+ print("Cannot set navigation bar color in ios \(color)")
14
+ call.resolve([
15
+ "value": false
16
+ ])
17
+ }
18
+ @objc func getNavigationBarColor(_ call: CAPPluginCall) {
19
+ print("Cannot get navigation bar color in ios")
20
+ call.resolve([
21
+ "color": "#000000"
22
+ ])
23
+ }
24
+ }
package/package.json ADDED
@@ -0,0 +1,79 @@
1
+ {
2
+ "name": "@capgo/capacitor-navigation-bar",
3
+ "private": false,
4
+ "version": "0.0.1",
5
+ "description": "Set navigation bar color for android lolipop and higher",
6
+ "main": "dist/plugin.cjs.js",
7
+ "module": "dist/esm/index.js",
8
+ "types": "dist/esm/index.d.ts",
9
+ "unpkg": "dist/plugin.js",
10
+ "files": [
11
+ "android/src/main/",
12
+ "android/build.gradle",
13
+ "dist/",
14
+ "ios/Plugin/",
15
+ "CapgoCapacitorNavigationBar.podspec"
16
+ ],
17
+ "author": "Martin Donadieu <martindonadieu@gmail.com>",
18
+ "license": "MIT",
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "git+https://github.com/Cap-go/capacitor-navigation-bar.git"
22
+ },
23
+ "bugs": {
24
+ "url": "https://github.com/Cap-go/capacitor-navigation-bar/issues"
25
+ },
26
+ "keywords": [
27
+ "capacitor",
28
+ "plugin",
29
+ "native"
30
+ ],
31
+ "scripts": {
32
+ "verify": "npm run verify:ios && npm run verify:android && npm run verify:web",
33
+ "verify:ios": "cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin -destination generic/platform=iOS && cd ..",
34
+ "verify:android": "cd android && ./gradlew clean build test && cd ..",
35
+ "verify:web": "npm run build",
36
+ "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
37
+ "fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format",
38
+ "eslint": "eslint . --ext ts",
39
+ "prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
40
+ "swiftlint": "node-swiftlint",
41
+ "docgen": "docgen --api NavigationBarPlugin --output-readme README.md --output-json dist/docs.json",
42
+ "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js",
43
+ "clean": "rimraf ./dist",
44
+ "watch": "tsc --watch",
45
+ "prepublishOnly": "npm run build"
46
+ },
47
+ "devDependencies": {
48
+ "@capacitor/android": "^4.0.0",
49
+ "@capacitor/core": "^4.0.0",
50
+ "@capacitor/docgen": "^0.0.18",
51
+ "@capacitor/ios": "^4.0.0",
52
+ "@ionic/eslint-config": "^0.3.0",
53
+ "@ionic/prettier-config": "^1.0.1",
54
+ "@ionic/swiftlint-config": "^1.1.2",
55
+ "eslint": "^7.11.0",
56
+ "prettier": "~2.3.0",
57
+ "prettier-plugin-java": "~1.0.2",
58
+ "rimraf": "^3.0.2",
59
+ "rollup": "^2.32.0",
60
+ "swiftlint": "^1.0.1",
61
+ "typescript": "~4.1.5"
62
+ },
63
+ "peerDependencies": {
64
+ "@capacitor/core": "^4.0.0"
65
+ },
66
+ "prettier": "@ionic/prettier-config",
67
+ "swiftlint": "@ionic/swiftlint-config",
68
+ "eslintConfig": {
69
+ "extends": "@ionic/eslint-config/recommended"
70
+ },
71
+ "capacitor": {
72
+ "ios": {
73
+ "src": "ios"
74
+ },
75
+ "android": {
76
+ "src": "android"
77
+ }
78
+ }
79
+ }