Skip to content

Commit 53d1543

Browse files
committed
chore: run docgen during build
1 parent eaee5bc commit 53d1543

File tree

14 files changed

+152
-120
lines changed

14 files changed

+152
-120
lines changed

Diff for: CONTRIBUTING.md

+9
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,15 @@ Capacitor packages are published using [Lerna](https://github.com/lerna/lerna) w
7070

7171
During Capacitor 3 development, the following workflow is used to create dev releases:
7272

73+
1. Make sure the `README.md` files are updated with the current API.
74+
* Run the doc generator.
75+
76+
```shell
77+
npx lerna run docgen
78+
```
79+
80+
* Commit any changes.
81+
7382
1. Create the next development version. The following command will:
7483
* Create a release commit with a generated changelog
7584
* Create a git tag

Diff for: action-sheet/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
3131
"swiftlint": "node-swiftlint",
3232
"docgen": "docgen --api ActionSheetPlugin --output-readme README.md --output-json dist/docs.json",
33-
"build": "npm run clean && tsc && rollup -c rollup.config.js",
33+
"build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js",
3434
"clean": "rimraf ./dist",
3535
"watch": "tsc --watch",
3636
"prepublishOnly": "npm run build"

Diff for: clipboard/package.json

+20-17
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,20 @@
55
"main": "dist/plugin.js",
66
"module": "dist/esm/index.js",
77
"types": "dist/esm/index.d.ts",
8+
"author": "Ionic <[email protected]>",
9+
"license": "MIT",
10+
"repository": {
11+
"type": "git",
12+
"url": "https://github.com/ionic-team/capacitor-plugins"
13+
},
14+
"bugs": {
15+
"url": "https://github.com/ionic-team/capacitor-plugins/issues"
16+
},
17+
"keywords": [
18+
"capacitor",
19+
"plugin",
20+
"native"
21+
],
822
"scripts": {
923
"verify": "npm run verify:ios && npm run verify:android && npm run verify:web",
1024
"verify:ios": "cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin && cd ..",
@@ -16,13 +30,11 @@
1630
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
1731
"swiftlint": "node-swiftlint",
1832
"docgen": "docgen --api ClipboardPlugin --output-readme README.md --output-json dist/docs.json",
19-
"build": "npm run clean && tsc && rollup -c rollup.config.js",
33+
"build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js",
2034
"clean": "rimraf ./dist",
2135
"watch": "tsc --watch",
2236
"prepublishOnly": "npm run build"
2337
},
24-
"author": "Ionic <[email protected]>",
25-
"license": "MIT",
2638
"devDependencies": {
2739
"@capacitor/android": "^3.0.0-alpha.5",
2840
"@capacitor/core": "^3.0.0-alpha.5",
@@ -43,11 +55,11 @@
4355
"peerDependencies": {
4456
"@capacitor/core": "^3.0.0-alpha.5"
4557
},
46-
"keywords": [
47-
"capacitor",
48-
"plugin",
49-
"native"
50-
],
58+
"prettier": "@ionic/prettier-config",
59+
"swiftlint": "@ionic/swiftlint-config",
60+
"eslintConfig": {
61+
"extends": "@ionic/eslint-config/recommended"
62+
},
5163
"capacitor": {
5264
"ios": {
5365
"src": "ios"
@@ -56,15 +68,6 @@
5668
"src": "android"
5769
}
5870
},
59-
"prettier": "@ionic/prettier-config",
60-
"swiftlint": "@ionic/swiftlint-config",
61-
"eslintConfig": {
62-
"extends": "@ionic/eslint-config/recommended"
63-
},
64-
"repository": {
65-
"type": "git",
66-
"url": "https://github.com/ionic-team/capacitor-plugins"
67-
},
6871
"publishConfig": {
6972
"access": "public"
7073
}

Diff for: device/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
3131
"swiftlint": "node-swiftlint",
3232
"docgen": "docgen --api DevicePlugin --output-readme README.md --output-json dist/docs.json",
33-
"build": "npm run clean && tsc && rollup -c rollup.config.js",
33+
"build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js",
3434
"clean": "rimraf ./dist",
3535
"watch": "tsc --watch",
3636
"prepublishOnly": "npm run build"

Diff for: dialog/.eslintignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
build
2+
dist

Diff for: dialog/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
3131
"swiftlint": "node-swiftlint",
3232
"docgen": "docgen --api DialogPlugin --output-readme README.md --output-json dist/docs.json",
33-
"build": "npm run clean && tsc && rollup -c rollup.config.js",
33+
"build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js",
3434
"clean": "rimraf ./dist",
3535
"watch": "tsc --watch",
3636
"prepublishOnly": "npm run build"

Diff for: haptics/package.json

+20-17
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,20 @@
55
"main": "dist/plugin.js",
66
"module": "dist/esm/index.js",
77
"types": "dist/esm/index.d.ts",
8+
"author": "Ionic <[email protected]>",
9+
"license": "MIT",
10+
"repository": {
11+
"type": "git",
12+
"url": "https://github.com/ionic-team/capacitor-plugins"
13+
},
14+
"bugs": {
15+
"url": "https://github.com/ionic-team/capacitor-plugins/issues"
16+
},
17+
"keywords": [
18+
"capacitor",
19+
"plugin",
20+
"native"
21+
],
822
"scripts": {
923
"verify": "npm run verify:ios && npm run verify:android && npm run verify:web",
1024
"verify:ios": "cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin && cd ..",
@@ -16,13 +30,11 @@
1630
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
1731
"swiftlint": "node-swiftlint",
1832
"docgen": "docgen --api HapticsPlugin --output-readme README.md --output-json dist/docs.json",
19-
"build": "npm run clean && tsc && rollup -c rollup.config.js",
33+
"build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js",
2034
"clean": "rimraf ./dist",
2135
"watch": "tsc --watch",
2236
"prepublishOnly": "npm run build"
2337
},
24-
"author": "Ionic <[email protected]>",
25-
"license": "MIT",
2638
"devDependencies": {
2739
"@capacitor/android": "^3.0.0-alpha.5",
2840
"@capacitor/core": "^3.0.0-alpha.5",
@@ -43,11 +55,11 @@
4355
"peerDependencies": {
4456
"@capacitor/core": "^3.0.0-alpha.5"
4557
},
46-
"keywords": [
47-
"capacitor",
48-
"plugin",
49-
"native"
50-
],
58+
"prettier": "@ionic/prettier-config",
59+
"swiftlint": "@ionic/swiftlint-config",
60+
"eslintConfig": {
61+
"extends": "@ionic/eslint-config/recommended"
62+
},
5163
"capacitor": {
5264
"ios": {
5365
"src": "ios"
@@ -56,15 +68,6 @@
5668
"src": "android"
5769
}
5870
},
59-
"prettier": "@ionic/prettier-config",
60-
"swiftlint": "@ionic/swiftlint-config",
61-
"eslintConfig": {
62-
"extends": "@ionic/eslint-config/recommended"
63-
},
64-
"repository": {
65-
"type": "git",
66-
"url": "https://github.com/ionic-team/capacitor-plugins"
67-
},
6871
"publishConfig": {
6972
"access": "public"
7073
}

Diff for: motion/package.json

+16-13
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,32 @@
55
"main": "dist/plugin.js",
66
"module": "dist/esm/index.js",
77
"types": "dist/esm/index.d.ts",
8+
"author": "Ionic <[email protected]>",
9+
"license": "MIT",
10+
"repository": {
11+
"type": "git",
12+
"url": "https://github.com/ionic-team/capacitor-plugins"
13+
},
14+
"bugs": {
15+
"url": "https://github.com/ionic-team/capacitor-plugins/issues"
16+
},
17+
"keywords": [
18+
"capacitor",
19+
"plugin",
20+
"native"
21+
],
822
"scripts": {
923
"lint": "npm run eslint && npm run prettier -- --check",
1024
"fmt": "npm run eslint -- --fix && npm run prettier -- --write",
1125
"eslint": "eslint . --ext ts",
1226
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
1327
"docgen": "docgen --api MotionPlugin --output-readme README.md --output-json dist/docs.json",
14-
"build": "npm run clean && tsc && rollup -c rollup.config.js",
28+
"build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js",
1529
"clean": "rimraf ./dist",
1630
"verify": "npm run build",
1731
"watch": "tsc --watch",
1832
"prepublishOnly": "npm run build"
1933
},
20-
"author": "Ionic <[email protected]>",
21-
"license": "MIT",
2234
"devDependencies": {
2335
"@capacitor/android": "^3.0.0-alpha.5",
2436
"@capacitor/core": "^3.0.0-alpha.5",
@@ -37,20 +49,11 @@
3749
"peerDependencies": {
3850
"@capacitor/core": "^3.0.0-alpha.5"
3951
},
40-
"keywords": [
41-
"capacitor",
42-
"plugin",
43-
"native"
44-
],
45-
"capacitor": {},
4652
"prettier": "@ionic/prettier-config",
4753
"eslintConfig": {
4854
"extends": "@ionic/eslint-config/recommended"
4955
},
50-
"repository": {
51-
"type": "git",
52-
"url": "https://github.com/ionic-team/capacitor-plugins"
53-
},
56+
"capacitor": {},
5457
"publishConfig": {
5558
"access": "public"
5659
}

Diff for: network/package.json

+20-17
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,20 @@
55
"main": "dist/plugin.js",
66
"module": "dist/esm/index.js",
77
"types": "dist/esm/index.d.ts",
8+
"author": "Ionic <[email protected]>",
9+
"license": "MIT",
10+
"repository": {
11+
"type": "git",
12+
"url": "https://github.com/ionic-team/capacitor-plugins"
13+
},
14+
"bugs": {
15+
"url": "https://github.com/ionic-team/capacitor-plugins/issues"
16+
},
17+
"keywords": [
18+
"capacitor",
19+
"plugin",
20+
"native"
21+
],
822
"scripts": {
923
"verify": "npm run verify:ios && npm run verify:android && npm run verify:web",
1024
"verify:ios": "cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin && cd ..",
@@ -16,13 +30,11 @@
1630
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
1731
"swiftlint": "node-swiftlint",
1832
"docgen": "docgen --api NetworkPlugin --output-readme README.md --output-json dist/docs.json",
19-
"build": "npm run clean && tsc && rollup -c rollup.config.js",
33+
"build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js",
2034
"clean": "rimraf ./dist",
2135
"watch": "tsc --watch",
2236
"prepublishOnly": "npm run build"
2337
},
24-
"author": "Ionic <[email protected]>",
25-
"license": "MIT",
2638
"devDependencies": {
2739
"@capacitor/android": "^3.0.0-alpha.5",
2840
"@capacitor/core": "^3.0.0-alpha.5",
@@ -43,11 +55,11 @@
4355
"peerDependencies": {
4456
"@capacitor/core": "^3.0.0-alpha.5"
4557
},
46-
"keywords": [
47-
"capacitor",
48-
"plugin",
49-
"native"
50-
],
58+
"prettier": "@ionic/prettier-config",
59+
"swiftlint": "@ionic/swiftlint-config",
60+
"eslintConfig": {
61+
"extends": "@ionic/eslint-config/recommended"
62+
},
5163
"capacitor": {
5264
"ios": {
5365
"src": "ios"
@@ -56,15 +68,6 @@
5668
"src": "android"
5769
}
5870
},
59-
"prettier": "@ionic/prettier-config",
60-
"swiftlint": "@ionic/swiftlint-config",
61-
"eslintConfig": {
62-
"extends": "@ionic/eslint-config/recommended"
63-
},
64-
"repository": {
65-
"type": "git",
66-
"url": "https://github.com/ionic-team/capacitor-plugins"
67-
},
6871
"publishConfig": {
6972
"access": "public"
7073
}

Diff for: screen-reader/package.json

+20-17
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,20 @@
55
"main": "dist/plugin.js",
66
"module": "dist/esm/index.js",
77
"types": "dist/esm/index.d.ts",
8+
"author": "Ionic <[email protected]>",
9+
"license": "MIT",
10+
"repository": {
11+
"type": "git",
12+
"url": "https://github.com/ionic-team/capacitor-plugins"
13+
},
14+
"bugs": {
15+
"url": "https://github.com/ionic-team/capacitor-plugins/issues"
16+
},
17+
"keywords": [
18+
"capacitor",
19+
"plugin",
20+
"native"
21+
],
822
"scripts": {
923
"verify": "npm run verify:ios && npm run verify:android && npm run verify:web",
1024
"verify:ios": "cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin && cd ..",
@@ -16,13 +30,11 @@
1630
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
1731
"swiftlint": "node-swiftlint",
1832
"docgen": "docgen --api ScreenReaderPlugin --output-readme README.md --output-json dist/docs.json",
19-
"build": "npm run clean && tsc && rollup -c rollup.config.js",
33+
"build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js",
2034
"clean": "rimraf ./dist",
2135
"watch": "tsc --watch",
2236
"prepublishOnly": "npm run build"
2337
},
24-
"author": "Ionic <[email protected]>",
25-
"license": "MIT",
2638
"devDependencies": {
2739
"@capacitor/android": "^3.0.0-alpha.5",
2840
"@capacitor/core": "^3.0.0-alpha.5",
@@ -43,11 +55,11 @@
4355
"peerDependencies": {
4456
"@capacitor/core": "^3.0.0-alpha.5"
4557
},
46-
"keywords": [
47-
"capacitor",
48-
"plugin",
49-
"native"
50-
],
58+
"prettier": "@ionic/prettier-config",
59+
"swiftlint": "@ionic/swiftlint-config",
60+
"eslintConfig": {
61+
"extends": "@ionic/eslint-config/recommended"
62+
},
5163
"capacitor": {
5264
"ios": {
5365
"src": "ios"
@@ -56,15 +68,6 @@
5668
"src": "android"
5769
}
5870
},
59-
"prettier": "@ionic/prettier-config",
60-
"swiftlint": "@ionic/swiftlint-config",
61-
"eslintConfig": {
62-
"extends": "@ionic/eslint-config/recommended"
63-
},
64-
"repository": {
65-
"type": "git",
66-
"url": "https://github.com/ionic-team/capacitor-plugins"
67-
},
6871
"publishConfig": {
6972
"access": "public"
7073
}

Diff for: share/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
3131
"swiftlint": "node-swiftlint",
3232
"docgen": "docgen --api SharePlugin --output-readme README.md --output-json dist/docs.json",
33-
"build": "npm run clean && tsc && rollup -c rollup.config.js",
33+
"build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js",
3434
"clean": "rimraf ./dist",
3535
"watch": "tsc --watch",
3636
"prepublishOnly": "npm run build"

0 commit comments

Comments
 (0)