Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
esdoc-uploader
Advanced tools
A node module that connects with the ESDoc hosting service API in order to generage the documentation for your project.
I've been using ESDoc for a while now, and something great about it it's that they provide a hosting service for your documentation. You only need to have your project hosted on GitHub and give them with its url, the service will take care of cloning your repo, finding your esdoc.json
file, generating the docs and publishing them, which I think it's pretty awesome!
Now, the only complication it's that every time you deploy a new change, you have to go to the page and submit a form with your repo url; but if you are working with continuous integration, doing that manually kind of kills the whole idea :P... and that's the reason of this project.
Disclaimer (2019): This project is still maintained, but there's no activity because the ESDoc hosting API doesn't have any other functionality, so no features will be added.
If you are wondering why this project doesn't "use itself", it's because I no longer see the need to transpile Node code, and I can't use
esdoc-node
on the ESDoc hosting, so I'm using git pages.If you read the code... I know:
- It should use promises.
- It should separate the functionality on different modules.
- I can use
node-fetch
oraxios
for the requests.- I can use
colors
orchalk
for the log messages.- and so many more things...
This project was one of my first npm packages, its scope is very limited, and when I updated it, I didn't want to completely rewrite it, just improve little details (what I could) while removing the need for production dependencies.
- | - |
---|---|
Package | esdoc-uploader |
Description | Upload your ESDoc documentation to doc.esdoc.org |
Node Version | >= v8.10 |
npx esdoc-uploader
# or
yarn esdoc-uploader
That's all, esdoc-uploader
will automatically look up your package.json
, get your repository information and start the process.
// Import the module class
var ESDocUploader = require('esdoc-uploader');
// Instantiate an object with a valid url
var uploader = new ESDocUploader('git@github.com:homer0/gulp-bundlerify.git');
// For extra precaution, check if the url is valid
if (uploader.canUpload()) {
uploader.upload((success, url) => {
// Checks whether the process ended in success
if (success) {
// Logs a confirmation
console.log('Documents uploaded to: ', url);
} else {
console.log('Something went wrong, check the errors above');
}
});
}
Pretty simple right? it only has three public methods:
constructor
, which receives an already formatted GitHub url. Or you can ignore the argument and it will work just like on the command line, looking for the information in your package.json
.canUpload()
: It checks if the upload process can be done or not.upload()
: It starts uploading everything to the API. It receives a callback parameter, which will be called when the process finishes. The callback will then receive two arguments: a boolean
value to check if the process was successful, and in case it was, the url for where the documentation it's being hosted.Task | Description |
---|---|
test | Run the project unit tests. |
lint | Lint the modified files. |
lint:all | Lint the entire project code. |
docs | Generate the project documentation. |
I use husky to automatically install the repository hooks so the code will be tested and linted before any commit and the dependencies updated after every merge. The configuration is on the husky
property of the package.json
and the hooks' files are on ./utils/hooks
.
I use Jest with Jest-Ex to test the project. The configuration file is on ./.jestrc.json
, the tests are on ./tests
and the script that runs it is on ./utils/scripts/test
.
I use ESlint with my own custom configuration to validate all the JS code. The configuration file for the project code is on ./.eslintrc
and the one for the tests is on ./tests/.eslintrc
. There's also an ./.eslintignore
to exclude some files on the process. The script that runs it is on ./utils/scripts/lint
.
I use ESDoc (:P) to generate HTML documentation for the project. The configuration file is on ./.esdoc.json
and the script that runs it is on ./utils/scripts/docs
.
MIT. License file.
FAQs
Upload your ESDoc documentation to doc.esdoc.org
We found that esdoc-uploader 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
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.