Modules all the way
This commit is contained in:
@@ -14,12 +14,12 @@
|
||||
]
|
||||
},
|
||||
"plugins": [
|
||||
"config/jsdoc/api/plugins/markdown",
|
||||
"config/jsdoc/api/plugins/markdown.cjs",
|
||||
"jsdoc-plugin-typescript",
|
||||
"config/jsdoc/api/plugins/inline-options",
|
||||
"config/jsdoc/api/plugins/events",
|
||||
"config/jsdoc/api/plugins/observable",
|
||||
"config/jsdoc/api/plugins/api"
|
||||
"config/jsdoc/api/plugins/inline-options.cjs",
|
||||
"config/jsdoc/api/plugins/events.cjs",
|
||||
"config/jsdoc/api/plugins/observable.cjs",
|
||||
"config/jsdoc/api/plugins/api.cjs"
|
||||
],
|
||||
"typescript": {
|
||||
"moduleRoot": "src"
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/* eslint-disable import/no-commonjs */
|
||||
|
||||
/**
|
||||
* Define an @api tag
|
||||
* @param {Object} dictionary The tag dictionary.
|
||||
@@ -1,3 +1,5 @@
|
||||
/* eslint-disable import/no-commonjs */
|
||||
|
||||
const events = {};
|
||||
|
||||
exports.handlers = {
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
/* eslint-disable import/no-commonjs */
|
||||
|
||||
/**
|
||||
* @fileoverview
|
||||
* Inlines option params from typedefs
|
||||
@@ -1,3 +1,5 @@
|
||||
/* eslint-disable import/no-commonjs */
|
||||
|
||||
/**
|
||||
* Modified from JSDoc's plugins/markdown and lib/jsdoc/util/markdown modules
|
||||
* (see https://github.com/jsdoc3/jsdoc/), which are licensed under the Apache 2
|
||||
@@ -1,3 +1,5 @@
|
||||
/* eslint-disable import/no-commonjs */
|
||||
|
||||
const classes = {};
|
||||
const observables = {};
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/* eslint-disable import/no-commonjs */
|
||||
|
||||
/*global env: true */
|
||||
|
||||
const hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
},
|
||||
"plugins": [
|
||||
"jsdoc-plugin-typescript",
|
||||
"config/jsdoc/info/define-plugin",
|
||||
"config/jsdoc/info/virtual-plugin"
|
||||
"config/jsdoc/info/define-plugin.cjs",
|
||||
"config/jsdoc/info/virtual-plugin.cjs"
|
||||
],
|
||||
"typescript": {
|
||||
"moduleRoot": "src"
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/* eslint-disable import/no-commonjs */
|
||||
|
||||
/**
|
||||
* @fileoverview This plugin extracts info from boolean defines. This only
|
||||
* handles boolean defines with the default value in the description. Default
|
||||
@@ -1,3 +1,5 @@
|
||||
/* eslint-disable import/no-commonjs */
|
||||
|
||||
/**
|
||||
* @fileoverview Generates JSON output based on exportable symbols.
|
||||
*/
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/* eslint-disable import/no-commonjs */
|
||||
|
||||
/**
|
||||
* Handle the interface and abstract annotations.
|
||||
* @param {Object} dictionary The tag dictionary.
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"description": "JSDoc loads publish.js files with require(), so we need to configure everything under this path as a CommonJS module.",
|
||||
"type": "commonjs"
|
||||
}
|
||||
@@ -1,7 +1,10 @@
|
||||
const path = require('path');
|
||||
const TerserPlugin = require('terser-webpack-plugin');
|
||||
import TerserPlugin from 'terser-webpack-plugin';
|
||||
import path, {dirname} from 'path';
|
||||
import {fileURLToPath} from 'url';
|
||||
|
||||
module.exports = {
|
||||
const baseDir = dirname(fileURLToPath(import.meta.url));
|
||||
|
||||
export default {
|
||||
entry: './build/index.js',
|
||||
devtool: 'source-map',
|
||||
mode: 'production',
|
||||
@@ -18,7 +21,7 @@ module.exports = {
|
||||
},
|
||||
include: [
|
||||
path.join(
|
||||
__dirname,
|
||||
baseDir,
|
||||
'..',
|
||||
'node_modules',
|
||||
'@mapbox',
|
||||
|
||||
Reference in New Issue
Block a user