
Security News
Scaling Socket from Zero to 10,000+ Organizations
Socket CEO Feross Aboukhadijeh shares lessons from scaling a developer security startup to 10,000+ organizations in this founder interview.
@itsjamie/esdoc-importpath-plugin
Advanced tools
This is a plugin that converts the import path in documentation. ESDoc displays the import path of class/function into the document. However, the import path may be different from real import path because usually ES2015 is transpiled to use it.
For example, src/MyClass.js will be referred to as import MyClass from 'my-module/src/MyClass.js' in the documentation.
However, in practice it is different from the real import path when you use because it is transpiled
(for example, import MyClass from 'my-module/lib/MyClass.js').
Therefore, convert the import path by using following setting.
{
"source": "./src",
"destination": "./doc",
"plugins": [
{
"name": "@itsjamie/esdoc-importpath-plugin",
"option": {
"stripPackageName": false,
"replaces": [
{"from": "^src/", "to": "lib/"}
]
}
}
]
}
from is regular expression and tois letter. In the internal from and to are used with String#replace(new RegExp (from), to).
When writing multi rules, it will also be carried out transformation many times.
For example, [{from: "^src/", to: "lib/"}, {from: "MyFooClass", to: "my-foo"}] converted as follows:
my-module/src/MyFooClass.js => my-module/lib/MyFooClass.js => my-module/lib/my-foostripPackageName is a boolean that when set to true will strip the package name from the import path.
This is useful for projects that have custom module resolvers where you want to be able to replace the whole path.
npm install @itsjamie/esdoc-importpath-plugin
{
"source": "./src",
"destination": "./doc",
"plugins": [
{
"name": "@itsjamie/esdoc-importpath-plugin",
"option": {
"replaces": [
{"from": "^src/", "to": "lib"}
]
}
}
]
}
MIT
FAQs
A import path plugin for ESDoc
We found that @itsjamie/esdoc-importpath-plugin demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh shares lessons from scaling a developer security startup to 10,000+ organizations in this founder interview.

Research
Socket Threat Research maps a rare inside look at OtterCookie’s npm-Vercel-GitHub chain, adding 197 malicious packages and evidence of North Korean operators.

Research
Socket researchers identified a malicious Chrome extension that manipulates Raydium swaps to inject an undisclosed SOL transfer, quietly routing fees to an attacker wallet.