From d098dc0914d1aab8afbc0b6fa852846e4a6a6b9f Mon Sep 17 00:00:00 2001 From: tetedacier Date: Tue, 29 May 2018 18:43:02 +0200 Subject: [PATCH] Bugfix/separate declaration from exposition (#245) * Separate definition from exposition * Suppress previous documentation before generating new one * Restore deleted line * Set up verbosity to provide details on what's going on --- .jsdoc/configuration.json | 1 + editor/embedapi.js | 5 ++++- editor/historyrecording.js | 3 ++- editor/jgraduate/jpicker.js | 4 +++- editor/layer.js | 4 +++- editor/svgcanvas.js | 4 +++- package.json | 2 +- 7 files changed, 17 insertions(+), 6 deletions(-) diff --git a/.jsdoc/configuration.json b/.jsdoc/configuration.json index 16fdf8f9..b2bf0b6d 100644 --- a/.jsdoc/configuration.json +++ b/.jsdoc/configuration.json @@ -17,6 +17,7 @@ }, "opts":{ "recurse": true, + "verbose": true, "destination": ".jsdoc/out" } } diff --git a/editor/embedapi.js b/editor/embedapi.js index c0026798..782642d2 100644 --- a/editor/embedapi.js +++ b/editor/embedapi.js @@ -95,7 +95,8 @@ function getMessageListener (t) { * messages will be allowed when same origin is not used; defaults to none. * If supplied, it should probably be the same as svgEditor's allowedOrigins */ -export default class EmbeddedSVGEdit { + +class EmbeddedSVGEdit { constructor (frame, allowedOrigins) { this.allowedOrigins = allowedOrigins || []; // Initialize communication @@ -167,3 +168,5 @@ export default class EmbeddedSVGEdit { return cbid; } } + +export default EmbeddedSVGEdit; diff --git a/editor/historyrecording.js b/editor/historyrecording.js index 277d4749..c46efb24 100644 --- a/editor/historyrecording.js +++ b/editor/historyrecording.js @@ -49,7 +49,7 @@ import { * A value of null is valid for cases where no history recording is required. * See singleton: HistoryRecordingService.NO_HISTORY */ -export default class HistoryRecordingService { +class HistoryRecordingService { constructor (undoManager) { this.undoManager_ = undoManager; this.currentBatchCommand_ = null; @@ -158,3 +158,4 @@ export default class HistoryRecordingService { * @property {HistoryRecordingService} NO_HISTORY - Singleton that can be passed to functions that record history, but the caller requires that no history be recorded. */ HistoryRecordingService.NO_HISTORY = new HistoryRecordingService(); +export default HistoryRecordingService; diff --git a/editor/jgraduate/jpicker.js b/editor/jgraduate/jpicker.js index 6131afdc..711add23 100755 --- a/editor/jgraduate/jpicker.js +++ b/editor/jgraduate/jpicker.js @@ -19,7 +19,7 @@ Math.precision = function (value, precision) { return Math.round(value * Math.pow(10, precision)) / Math.pow(10, precision); }; -export default function ($) { +const jPicker = function ($) { if (!$.loadingStylesheets) { $.loadingStylesheets = []; } @@ -1885,3 +1885,5 @@ export default function ($) { }; return $; } + +export default jPicker; diff --git a/editor/layer.js b/editor/layer.js index 9d04734a..7dfcb4dc 100644 --- a/editor/layer.js +++ b/editor/layer.js @@ -28,7 +28,7 @@ const $ = jQuery; * @param {SVGGElement=} svgElem - The SVG DOM element. If defined, use this to add * a new layer to the document. */ -export default class Layer { +class Layer { constructor (name, group, svgElem) { this.name_ = name; this.group_ = svgElem ? null : group; @@ -208,3 +208,5 @@ function addLayerClass (elem) { elem.setAttribute('class', classes + ' ' + Layer.CLASS_NAME); } } + +export default Layer; diff --git a/editor/svgcanvas.js b/editor/svgcanvas.js index 06f5fd9b..0c327bdd 100644 --- a/editor/svgcanvas.js +++ b/editor/svgcanvas.js @@ -84,7 +84,7 @@ if (window.opera) { * @param container - The container HTML element that should hold the SVG root element * @param {Object} config - An object that contains configuration data */ -export default class { +class SvgCanvas { constructor (container, config) { // Alias Namespace constants @@ -6111,3 +6111,5 @@ this.getPrivateMethods = function () { }; } // End constructor } // End class + +export default SvgCanvas; diff --git a/package.json b/package.json index db94f59c..85ad13a3 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "engines": {}, "scripts": { "build-config": "rollup -c rollup-config.config.js", - "build-doc": "jsdoc -c .jsdoc/configuration.json .", + "build-doc": "rm -rf .jsdoc/out/*;jsdoc -c .jsdoc/configuration.json .", "build-html": "node build-html.js", "compress-images": "imageoptim 'chrome-app/*.png' && imageoptim 'editor/extensions/*.png' && imageoptim 'editor/spinbtn/*.png' && imageoptim 'editor/jgraduate/images/*.{png,gif}' && imageoptim 'editor/images/*.png'", "copy-deps": "cp node_modules/load-stylesheets/dist/index-es.js editor/external/load-stylesheets/index-es.js && cp node_modules/babel-polyfill/dist/polyfill.min.js editor/external/babel-polyfill/polyfill.min.js && cp node_modules/babel-polyfill/dist/polyfill.js editor/external/babel-polyfill/polyfill.js",