diff --git a/src/Squidex/app-config/karma-test-shim.js b/src/Squidex/app-config/karma-test-shim.js index cd4be9556..41a41e554 100644 --- a/src/Squidex/app-config/karma-test-shim.js +++ b/src/Squidex/app-config/karma-test-shim.js @@ -21,14 +21,16 @@ testing.TestBed.initTestEnvironment( var testContext = require.context('../app', true, /\.spec\.ts/); -/* - * get all the files, for each file, call the context function +/** + * Get all the files, for each file, call the context function * that will require the file and load it up here. Context will - * loop and require those spec files here + * loop and require those spec files here. */ function requireAll(requireContext) { return requireContext.keys().map(requireContext); } -// requires and returns all modules that match +/** + * Requires and returns all modules that match. + */ var modules = requireAll(testContext); \ No newline at end of file diff --git a/src/Squidex/app-config/karma.conf.js b/src/Squidex/app-config/karma.conf.js index e95ed7d43..5b873cd33 100644 --- a/src/Squidex/app-config/karma.conf.js +++ b/src/Squidex/app-config/karma.conf.js @@ -3,14 +3,14 @@ module.exports = function (config) { var _config = { /** - * Base path that will be used to resolve all patterns (e.g. files, exclude) + * Base path that will be used to resolve all patterns (e.g. files, exclude). */ basePath: '', frameworks: ['jasmine'], /** - * Load additional test shim to setup angular2 for testing + * Load additional test shim to setup angular2 for testing. */ files: [ { pattern: './app-config/karma-test-shim.js', watched: false } @@ -33,21 +33,21 @@ module.exports = function (config) { noInfo: true }, - /* - * Leave Jasmine Spec Runner output visible in browser + /** + * Leave Jasmine Spec Runner output visible in browser. */ client: { clearContext: false }, - /* + /** * Use a mocha style console reporter and html reporter. */ reporters: ['kjhtml', 'mocha'], /** - * Run with chrome to enable debugging + * Run with chrome to enable debugging. * * available browser launchers: https://npmjs.org/browse/keyword/karma-launcher */ diff --git a/src/Squidex/app-config/karma.coverage.conf.js b/src/Squidex/app-config/karma.coverage.conf.js index 438c5bbce..abd292e43 100644 --- a/src/Squidex/app-config/karma.coverage.conf.js +++ b/src/Squidex/app-config/karma.coverage.conf.js @@ -3,14 +3,14 @@ module.exports = function (config) { var _config = { /** - * Base path that will be used to resolve all patterns (e.g. files, exclude) + * Base path that will be used to resolve all patterns (e.g. files, exclude). */ basePath: '', frameworks: ['jasmine'], /** - * Load additional test shim to setup angular2 for testing + * Load additional test shim to setup angular2 for testing. */ files: [ { pattern: './app-config/karma-test-shim.js', watched: false } @@ -33,21 +33,20 @@ module.exports = function (config) { noInfo: true }, - /* - * Use a mocha style console reporter, html reporter and the code coverage reporter + /** + * Use a mocha style console reporter, html reporter and the code coverage reporter. */ reporters: ['mocha', 'html', 'coverage-istanbul'], - // HtmlReporter configuration htmlReporter: { useCompactStyle: true, /** - * Use the same folder like the html report for coverage reports + * Use the same folder like the html report for coverage reports. */ outputFile: '_test-output/tests.html', /** - * Group the output by test suite (describe), equivalent to mocha reporter + * Group the output by test suite (describe), equivalent to mocha reporter. */ groupSuites: true }, @@ -64,22 +63,24 @@ module.exports = function (config) { }, /** - * Disable continuous Integration mode, run only one time + * Disable continuous Integration mode, run only one time. */ singleRun: true, customLaunchers: { ChromeCustom: { base: 'ChromeHeadless', - // We must disable the Chrome sandbox (Chrome's sandbox needs more permissions than Docker allows by default) + /** + * We must disable the Chrome sandbox (Chrome's sandbox needs more permissions than Docker allows by default). + */ flags: ['--no-sandbox'] } }, /** - * Run with chrome because phantom js does not provide all types, e.g. DragEvent + * Run with chrome because phantom js does not provide all types. * - * available browser launchers: https://npmjs.org/browse/keyword/karma-launcher + * Available browser launchers: https://npmjs.org/browse/keyword/karma-launcher */ browsers: ['ChromeCustom'] }; diff --git a/src/Squidex/app-config/webpack.config.js b/src/Squidex/app-config/webpack.config.js index e04247fba..6b7981e5b 100644 --- a/src/Squidex/app-config/webpack.config.js +++ b/src/Squidex/app-config/webpack.config.js @@ -33,7 +33,7 @@ module.exports = { ] }, - /* + /** * Options affecting the normal modules. * * See: https://webpack.js.org/configuration/module/ @@ -109,7 +109,7 @@ module.exports = { }, plugins: [ - /* + /** * Puts each bundle into a file and appends the hash of the file to the path. * * See: https://github.com/webpack-contrib/mini-css-extract-plugin @@ -120,7 +120,7 @@ module.exports = { options: { htmlLoader: { /** - * Define the root for images, so that we can use absolute url's + * Define the root for images, so that we can use absolute urls. * * See: https://github.com/webpack/html-loader#Advanced_Options */ diff --git a/src/Squidex/app-config/webpack.run.base.js b/src/Squidex/app-config/webpack.run.base.js index e32a69fd2..1f3c20727 100644 --- a/src/Squidex/app-config/webpack.run.base.js +++ b/src/Squidex/app-config/webpack.run.base.js @@ -10,8 +10,7 @@ const plugins = { module.exports = webpackMerge(commonConfig, { /** - * The entry point for the bundle - * Our Angular.js app + * The entry point for the bundle. Our Angular app. * * See: https://webpack.js.org/configuration/entry-context/ */ diff --git a/src/Squidex/app-config/webpack.run.dev.js b/src/Squidex/app-config/webpack.run.dev.js index f06e8bd51..5a34d49d9 100644 --- a/src/Squidex/app-config/webpack.run.dev.js +++ b/src/Squidex/app-config/webpack.run.dev.js @@ -17,7 +17,9 @@ module.exports = webpackMerge(runConfig, { output: { filename: '[name].js', - // Set the public path, because we are running the website from another port (5000) + /** + * Set the public path, because we are running the website from another port (5000). + */ publicPath: 'http://localhost:3000/' }, diff --git a/src/Squidex/app-config/webpack.run.prod.js b/src/Squidex/app-config/webpack.run.prod.js index c6b13608e..9ded6e3c5 100644 --- a/src/Squidex/app-config/webpack.run.prod.js +++ b/src/Squidex/app-config/webpack.run.prod.js @@ -34,15 +34,13 @@ module.exports = webpackMerge(runConfig, { /** * Specifies the name of each output file on disk. - * IMPORTANT: You must not specify an absolute path here! * * See: https://webpack.js.org/configuration/output/#output-filename */ filename: '[name].js', /** - * The filename of non-entry chunks as relative path - * inside the output.path directory. + * The filename of non-entry chunks as relative path inside the output.path directory. * * See: https://webpack.js.org/configuration/output/#output-chunkfilename */ @@ -63,7 +61,7 @@ module.exports = webpackMerge(runConfig, { rules: [{ test: /\.scss$/, /* - * Extract the content from a bundle to a file + * Extract the content from a bundle to a file. * * See: https://github.com/webpack-contrib/extract-text-webpack-plugin */ @@ -75,7 +73,7 @@ module.exports = webpackMerge(runConfig, { loader: 'sass-loader' }], /* - * Do not include component styles + * Do not include component styles. */ include: helpers.root('app', 'theme'), }, { diff --git a/src/Squidex/app-config/webpack.test.js b/src/Squidex/app-config/webpack.test.js index 1dd89b9e3..eacdb4361 100644 --- a/src/Squidex/app-config/webpack.test.js +++ b/src/Squidex/app-config/webpack.test.js @@ -1,16 +1,15 @@ - const webpack = require('webpack'), - webpackMerge = require('webpack-merge'), - path = require('path'), - helpers = require('./helpers'), - commonConfig = require('./webpack.config.js'); +const webpack = require('webpack'), + webpackMerge = require('webpack-merge'), + path = require('path'), + helpers = require('./helpers'), + commonConfig = require('./webpack.config.js'); module.exports = webpackMerge(commonConfig, { mode: 'development', /** - * Source map for Karma from the help of karma-sourcemap-loader & karma-webpack + * Source map for Karma from the help of karma-sourcemap-loader & karma-webpack. * - * Do not change, leave as is or it wont work. * See: https://webpack.js.org/configuration/devtool/ */ devtool: 'inline-source-map' diff --git a/src/Squidex/wwwroot/scripts/editor-sdk.js b/src/Squidex/wwwroot/scripts/editor-sdk.js index 97c1eb9e4..cfda0612e 100644 --- a/src/Squidex/wwwroot/scripts/editor-sdk.js +++ b/src/Squidex/wwwroot/scripts/editor-sdk.js @@ -44,7 +44,7 @@ function SquidexFormField() { }, 500); var editor = { - /* + /** * Notifies the control container that the editor has been touched. */ touched: function () { @@ -53,7 +53,7 @@ function SquidexFormField() { } }, - /* + /** * Notifies the control container that the value has been changed. */ valueChanged: function (value) { @@ -62,7 +62,7 @@ function SquidexFormField() { } }, - /* + /** * Register the disabled handler. */ onDisabled: function (callback) { @@ -73,7 +73,7 @@ function SquidexFormField() { } }, - /* + /** * Register the disabled handler. */ onValueChanged: function (callback) { @@ -84,7 +84,7 @@ function SquidexFormField() { } }, - /* + /** * Clean the editor SDK. */ clean: function () {