jbt / docker

Documentation generator
http://jbt.github.com/docker
MIT License
233 stars 56 forks source link

having problems with docker and descendant subdirectories #2

Closed macguffin closed 12 years ago

macguffin commented 12 years ago

Hi I hope you can help as this is exactly what I've been searching for for ages.

(My system is windows7 64 bit)

I have been unable to install using 'npm install docker -g' it fails every time saying that scripts/install.sh is not recognised as an internal or external command.

I was able to install it manual from the gitHub and it does work but only if there is not a sub directory within the specified -i directory. If there is a sub directory it generates all the js.html files in the root and then stops.

I put a trace in at docker.js line 159 and saw that it is reading my folder structure and identifying all the contents but not generating all the files. In the example I have a folder called src and a subfolder called utils.

(output from cmd): C:\Users\macguffin\Desktop\New folder (3)>docker -i src
./
example.js
IwgIncludes.js
MGoldMain.js
utils
utils\MakeCash.js
utils\MS.js
Generated: \example.js.html
Generated: \IwgIncludes.js.html
Generated: \monopolyGoldMain.js.html

I also put a trace in at line 195 to see the bits and noticed that it had a double \ is this correct? I wondered if maybe the windows file system was messing with you regex?

utils utils\MakeCash.js -trace from line 159 - filename [ 'utils\MakeCash.js' ] - trace from line 195 - bits utils\MS.js -trace from line 159 - filename [ 'utils\MS.js' ] - trace from line 195 - bits

Cheers

jbt commented 12 years ago

Ah yes this will be a Windows-specific thing. I'll have to put a thing in to detect the directory separators, because it's hard-coded to / at the moment. Not had a huge amount of experience with node and npm on Windows so might take a little while to figure it out.

macguffin commented 12 years ago

I think what you've done is really impressive. I will have a fiddle with it and if I work it out before you i'll let you know.

Cheers.

jbt commented 12 years ago

If you're interested to see my progress on this, I've now got it pretty much working on the windows-compatibility branch, at least for my windows installation. I need to do a few more tests to make sure I haven't broken it for non-windows versions - will hopefully get the opportunity to do that and push the updated version to npm before the end of the week.

macguffin commented 12 years ago

That's working. Thanks very much!!

Noticed a few bugs: docker & docker -o doc Generated file path looks like this: \src\example.js.html. This works fine and every thing looks as expected.

docker -i src -o doc Generated file path looks like this: C:\Users\macguffin\Desktop\New folder (3)\example.js.html The files are all created in the correct folder structure but the CSS seems to be broken. It may be that last \

I also tried dumping your gitHub zip into my npm-cache and running install. It still failed with the error below. Funnily this is the same error I get when trying to npm install docco-husky, which has a similar folder structure and file.

Cheers

docker@0.1.1 install X:\doc\node_modules\docker scripts/install.sh

'scripts' is not recognized as an internal or external command, operable program or batch file.

npm ERR! docker@0.1.1 install: scripts/install.sh npm ERR! cmd "/c" "scripts/install.sh" failed with 1 npm ERR! npm ERR! Failed at the docker@0.1.1 install script. npm ERR! This is most likely a problem with the docker package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! scripts/install.sh npm ERR! You can get their info via: npm ERR! npm owner ls docker npm ERR! There is likely additional logging output above. npm ERR! npm ERR! System Windows_NT 6.1.7601 npm ERR! command "C:\Program Files (x86)\nodejs\node.exe" "C:\Program File s (x86)\nodejs\node_modules\npm\bin\npm-cli.js" "install" "docker" npm ERR! cwd X:\doc npm ERR! node -v v0.6.18 npm ERR! npm -v 1.1.21 npm ERR! code ELIFECYCLE npm ERR! message docker@0.1.1 install: scripts/install.sh npm ERR! message cmd "/c" "scripts/install.sh" failed with 1 npm ERR! errno {} npm ERR! npm ERR! Additional logging details can be found in: npm ERR! X:\doc\npm-debug.log npm not ok

On Tuesday, 5 June 2012, James Taylor wrote:

If you're interested to see my progress on this, I've now got it pretty much working on the windows-compatibility branch, at least for my windows installation. I need to do a few more tests to make sure I haven't broken it for non-windows versions - will hopefully get the opportunity to do that and push the updated version to npm before the end of the week.


Reply to this email directly or view it on GitHub: https://github.com/jbt/docker/issues/2#issuecomment-6124886

jbt commented 12 years ago

Ok with any luck I should have been able to fix that missing CSS issue. As for that install problem, I think that should just sort itself out as soon as I update the version on npm - it looks like it's still using an old version of the package.json there.

macguffin commented 12 years ago

Just been able to do my first full document creation. It looks great and I really like the fact that I have a persistent menu and can guide people to important functions with the headings menu.

I think this is the perfect half way point between the quick and dirty docco and the full blown API style JSdoc or YUIDoc. . Love it!

bugs?? Is it possible that the -u and -w features are now broken on windows?

On Tue, Jun 5, 2012 at 4:37 PM, James Taylor < reply@reply.github.com

wrote:

Ok with any luck I should have been able to fix that missing CSS issue. As for that install problem, I think that should just sort itself out as soon as I update the version on npm - it looks like it's still using an old version of the package.json there.


Reply to this email directly or view it on GitHub: https://github.com/jbt/docker/issues/2#issuecomment-6128130

macguffin and shemp

Matt Hutchinson

m: 07950 262 263 e: matt@macguffinandshemp.com w: http://www.macguffinandshemp.com

jbt commented 12 years ago

Thanks! Regarding the -u and -w bugs, when did you update your code from the branch? I did manage to accidentally commit a spectacularly broken version about half an hour ago that broke a lot of stuff. I think it should be fixed now. Both -u and -w seem to be working fine for me at the moment, at least.

macguffin commented 12 years ago

Yes your right it is working fine. I must have got that suspect download ;)

On Tue, Jun 5, 2012 at 5:08 PM, James Taylor < reply@reply.github.com

wrote:

Thanks! Regarding the -u and -w bugs, when did you update your code from the branch? I did manage to accidentally commit a spectacularly broken version about half an hour ago that broke a lot of stuff. I think it should be fixed now. Both -u and -w seem to be working fine for me at the moment, at least.


Reply to this email directly or view it on GitHub: https://github.com/jbt/docker/issues/2#issuecomment-6128964

macguffin and shemp

Matt Hutchinson

m: 07950 262 263 e: matt@macguffinandshemp.com w: http://www.macguffinandshemp.com

jbt commented 12 years ago

Completely forgot to mention that I finally managed to get some time to test this all properly and with any luck it's now all fixed as of 0.1.2, which is now on npm.