File tree 4 files changed +76
-2009
lines changed
4 files changed +76
-2009
lines changed Original file line number Diff line number Diff line change
1
+ /**
2
+ * JSDoc plugin.
3
+ *
4
+ * Modifies the source code to remove the "export" keyword before JS doc sees it. This removes
5
+ * "exports." prefixes from documented members.
6
+ *
7
+ * @module plugins/exportKiller
8
+ */
9
+ exports . handlers = {
10
+ beforeParse ( e ) {
11
+ e . source = e . source . replace ( / ( \n e x p o r t f u n c t i o n ) / g, $ => {
12
+ return `\nfunction` ;
13
+ } ) ;
14
+ e . source = e . source . replace ( / ( \n e x p o r t c o n s t ) / g, $ => {
15
+ return `\nconst` ;
16
+ } ) ;
17
+ e . source = e . source . replace ( / ( \n e x p o r t d e f a u l t ) / g, $ => {
18
+ return `\n` ;
19
+ } ) ;
20
+ e . source = e . source . replace ( / ( \n e x p o r t a s y n c f u n c t i o n ) / g, $ => {
21
+ return `\nasync function` ;
22
+ } ) ;
23
+ }
24
+ } ;
Original file line number Diff line number Diff line change 9
9
"excludePattern" : " (node_modules/|docs)"
10
10
},
11
11
"plugins" : [
12
- " plugins/markdown"
12
+ " plugins/markdown" ,
13
+ " docs/removeExport"
13
14
],
14
15
"templates" : {
15
16
"cleverLinks" : false ,
You can’t perform that action at this time.
0 commit comments