0

I have created an npm package that creates an HTML document inside the current working directory from where I am calling that particular command described in the bin of that npm package.

The command is generate_doc, it will fetch all the data from the current working directory and create the resultant html inside the same directory as "newindex.html".

I want this particular file newindex.html to be served on a localhost port when I type generate_doc serve, the command gets executed and the .html file is served in the localhost. I have heard that gulp will be the best option for this but I am confused about where to start with.

Even a small help would be great.

Girdhari
  • 1
  • 1

1 Answers1

0

You need gulp-webserver package for this. Read this article to get started with gulp.

  • Thanks for the link for the article, but even that does not serve my requirement. I want to call `generate_doc serve` from terminal as a command line argument while inside a particular working directory, and I could not get any such gulp plugin for this, could you please help.. – Girdhari Feb 27 '17 at 07:13