You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import LogHelper from './internal/utils/LogHelper.mjs';
/**
* WorkboxCore shares code across Workbox modules.
* @module workbox-core
*/
class WorkboxCore {
/**
* Constructs a new WorkboxCore instance.
*/
constructor() {
this.INTERNAL = {
logHelper: new LogHelper(),
};
}
/**
* This tests the documentation generation.
*/
test() {
}
}
export default new WorkboxCore();
I get the expected output:
$ documentation build packages/workbox-core/index.js -f md -e mjs
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
### Table of Contents
- [workbox-core](#workbox-core)
- [constructor](#constructor)
- [test](#test)
## workbox-core
WorkboxCore shares code across Workbox modules.
## constructor
Constructs a new WorkboxCore instance.
## test
This tests the documentation generation.
If I change the file extension to mjs and run the command again (With or without --extension mjs), I get no output
$ documentation build packages/workbox-core/index.mjs -f md -e mjs
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
### Table of Contents
What version of documentation.js are you using?: 5.2.2
How are you running documentation.js (on the CLI, Node.js API, Grunt, other?): CLI
Is there anyway to parse JS files with a different extension? .mjs will be used for future node modules so I suspect this will be a request sooner or later.
The text was updated successfully, but these errors were encountered:
Sure, so - --extension is not an option - I need to update Usage to reflect this -the --help output is already correct.
Instead, the options are:
--require-extension, --re additional extensions to include in require() and
import's search algorithm.For instance, adding .es5
would allow require("adder") to find "adder.es5"
--parse-extension, --pe additional extensions to parse as source code.
With the following input file saved as
index.js
I get the expected output:
If I change the file extension to mjs and run the command again (With or without
--extension mjs
), I get no outputIs there anyway to parse JS files with a different extension? .mjs will be used for future node modules so I suspect this will be a request sooner or later.
The text was updated successfully, but these errors were encountered: