mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-21 08:43:01 +08:00
chore(deps): bump typedoc to 0.17
This commit is contained in:
parent
1dfd8a017a
commit
fd8d83a48a
94
package-lock.json
generated
94
package-lock.json
generated
@ -1899,15 +1899,6 @@
|
||||
"now-and-later": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"backbone": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/backbone/-/backbone-1.4.0.tgz",
|
||||
"integrity": "sha512-RLmDrRXkVdouTg38jcgHhyQ/2zjg7a8E6sz2zxfz21Hh17xDJYUHBZimVIt5fUyS8vbfpeSmTL3gUjTEvUV3qQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"underscore": ">=1.8.3"
|
||||
}
|
||||
},
|
||||
"balanced-match": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
|
||||
@ -6513,15 +6504,24 @@
|
||||
}
|
||||
},
|
||||
"handlebars": {
|
||||
"version": "4.7.3",
|
||||
"resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.3.tgz",
|
||||
"integrity": "sha512-SRGwSYuNfx8DwHD/6InAPzD6RgeruWLT+B8e8a7gGs8FWgHzlExpTFMEq2IA6QpAfOClpKHy6+8IqTjeBCu6Kg==",
|
||||
"version": "4.7.6",
|
||||
"resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.6.tgz",
|
||||
"integrity": "sha512-1f2BACcBfiwAfStCKZNrUCgqNZkGsAT7UM3kkYtXuLo0KnaVfjKOyf7PRzB6++aK9STyT1Pd2ZCPe3EGOXleXA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"minimist": "^1.2.5",
|
||||
"neo-async": "^2.6.0",
|
||||
"optimist": "^0.6.1",
|
||||
"source-map": "^0.6.1",
|
||||
"uglify-js": "^3.1.4"
|
||||
"uglify-js": "^3.1.4",
|
||||
"wordwrap": "^1.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"wordwrap": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz",
|
||||
"integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"har-schema": {
|
||||
@ -6650,9 +6650,9 @@
|
||||
}
|
||||
},
|
||||
"highlight.js": {
|
||||
"version": "9.18.1",
|
||||
"resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.18.1.tgz",
|
||||
"integrity": "sha512-OrVKYz70LHsnCgmbXctv/bfuvntIKDz177h0Co37DQ5jamGZLVmoCVMtjMtNZY3X9DrCcKfklHPNeA0uPZhSJg==",
|
||||
"version": "10.0.3",
|
||||
"resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.0.3.tgz",
|
||||
"integrity": "sha512-9FG7SSzv9yOY5CGGxfI6NDm7xLYtMOjKtPBxw7Zff3t5UcRcUNTGEeS8lNjhceL34KeetLMoGMFTGoaa83HwyQ==",
|
||||
"dev": true
|
||||
},
|
||||
"hmac-drbg": {
|
||||
@ -8214,12 +8214,6 @@
|
||||
"supports-color": "^7.0.0"
|
||||
}
|
||||
},
|
||||
"jquery": {
|
||||
"version": "3.5.0",
|
||||
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.5.0.tgz",
|
||||
"integrity": "sha512-Xb7SVYMvygPxbFMpTFQiHh1J7HClEaThguL15N/Gg37Lri/qKyhRGZYzHRyLH8Stq3Aow0LsHO2O2ci86fCrNQ==",
|
||||
"dev": true
|
||||
},
|
||||
"js-tokens": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
|
||||
@ -13503,22 +13497,21 @@
|
||||
}
|
||||
},
|
||||
"typedoc": {
|
||||
"version": "0.16.11",
|
||||
"resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.16.11.tgz",
|
||||
"integrity": "sha512-YEa5i0/n0yYmLJISJ5+po6seYfJQJ5lQYcHCPF9ffTF92DB/TAZO/QrazX5skPHNPtmlIht5FdTXCM2kC7jQFQ==",
|
||||
"version": "0.17.6",
|
||||
"resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.17.6.tgz",
|
||||
"integrity": "sha512-pQiYnhG3yJk7939cv2n8uFoTsSgy5Hfiw0dgOQYa9nT9Ya1013dMctQdAXMj8JbNu7KhcauQyq9Zql9D/TziLw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/minimatch": "3.0.3",
|
||||
"fs-extra": "^8.1.0",
|
||||
"handlebars": "^4.7.2",
|
||||
"highlight.js": "^9.17.1",
|
||||
"handlebars": "^4.7.6",
|
||||
"highlight.js": "^10.0.0",
|
||||
"lodash": "^4.17.15",
|
||||
"marked": "^0.8.0",
|
||||
"lunr": "^2.3.8",
|
||||
"marked": "1.0.0",
|
||||
"minimatch": "^3.0.0",
|
||||
"progress": "^2.0.3",
|
||||
"shelljs": "^0.8.3",
|
||||
"typedoc-default-themes": "^0.7.2",
|
||||
"typescript": "3.7.x"
|
||||
"shelljs": "^0.8.4",
|
||||
"typedoc-default-themes": "^0.10.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"fs-extra": {
|
||||
@ -13533,40 +13526,31 @@
|
||||
}
|
||||
},
|
||||
"marked": {
|
||||
"version": "0.8.1",
|
||||
"resolved": "https://registry.npmjs.org/marked/-/marked-0.8.1.tgz",
|
||||
"integrity": "sha512-tZfJS8uE0zpo7xpTffwFwYRfW9AzNcdo04Qcjs+C9+oCy8MSRD2reD5iDVtYx8mtLaqsGughw/YLlcwNxAHA1g==",
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/marked/-/marked-1.0.0.tgz",
|
||||
"integrity": "sha512-Wo+L1pWTVibfrSr+TTtMuiMfNzmZWiOPeO7rZsQUY5bgsxpHesBEcIWJloWVTFnrMXnf/TL30eTFSGJddmQAng==",
|
||||
"dev": true
|
||||
},
|
||||
"shelljs": {
|
||||
"version": "0.8.3",
|
||||
"resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.3.tgz",
|
||||
"integrity": "sha512-fc0BKlAWiLpwZljmOvAOTE/gXawtCoNrP5oaY7KIaQbbyHeQVg01pSEuEGvGh3HEdBU4baCD7wQBwADmM/7f7A==",
|
||||
"version": "0.8.4",
|
||||
"resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.4.tgz",
|
||||
"integrity": "sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"glob": "^7.0.0",
|
||||
"interpret": "^1.0.0",
|
||||
"rechoir": "^0.6.2"
|
||||
}
|
||||
},
|
||||
"typescript": {
|
||||
"version": "3.7.5",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.5.tgz",
|
||||
"integrity": "sha512-/P5lkRXkWHNAbcJIiHPfRoKqyd7bsyCma1hZNUGfn20qm64T6ZBlrzprymeu918H+mB/0rIg2gGK/BXkhhYgBw==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"typedoc-default-themes": {
|
||||
"version": "0.7.2",
|
||||
"resolved": "https://registry.npmjs.org/typedoc-default-themes/-/typedoc-default-themes-0.7.2.tgz",
|
||||
"integrity": "sha512-fiFKlFO6VTqjcno8w6WpTsbCgXmfPHVjnLfYkmByZE7moaz+E2DSpAT+oHtDHv7E0BM5kAhPrHJELP2J2Y2T9A==",
|
||||
"version": "0.10.1",
|
||||
"resolved": "https://registry.npmjs.org/typedoc-default-themes/-/typedoc-default-themes-0.10.1.tgz",
|
||||
"integrity": "sha512-SuqAQI0CkwhqSJ2kaVTgl37cWs733uy9UGUqwtcds8pkFK8oRF4rZmCq+FXTGIb9hIUOu40rf5Kojg0Ha6akeg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"backbone": "^1.4.0",
|
||||
"jquery": "^3.4.1",
|
||||
"lunr": "^2.3.8",
|
||||
"underscore": "^1.9.1"
|
||||
"lunr": "^2.3.8"
|
||||
}
|
||||
},
|
||||
"typescript": {
|
||||
@ -13627,12 +13611,6 @@
|
||||
"integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=",
|
||||
"dev": true
|
||||
},
|
||||
"underscore": {
|
||||
"version": "1.9.2",
|
||||
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.2.tgz",
|
||||
"integrity": "sha512-D39qtimx0c1fI3ya1Lnhk3E9nONswSKhnffBI0gME9C99fYOkNi04xs8K6pePLhvl1frbDemkaBQ5ikWllR2HQ==",
|
||||
"dev": true
|
||||
},
|
||||
"undertaker": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/undertaker/-/undertaker-1.2.1.tgz",
|
||||
|
@ -54,7 +54,7 @@
|
||||
"ts-node": "^8.10.1",
|
||||
"tslint": "^5.20.1",
|
||||
"tslint-ionic-rules": "0.0.21",
|
||||
"typedoc": "^0.16.11",
|
||||
"typedoc": "^0.17.6",
|
||||
"typescript": "~3.8.3",
|
||||
"typescript-tslint-plugin": "0.5.5",
|
||||
"uglifyjs-webpack-plugin": "^2.2.0",
|
||||
|
@ -1,9 +1,8 @@
|
||||
import * as fs from 'fs-extra';
|
||||
import { basename, dirname, resolve } from 'path';
|
||||
import { Application } from 'typedoc';
|
||||
import { runInNewContext } from 'vm';
|
||||
|
||||
import TypeDoc = require('typedoc');
|
||||
import { runInNewContext } from 'vm';
|
||||
|
||||
interface Plugin {
|
||||
packageName: string;
|
||||
@ -28,7 +27,7 @@ typedoc.options.addReader(new TypeDoc.TypeDocReader());
|
||||
|
||||
typedoc.bootstrap({
|
||||
mode: 'modules',
|
||||
ignoreCompilerErrors: true
|
||||
ignoreCompilerErrors: true,
|
||||
});
|
||||
|
||||
run(pluginsDir);
|
||||
@ -38,13 +37,13 @@ async function run(pluginsDir: string) {
|
||||
const modules = typedocData.children.filter(isModule);
|
||||
const plugins = modules.filter(hasPlugin).map(processPlugin);
|
||||
await fs.outputJson(resolve(__dirname, 'plugins.json'), plugins, {
|
||||
spaces: 2
|
||||
spaces: 2,
|
||||
});
|
||||
}
|
||||
|
||||
async function generateTypedoc(root: string, outputPath = typedocTmp) {
|
||||
const pluginDirs = await fs.readdir(root);
|
||||
const paths = pluginDirs.map(dir => resolve(root, dir, 'index.ts'));
|
||||
const paths = pluginDirs.map((dir) => resolve(root, dir, 'index.ts'));
|
||||
typedoc.generateJson(paths, outputPath);
|
||||
return fs.readJson(outputPath);
|
||||
}
|
||||
@ -67,8 +66,8 @@ function processPlugin(pluginModule): Plugin {
|
||||
repo: decorator.repo,
|
||||
installVariables: decorator.installVariables,
|
||||
cordovaPlugin: {
|
||||
name: decorator.plugin
|
||||
}
|
||||
name: decorator.plugin,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
@ -79,14 +78,14 @@ function processPlugin(pluginModule): Plugin {
|
||||
*/
|
||||
const getPluginDecorator = (child: any) => {
|
||||
if (isPlugin(child)) {
|
||||
const decorator = child.decorators.find(d => d.name === 'Plugin');
|
||||
const decorator = child.decorators.find((d) => d.name === 'Plugin');
|
||||
return runInNewContext(`(${decorator.arguments.config})`);
|
||||
}
|
||||
};
|
||||
|
||||
const getTag = (child: any, tagName: string): string => {
|
||||
if (hasTags(child)) {
|
||||
const tag = child.comment.tags.find(t => t.tag === tagName);
|
||||
const tag = child.comment.tags.find((t) => t.tag === tagName);
|
||||
if (tag) {
|
||||
return tag.text;
|
||||
}
|
||||
@ -101,7 +100,7 @@ const isPlugin = (child: any): boolean =>
|
||||
isClass(child) &&
|
||||
hasTags(child) &&
|
||||
Array.isArray(child.decorators) &&
|
||||
child.decorators.some(d => d.name === 'Plugin');
|
||||
child.decorators.some((d) => d.name === 'Plugin');
|
||||
|
||||
const hasPlugin = (child: any): boolean => child.children.some(isPlugin);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user