lcodes / esdoc-node Goto Github PK
View Code? Open in Web Editor NEWAllows esdoc to use node.js exports and module.exports.
License: MIT License
Allows esdoc to use node.js exports and module.exports.
License: MIT License
Calling a method directly on the require doesn't work.
Here's an example:
require('dotenv').config();
When running esdoc with this plugin it logs the following error:
warning: could not parse the following code. if you want to use ECMAScript proposals, see https://esdoc.org/manual/feature.html#ecmascript-proposal
/Users/egon/src/dolphin/test.js
1| require('dotenv').config();
2|
@lcodes This is what I already commented on #7. The PR removed one of the basic functionalities of the plugin (and even the tests for it) in order to add support for very edge case:
const { one: { two } } = required('...');
In order to add support for that, the support for this was removed:
const { one } = require('...');
I believe one level destructuring should be enough, as it's "basically the same" as a named import on ES, while destructuring on multiple levels doesn't exist.
From what I understand, this plugin was made in order to transpile to the syntax ESDoc uses, ESModules, not just to get coverage when you use require
.
Also, have in mind that you released it as a fix and this was super breaking; I have ~15 public projects, using this plugin, that lost their coverage because of the hidden variable added on the PR.
Please, revert #7
Code of the following form does not seem to generate any docs. The source file is present on the source.html
page, but none of the a
, b
, c
, identifiers are associated with the source file (on the source.html
page), and no function reference appears in the left-hand menu.
function a() {}
function b() {}
function c() {}
module.exports = {
a,
b,
c,
};
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.