diff --git a/LICENSE.md b/LICENSE.md index e4ab1f6..572989b 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,7 +1,7 @@ MIT License -Copyright (c) 2019 Sebastian Hübner -Copyright (c) 2017 – 2019 Gerard Delmàs +Copyright (c) 2020 Sebastian Hübner +Copyright (c) 2017 – 2020 Gerard Delmàs Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/package-lock.json b/package-lock.json index 78a0604..71dddee 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "typedoc-plugin-devops-sourcefile", - "version": "1.0.2", + "version": "1.0.6", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -20,9 +20,9 @@ "dev": true }, "@types/node": { - "version": "12.7.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.7.1.tgz", - "integrity": "sha512-aK9jxMypeSrhiYofWWBf/T7O+KwaiAHzM4sveCdWPn71lzUSMimRnKzhXDKfKwV1kWoBo2P1aGgaIYGLf9/ljw==", + "version": "13.13.15", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.15.tgz", + "integrity": "sha512-kwbcs0jySLxzLsa2nWUAGOd/s21WU1jebrEdtzhsj1D4Yps1EOuyI1Qcu+FD56dL7NRNIJtDDjcqIG22NwkgLw==", "dev": true }, "backbone": { @@ -50,13 +50,6 @@ "concat-map": "0.0.1" } }, - "commander": { - "version": "2.20.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", - "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==", - "dev": true, - "optional": true - }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -81,9 +74,9 @@ "dev": true }, "glob": { - "version": "7.1.4", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", - "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -101,21 +94,22 @@ "dev": true }, "handlebars": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.1.2.tgz", - "integrity": "sha512-nvfrjqvt9xQ8Z/w0ijewdD/vvWDTOweBUm96NTr66Wfvo1mJenBLwcYmPs3TIBP5ruzYGD7Hx/DaM9RmhroGPw==", + "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" } }, "highlight.js": { - "version": "9.15.9", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.15.9.tgz", - "integrity": "sha512-M0zZvfLr5p0keDMCAhNBp03XJbKBxUx5AfyfufMdFMEP4N/Xj6dh0IqC75ys7BAzceR34NgcvXjupRVaHBPPVQ==", + "version": "9.18.3", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.18.3.tgz", + "integrity": "sha512-zBZAmhSupHIl5sITeMqIJnYCDfAEc3Gdkqj65wC1lpI468MMQeeQkhcIAvk+RylAkxrCcI9xy9piHiXeQ1BdzQ==", "dev": true }, "inflight": { @@ -135,15 +129,15 @@ "dev": true }, "interpret": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz", - "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", "dev": true }, "jquery": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.4.1.tgz", - "integrity": "sha512-36+AdBzCL+y6qjw5Tx7HgzeGCzC81MDDgaUP8ld2zhx58HdqXGoBd+tHdrBMiyjGQs0Hxs/MLZTu/eHNJJuWPw==", + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.5.1.tgz", + "integrity": "sha512-XwIBPqcMn57FxfT+Go5pzySnm4KWkT1Tv7gjrpT1srtf8Weynl6R273VJ5GjkRb51IzMp5nbaPjJXMWeju2MKg==", "dev": true }, "jsonfile": { @@ -156,21 +150,21 @@ } }, "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", + "version": "4.17.19", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", + "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==", "dev": true }, "lunr": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.6.tgz", - "integrity": "sha512-swStvEyDqQ85MGpABCMBclZcLI/pBIlu8FFDtmX197+oEgKloJ67QnB+Tidh0340HmLMs39c4GrkPY3cmkXp6Q==", + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.8.tgz", + "integrity": "sha512-oxMeX/Y35PNFuZoHp+jUj5OSEmLCaIH4KTFJh7a93cHBoFmpw2IoPs22VIz7vyO2YUnx2Tn9dzIwO2P/4quIRg==", "dev": true }, "marked": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/marked/-/marked-0.7.0.tgz", - "integrity": "sha512-c+yYdCZJQrsRjTPhUx7VKkApw9bwDkNbHUKo1ovgcfDjb2kc8rLuRbIFyXL5WOEUwzSSKo3IXpph2K6DqB/KZg==", + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/marked/-/marked-0.8.2.tgz", + "integrity": "sha512-EGwzEeCcLniFX51DhTpmTom+dSA/MG/OBUDjnWtHbEnjAH180VzUeAw+oE4+Zv+CoYBWyRlYOTR0N8SO9R1PVw==", "dev": true }, "minimatch": { @@ -183,15 +177,15 @@ } }, "minimist": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", - "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true }, "neo-async": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", - "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", "dev": true }, "once": { @@ -203,16 +197,6 @@ "wrappy": "1" } }, - "optimist": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", - "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", - "dev": true, - "requires": { - "minimist": "~0.0.1", - "wordwrap": "~0.0.2" - } - }, "path": { "version": "0.12.7", "resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz", @@ -257,18 +241,18 @@ } }, "resolve": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.12.0.tgz", - "integrity": "sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w==", + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", + "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", "dev": true, "requires": { "path-parse": "^1.0.6" } }, "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", @@ -283,57 +267,61 @@ "dev": true }, "typedoc": { - "version": "0.15.0", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.15.0.tgz", - "integrity": "sha512-NOtfq5Tis4EFt+J2ozhVq9RCeUnfEYMFKoU6nCXCXUULJz1UQynOM+yH3TkfZCPLzigbqB0tQYGVlktUWweKlw==", + "version": "0.16.11", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.16.11.tgz", + "integrity": "sha512-YEa5i0/n0yYmLJISJ5+po6seYfJQJ5lQYcHCPF9ffTF92DB/TAZO/QrazX5skPHNPtmlIht5FdTXCM2kC7jQFQ==", "dev": true, "requires": { "@types/minimatch": "3.0.3", "fs-extra": "^8.1.0", - "handlebars": "^4.1.2", - "highlight.js": "^9.15.8", + "handlebars": "^4.7.2", + "highlight.js": "^9.17.1", "lodash": "^4.17.15", - "marked": "^0.7.0", + "marked": "^0.8.0", "minimatch": "^3.0.0", "progress": "^2.0.3", "shelljs": "^0.8.3", - "typedoc-default-themes": "^0.6.0", - "typescript": "3.5.x" + "typedoc-default-themes": "^0.7.2", + "typescript": "3.7.x" + }, + "dependencies": { + "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.6.0", - "resolved": "https://registry.npmjs.org/typedoc-default-themes/-/typedoc-default-themes-0.6.0.tgz", - "integrity": "sha512-MdTROOojxod78CEv22rIA69o7crMPLnVZPefuDLt/WepXqJwgiSu8Xxq+H36x0Jj3YGc7lOglI2vPJ2GhoOybw==", + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/typedoc-default-themes/-/typedoc-default-themes-0.7.2.tgz", + "integrity": "sha512-fiFKlFO6VTqjcno8w6WpTsbCgXmfPHVjnLfYkmByZE7moaz+E2DSpAT+oHtDHv7E0BM5kAhPrHJELP2J2Y2T9A==", "dev": true, "requires": { "backbone": "^1.4.0", "jquery": "^3.4.1", - "lunr": "^2.3.6", + "lunr": "^2.3.8", "underscore": "^1.9.1" } }, "typescript": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.3.tgz", - "integrity": "sha512-ACzBtm/PhXBDId6a6sDJfroT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g==", + "version": "3.9.7", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.7.tgz", + "integrity": "sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw==", "dev": true }, "uglify-js": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.0.tgz", - "integrity": "sha512-W+jrUHJr3DXKhrsS7NUVxn3zqMOFn0hL/Ei6v0anCIMoKC93TjcflTagwIHLW7SfMFfiQuktQyFVCFHGUE0+yg==", + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.10.1.tgz", + "integrity": "sha512-RjxApKkrPJB6kjJxQS3iZlf///REXWYxYJxO/MpmlQzVkDWVI3PSnCBWezMecmTU/TRkNxrl8bmsfFQCp+LO+Q==", "dev": true, - "optional": true, - "requires": { - "commander": "~2.20.0", - "source-map": "~0.6.1" - } + "optional": true }, "underscore": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.1.tgz", - "integrity": "sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg==", + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.10.2.tgz", + "integrity": "sha512-N4P+Q/BuyuEKFJ43B9gYuOj4TQUHXX+j2FqguVOpjkssLUUrnJofCcBccJSCoeturDoZU6GorDTHSvUDlSQbTg==", "dev": true }, "universalify": { @@ -360,9 +348,9 @@ } }, "wordwrap": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", - "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", "dev": true }, "wrappy": { diff --git a/package.json b/package.json index 23f701a..7b22915 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "author": "Sebastian Hübner", "name": "typedoc-plugin-devops-sourcefile", - "version": "1.0.2", + "version": "1.0.6", "description": "typedoc plugin to set source file URL links to a Git repository hosted in Azure DevOps", "homepage": "https://github.com/shuebner20/typedoc-plugin-devops-sourcefile", "bugs": "https://github.com/shuebner20/typedoc-plugin-devops-sourcefile/issues", @@ -16,14 +16,15 @@ "devops" ], "peerDependencies": { - "typedoc": ">=0.15.0" + "typedoc": ">=0.16.0" }, "devDependencies": { "@types/fs-extra": "^8.0.0", + "@types/node": "^13.9.0", "fs-extra": "^8.1.0", "path": "^0.12.7", - "typedoc": "^0.15.0", - "typescript": "^3.5.3" + "typedoc": "^0.16.11", + "typescript": "^3.7.5" }, "main": "dist/main.js", "scripts": { diff --git a/src/DevopsSourcefileMapPlugin.ts b/src/DevopsSourcefileMapPlugin.ts index 89a3325..05700ca 100644 --- a/src/DevopsSourcefileMapPlugin.ts +++ b/src/DevopsSourcefileMapPlugin.ts @@ -1,11 +1,11 @@ -import * as FS from "fs-extra"; -import * as Path from "path"; -import {ConverterComponent} from "typedoc/dist/lib/converter/components"; -import {Context} from "typedoc/dist/lib/converter/context"; -import {Converter} from "typedoc/dist/lib/converter/converter"; -import {SourceReference} from "typedoc/dist/lib/models/sources/file"; -import {Component} from "typedoc/dist/lib/utils/component"; -import {Options} from "typedoc/dist/lib/utils/options/options"; +import * as fs from "fs"; +import * as path from "path"; +import { ConverterComponent } from "typedoc/dist/lib/converter/components"; +import { Context } from "typedoc/dist/lib/converter/context"; +import { Converter } from "typedoc/dist/lib/converter/converter"; +import { SourceReference } from "typedoc/dist/lib/models/sources/file"; +import { Component } from "typedoc/dist/lib/utils/component"; +import { Options } from "typedoc/dist/lib/utils/options/options"; interface ISourcefileMapping { pattern: RegExp; @@ -13,7 +13,7 @@ interface ISourcefileMapping { version?: string; } -@Component({name: "devops-sourcefile"}) +@Component({ name: "devops-sourcefile" }) export class DevopsSourcefileMapPlugin extends ConverterComponent { private mappings: ISourcefileMapping[] | undefined; @@ -23,23 +23,22 @@ export class DevopsSourcefileMapPlugin extends ConverterComponent { } private onBegin(): void { - // read options parameter - const options: Options = this.application.options; - const mapRelativePath = options.getValue("devops-sourcefile-url-map"); - const urlPrefix = options.getValue("devops-sourcefile-url-prefix"); + // read options parameters + const mapRelativePath = this.readStringOption("sourcefile-url-map"); + const urlPrefix = this.readStringOption("sourcefile-url-prefix"); - if ( (typeof mapRelativePath !== "string") && (typeof urlPrefix !== "string") ) { + if (!mapRelativePath && !urlPrefix) { return; } try { - if ( (typeof mapRelativePath === "string") && (typeof urlPrefix === "string") ) { + if (mapRelativePath && urlPrefix) { throw new Error("use either --devops-sourcefile-url-prefix or --devops-sourcefile-url-map option"); } - if ( typeof mapRelativePath === "string" ) { + if (mapRelativePath) { this.readMappingJson(mapRelativePath); - } else if ( typeof urlPrefix === "string" ) { + } else if (urlPrefix) { this.mappings = [{ pattern: new RegExp("^"), replace: urlPrefix, @@ -49,31 +48,42 @@ export class DevopsSourcefileMapPlugin extends ConverterComponent { // register handler this.listenTo(this.owner, Converter.EVENT_RESOLVE_END, this.onEndResolve); - } catch ( e ) { + } catch (e) { console.error("typedoc-plugin-sourcefile-url: " + e.message); } } + private readStringOption(name: string): string | undefined { + const options: Options = this.application.options; + const value = options.getValue(name); + + if (typeof value !== "string") { + return undefined; + } + + return value; + } + private readMappingJson(mapRelativePath: string): void { // load json - const mapAbsolutePath = Path.join(process.cwd(), mapRelativePath); + const mapAbsolutePath = path.join(process.cwd(), mapRelativePath); let json: any; try { - json = JSON.parse(FS.readFileSync(mapAbsolutePath, "utf8")); - } catch ( e ) { + json = JSON.parse(fs.readFileSync(mapAbsolutePath, "utf8")); + } catch (e) { throw new Error("error reading --devops-sourcefile-url-map json file: " + e.message); } // validate json - if ( !(json instanceof Array) ) { + if (!(json instanceof Array)) { throw new Error("--devops-sourcefile-url-map json file has to have Array as root element"); } this.mappings = []; // validate & process json - for ( const mappingJson of json ) { + for (const mappingJson of json) { if (mappingJson instanceof Object && mappingJson.hasOwnProperty("pattern") && typeof mappingJson.pattern === "string" && mappingJson.hasOwnProperty("replace") && typeof mappingJson.replace === "string") { @@ -83,7 +93,7 @@ export class DevopsSourcefileMapPlugin extends ConverterComponent { try { regExp = new RegExp(mappingJson.pattern); - } catch ( e ) { + } catch (e) { throw new Error("error reading --devops-sourcefile-url-map: " + e.message); } @@ -110,16 +120,16 @@ export class DevopsSourcefileMapPlugin extends ConverterComponent { } private onEndResolve(context: Context): void { - if ( this.mappings === undefined ) { + if (this.mappings === undefined) { throw new Error("assertion fail"); } const project = context.project; // process mappings - for ( const sourceFile of project.files ) { - for ( const mapping of this.mappings ) { - if ( sourceFile.fileName.match(mapping.pattern) ) { + for (const sourceFile of project.files) { + for (const mapping of this.mappings) { + if (sourceFile.fileName.match(mapping.pattern)) { sourceFile.url = sourceFile.fileName.replace(mapping.pattern, mapping.replace); if (typeof mapping.version === "string") { sourceFile.url += "&version=" + encodeURIComponent(mapping.version); @@ -130,10 +140,10 @@ export class DevopsSourcefileMapPlugin extends ConverterComponent { } // add line anchors - for ( const key in project.reflections ) { + for (const key in project.reflections) { const reflection = project.reflections[key]; - if ( reflection.sources ) { + if (reflection.sources) { reflection.sources.forEach((source: SourceReference) => { if (source.file && source.file.url) { source.url = source.file.url + "&line=" + source.line; diff --git a/src/main.js b/src/main.js index d78311d..43f4fd4 100644 --- a/src/main.js +++ b/src/main.js @@ -1,10 +1,10 @@ var plugin = require("./DevopsSourcefileMapPlugin"); -module.exports = function(PluginHost) { +module.exports = function (PluginHost) { var app = PluginHost.owner; - app.options.addDeclaration({name: "devops-sourcefile-url-map"}); - app.options.addDeclaration({name: "devops-sourcefile-url-prefix"}); + app.options.addDeclaration({ name: "devops-sourcefile-url-map" }); + app.options.addDeclaration({ name: "devops-sourcefile-url-prefix" }); app.converter.addComponent("devops-sourcefile", plugin.DevopsSourcefileMapPlugin); }; \ No newline at end of file