dwyl / learn-tdd

:white_check_mark: A brief introduction to Test Driven Development (TDD) in JavaScript (Complete Beginner's Step-by-Step Tutorial)
Mozilla Public License 2.0
2.75k stars 348 forks source link

jsdoc installation not working (also I believe it is no longer supported) #59

Closed interglobalmedia closed 8 years ago

interglobalmedia commented 8 years ago

Hi,

When I tried to install jsdoc by your instructions, it did not work. No html file was generated, and nothing happened when I tried to execute the subsequent commands. I believe that it has been replaced by jsdoc3. Please update this!

FullStackForger commented 8 years ago

Hi @interglobalmedia.

Please be more specific. Could you let us know what exactly doesn't work? Which instruction step seems to be a problem? Also please copy and paste here error message you are getting.

Which version of node and npm are you using? You can chec it by executing following commands from the command line.

node -v

and

npm -v

As described in the guide producing documentation requires 3 steps:

1) Install jsdoc: npm install jsdoc --save-dev 2) Run the jsdoc command in your terminal: ./node_modules/jsdoc/jsdoc.js change.js 3) Open the resulting html file open ./out/global.html#getChange you should expect to see something like this in your web browser:

dwyl/learn-tdd is quite a comprehensive quide. Installation of JSDOC, however, as described in step 1 is very straightforward. You are using npm to install jsdoc package. I have just tried it locally and it appears to be fine.

Here is my output.

`-- jsdoc@3.4.0
  +-- async@1.4.2
  +-- bluebird@2.9.34
  +-- catharsis@0.8.8
  | `-- underscore-contrib@0.3.0
  |   `-- underscore@1.6.0
  +-- escape-string-regexp@1.0.5
  +-- espree@2.2.5
  +-- js2xmlparser@1.0.0
  +-- marked@0.3.6
  +-- requizzle@0.2.1
  | `-- underscore@1.6.0
  +-- strip-json-comments@1.0.4
  +-- taffydb@2.6.2
  +-- underscore@1.8.3
  `-- wrench@1.5.9
FullStackForger commented 8 years ago

Just saw issue #41. @interglobalmedia do you have nodeJS installed locally?

interglobalmedia commented 8 years ago

Do I have to fork this in order for it to work completely or can I start from scratch as I did? Everything works beautifully until JSDocs section. I finally got the out folder to be auto generated, but there was no global.html, only an index.html. The rest of the folder consists of a fonts folder, a scripts folder, and a styles folder. The installation was successful, it's just that what was installed did not seem right. Isn't there supposed to be a global.html file?

interglobalmedia commented 8 years ago

@indieforger I have both Nodejs and npm installed. Already had it installed before I started the tutorial.

FullStackForger commented 8 years ago

Hey @interglobalmedia. I was curious if it breaks so I did run all the steps, top to bottom. It worked perfectly fine. You don't have to fork the repository. It is just a guide.

And yes, you should get global.html generated for you in the out folder.

If everything else works fine no need to repeat all the steps.

You could try to delete local ./out folder and repeat all 3 steps.

  1. First install jsdocs. Pay attention to the output to make sure you don't have errors there.
  2. If successful run jsdoc parser as recommended and check out folder again.
$ ls -l ./out

You should get something like below.

total 24
-rw-r--r-- 1 IndieForger 197121 2521 Aug  4 23:53 change.js.html
drwxr-xr-x 1 IndieForger 197121    0 Aug  4 23:53 fonts/
-rw-r--r-- 1 IndieForger 197121 2192 Aug  4 23:53 global.html
-rw-r--r-- 1 IndieForger 197121 1029 Aug  4 23:53 index.html
drwxr-xr-x 1 IndieForger 197121    0 Aug  4 23:53 scripts/
drwxr-xr-x 1 IndieForger 197121    0 Aug  4 23:53 styles/

Again, please pay attention to errors if there are any. Pasting them here will make it easier to help you.

  1. Before you check it the browser make sure you have have your static server running, simply run
node static-server.js

PS. Nodemon is not required as we don't have to reload server when HTML changes. I have just opened #60 explaining why.

interglobalmedia commented 8 years ago

Hi @indieforger,

I deleted the out folder and repeated the three steps. Then I ls -l ./out and this is what I got:

Where could I have gone wrong in all this? Everything else previous to this worked fine. What could I have missed in the process?

FullStackForger commented 8 years ago

Hoestly I am running out of options here. I saw this repository only today so to make sure it all works fine I litterally followed all the steps A-Z.

And honestly everything works perfectly fine for me. Did you get any errors or warnings?

Also it might be good idea to ping @nelsonic as judging by the contribution graph he is the one who contributed the most.

It is always good idea to put as much information as possible describing the problem:

interglobalmedia commented 8 years ago

Hi @indieforger,

I figured it out. It was not clear that we were supposed to add the comments at the top of the change.js file. However, when I went into the new JSDocs website and followed their instructions (copied your comments), it worked. I suggest that you just clarify that part of the tutorial. Here is where I got my info: http://usejsdoc.org/about-getting-started.html Thanks!

FullStackForger commented 8 years ago

Great work! Well done!

interglobalmedia commented 8 years ago

Thanks! It was fun! I'm trying it out on a small project now. Should be interesting!