New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

esdoc-uploader

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

esdoc-uploader

Upload your ESDoc documentation to doc.esdoc.org

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

esdoc-uploader

A node module that connects with the ESDoc hosting service API in order to generage the documentation for your project.

Build Status Coverage Status Documentation Status Dependencies status Dev dependencies status

I've been using ESDoc for a while now, and something great about it it's that they provide a hosting service for you documentation. You only need to have your project hosted on GitHub and provide 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.

Information

--
Packageesdoc-uploader
DescriptionUpload your ESDoc documentation to doc.esdoc.org
Node Version>= v0.12.6 (You need >= v4.0.0 for the tests)

Installation

You can install it using npm.

npm install esdoc-uploader --save_dev

Usage

Command line

$(npm bin)/esdoc-uploader

That's all, esdoc-uploader will automatically look up your package.json, get your repository information and start the process.

As a module

// 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(function(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:

  • The constructor, which receives an already formatted GitHub url. Or you can ignore the argument and it will work 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 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.

Development

Install Git hooks

./hooks/install

npm tasks

  • npm run build: Generate a new build of the module.
  • npm test: Run the module's unit tests.
  • npm run coverage: Run the unit tests and open the coverage report on the browser.
  • npm run lint: Lint the plugin's code with JSCS and ESLint.
  • npm run docs: Generate the project documentation.

License

MIT. License file.

Keywords

FAQs

Package last updated on 09 Nov 2015

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc