docco icon indicating copy to clipboard operation
docco copied to clipboard

Windows (win7) - run docco on all .js files

Open uknick opened this issue 11 years ago • 24 comments

Hi,

I can't seem to get docco to run all all .js files in a folder, I'm running

docco *.js
C:\Users\admin\AppData\Roaming\npm\node_modules\docco\docco.js:24
            throw error;
                  ^
Error: ENOENT, open 'c:\dev\js\*.js'

but it seems to work with

docco test.js test2.js

Also - I'm not sure if it functions in this way, but it would be great if it generates an index.html file with links to each of the .html files it generates.

uknick avatar Apr 15 '13 10:04 uknick

Creating a docs/index.html file would conflict with the documentation file generated from index.*

But now that I think about it, the documentation files from index.js and index.rb (or any other files with the same root names) would also conflict...

Interesting idea. I've opened another issue #201 so this issue can focus on your problem.

c-lliope avatar Apr 15 '13 11:04 c-lliope

I can confirm +1 that this is an issue exactly as stated on Windows 7 x64.

Note: I wrote a Handlebar template compilation library called rex-template, and I dealt with this exact same issue. I could be wrong, but I would venture a guess that docco isn't handling Windows directory separators properly. I'm going to look into this and see if I'm on the right track. If so, it's an easy fix.

piercemoore avatar May 03 '13 06:05 piercemoore

I have this problem on windows 8 x64 as well. Any news on this ? If you can't use *.js, rocco is unusable on Windows as it would require to concatenate with comments before making the documentation

ocombe avatar Jul 03 '13 14:07 ocombe

The problem is that * are not a common pattern on Windows. Docco should use something like https://github.com/isaacs/node-glob to resolve files

ocombe avatar Jul 03 '13 15:07 ocombe

Is this going anywhere? I basically can't use Docco because of this.

eugene-bulkin avatar Jan 23 '14 00:01 eugene-bulkin

Is this going anywhere?

If someone sends a patch to fix it, then yes, it will ;) Personally, I don't use Windows, so I can't really help test out a fix for you.

jashkenas avatar Jan 23 '14 15:01 jashkenas

@jashkenas I have been looking over the source for maybe a half hour now and I'm not entirely sure where Docco actually finds the files based on the file input parameters. I really like @ocombe's recommendation to use isaacs/node-glob for filename parsing, and I would be happy to implement that patch. I just can't seem to find at what point node-glob would actually need to be inserted to parse those file names. Can you point me in the right direction? The closest I have come to a solid lead is this line: https://github.com/jashkenas/docco/blob/master/docco.js#L169

I know it's compiled from docco.litcoffee but I can't link directly to the line, so I linked to the compiled output line.

rex avatar Jan 23 '14 21:01 rex

Docco doesn't. Glob expansion is a unix thing (a bash thing), not an in-javascript thing. The files are already listed out explicitly by the time Docco sees them.

jashkenas avatar Jan 23 '14 21:01 jashkenas

Ah, I see! Perhaps that is why I was having such a hard time finding the line in which that took place :-P I was seriously starting to question myself, especially when communicating with a legit, real-world javascript guru.

What would you think about this:

During the docco "boot" process, process.platform is introspected to determine if it is running on a windows machine. The vast majority of the time, it will be either on darwin or linux, but in the off chance that it is the windows platform, we insert a step before the actual processing begins that runs the provided arguments through isaacs/node-glob to actually extract the files to process.

The problems I see with this idea:

  1. Additional dependency introduced: isaacs/node-glob
  2. Additional code weight to do platform check and extract files using node-glob
  3. Possible additional complexity introduced depending on what release of Windows is being used. I have done absolutely zero research into this, but there is the possibility that different releases of Windows handle wildcard arguments differently.

The benefits I see with this idea:

  1. Full Windows support.
  2. Yeah, just full windows support.

I would be willing to write and submit the patch, but I'd really appreciate your feedback before I even got started.

rex avatar Jan 23 '14 22:01 rex

Feel free to give it a try, and try to make it nice — if it's clean enough, and doesn't force non-windows users to download node-glob (which they won't need), then we can merge it. If it's too hairy, then it's too hairy.

jashkenas avatar Jan 23 '14 22:01 jashkenas

I completely understand. This will be the first time I've ever dealt with npm preinstall scripts, so how does this look?

package.json

{
  "scripts": {
    "preinstall": "node detect-windows.js"
  }
}

detect-windows.coffee (compiles to detect-windows.js)

fs = require 'fs'
path = require 'path'

if process.platform is 'win32'
  package_path = path.join __dirname, 'package.json'
  package = require current_package_path
  package.dependencies['node-glob'] = '3.x'
  unless fs.writeFileSync package_path, package then console.error "Unable to install suggested Windows dependency"

Again, I've never done platform-specific package installation before and there could very easily be a better, more official way to do this, but I think the above solution is a decent, non-hairy way to avoid unnecessary packages for non-windows users.

On a slight side note: I've never heard that phrase before, and I love it. It's so damn descriptive and I wish more people would understand that and take it to heart. "If it's too hairy, it's too hairy."

rex avatar Jan 23 '14 22:01 rex

@rex the package name is "glob" not "node-glob". However even with glob installed, I cannot get docco to work on Win8 x64. Still getting the same error the OP described.

pke avatar Mar 17 '14 22:03 pke

workaround for the time being: Put the following stuff into a batch file:

@echo off
setlocal enabledelayedexpansion enableextensions
set LIST=
for /f "delims=" %%x in ('forfiles /s /m *.js /c "cmd /c echo @relpath"') do (
set LIST=!LIST! %%x
)

set LIST=%LIST:~1%

docco %LIST%

This will create the docco documentation for all .js files in the current folder and subdirs. It creates a list of all .js files in folder and passes that list to docco

jdoose avatar Jan 21 '15 10:01 jdoose

@jdoose That is totally badass. Well done, sir!

rex avatar Jan 21 '15 18:01 rex

:D Thanks! batch files tend to be not very reliable, so I think of it as a workaround.

jdoose avatar Jan 22 '15 07:01 jdoose

Until we have any resolution for this. For the time being you can use grunt-docco to use any globbing pattern you need in on any OS. https://github.com/DavidSouther/grunt-docco

@jashkenas I understand your reservations regarding unwieldy hairy solutions, but really well thought of and successful tools like grunt precisely add a layer such as glob to provide cross platform solutions. I think it is better and let that layer allow some globs to pass through and use the OS's native functions.

Besides, one of the conventions (albeit not entirely well thought of) in the npm realm is that we usually end up with more packages than are the minimum possible necessary! I don't think the addition of glob for non windows users is actually such a hairy solution.

gaurav21r avatar Jan 16 '16 06:01 gaurav21r

The batch file worked for me once ..but now when i am running the same batch file it does not produce the docs folder.. Any help plz

sourav2029 avatar Aug 01 '16 09:08 sourav2029

@sourav2029 Please uncomment the first line "@echo off", run the batch file from a command shell and post the result here.

jdoose avatar Aug 01 '16 09:08 jdoose

@jdoose "The syntax of the command is incorrect."

sourav2029 avatar Aug 01 '16 10:08 sourav2029

;) Could you post some more lines? It is quite hard to find which command is incorrect if the call is missing :D

jdoose avatar Aug 01 '16 10:08 jdoose

@jdoose Okay so after trying so many things when i removed the node modules folder from my project it finally worked ...probably too long filename was causing the error..can you explain it what does this too long filename error mean and why does it occur ..I really appreciate your time and effort ..Thank you

sourav2029 avatar Aug 01 '16 11:08 sourav2029

@jdoose this is the result when i run the batch file from the terminal

C:\Users\Prem\Desktop\yoga_app>set LIST=".\app.js" ".\config\asana_function.js" ".\config\chgpass.js" ".\config\favorites_fun.js" ".\config\loginFun.js" ".\conf ig\logout_function.js" ".\config\options_functions.js" ".\config\signup_1.js" ". \config\signup_2.js" ".\models\asana_model.js" ".\models\aspirations.js" ".\mode ls\check_for_user_validation.js" ".\models\disease_cure.js" ".\models\option_mod el.js" ".\models\personalised_session.js" ".\models\profession.js" ".\models\ses sion_model.js" ".\models\started_sessions.js" ".\models\usermodel.js" ".\modules \cryptofunctions.js" ".\modules\extraFunctions.js" ".\node_modules\assert\assert .js" ".\node_modules\assert\test.js" ".\node_modules\assert\node_modules\util\ut il.js" ".\node_modules\assert\node_modules\util\node_modules\inherits\inherits.j s" ".\node_modules\assert\node_modules\util\node_modules\inherits\inherits_brows er.js" ".\node_modules\assert\node_modules\util\node_modules\inherits\test.js" " .\node_modules\assert\node_modules\util\support\isBuffer.js" ".\node_modules\ass ert\node_modules\util\support\isBufferBrowser.js" ".\node_modules\assert\node_mo dules\util\test\browser\inspect.js" ".\node_modules\assert\node_modules\util\tes t\browser\is.js" ".\node_modules\assert\node_modules\util\test\node\debug.js" ". \node_modules\assert\node_modules\util\test\node\format.js" ".\node_modules\asse rt\node_modules\util\test\node\inspect.js" ".\node_modules\assert\node_modules\u til\test\node\log.js" ".\node_modules\assert\node_modules\util\test\node\util.js " ".\node_modules\async\dist\async.js" ".\node_modules\async\dist\async.min.js" ".\node_modules\async\lib\async.js" ".\node_modules\body-parser\index.js" ".\nod e_modules\body-parser\lib\read.js" ".\node_modules\body-parser\lib\types\json.js " ".\node_modules\body-parser\lib\types\raw.js" ".\node_modules\body-parser\lib
types\text.js" ".\node_modules\body-parser\lib\types\urlencoded.js" ".\node_modu les\body-parser\node_modules\bytes\index.js" ".\node_modules\body-parser\node_mo dules\content-type\index.js" ".\node_modules\body-parser\node_modules\depd\index .js" ".\node_modules\body-parser\node_modules\depd\lib\browser\index.js" ".\node modules\body-parser\node_modules\depd\lib\compat\buffer-concat.js" ".\node_modu les\body-parser\node_modules\depd\lib\compat\callsite-tostring.js" ".\node_modul es\body-parser\node_modules\depd\lib\compat\event-listener-count.js" ".\node_mod ules\body-parser\node_modules\depd\lib\compat\index.js" ".\node_modules\body-par ser\node_modules\http-errors\index.js" ".\node_modules\body-parser\node_modules
http-errors\node_modules\inherits\inherits.js" ".\node_modules\body-parser\node
modules\http-errors\node_modules\inherits\inherits_browser.js" ".\node_modules\b ody-parser\node_modules\http-errors\node_modules\inherits\test.js" ".\node_modul es\body-parser\node_modules\http-errors\node_modules\setprototypeof\index.js" ". \node_modules\body-parser\node_modules\http-errors\node_modules\statuses\index.j s" ".\node_modules\body-parser\node_modules\iconv-lite\encodings\dbcs-codec.js" ".\node_modules\body-parser\node_modules\iconv-lite\encodings\dbcs-data.js" ".\n ode_modules\body-parser\node_modules\iconv-lite\encodings\index.js" ".\node_modu les\body-parser\node_modules\iconv-lite\encodings\internal.js" ".\node_modules\b ody-parser\node_modules\iconv-lite\encodings\sbcs-codec.js" ".\node_modules\body -parser\node_modules\iconv-lite\encodings\sbcs-data-generated.js" ".\node_module s\body-parser\node_modules\iconv-lite\encodings\sbcs-data.js" ".\node_modules\bo dy-parser\node_modules\iconv-lite\encodings\utf16.js" ".\node_modules\body-parse r\node_modules\iconv-lite\encodings\utf7.js" ".\node_modules\body-parser\node_mo dules\iconv-lite\lib\bom-handling.js" ".\node_modules\body-parser\node_modules\i conv-lite\lib\extend-node.js" ".\node_modules\body-parser\node_modules\iconv-lit e\lib\index.js" ".\node_modules\body-parser\node_modules\iconv-lite\lib\streams. js" ".\node_modules\body-parser\node_modules\on-finished\index.js" ".\node_modul es\body-parser\node_modules\on-finished\node_modules\ee-first\index.js" ".\node_ modules\body-parser\node_modules\qs\dist\qs.js" ".\node_modules\body-parser\node modules\qs\lib\index.js" ".\node_modules\body-parser\node_modules\qs\lib\parse. js" ".\node_modules\body-parser\node_modules\qs\lib\stringify.js" ".\node_module s\body-parser\node_modules\qs\lib\utils.js" ".\node_modules\body-parser\node_mod ules\qs\test\index.js" ".\node_modules\body-parser\node_modules\qs\test\parse.js " ".\node_modules\body-parser\node_modules\qs\test\stringify.js" ".\node_modules \body-parser\node_modules\qs\test\utils.js" ".\node_modules\body-parser\node_mod ules\raw-body\index.js" ".\node_modules\body-parser\node_modules\raw-body\node_m odules\unpipe\index.js" ".\node_modules\body-parser\node_modules\type-is\index.j s" ".\node_modules\body-parser\node_modules\type-is\node_modules\media-typer\ind ex.js" ".\node_modules\body-parser\node_modules\type-is\node_modules\mime-types
index.js" ".\node_modules\body-parser\node_modules\type-is\node_modules\mime-typ es\node_modules\mime-db\index.js" ".\node_modules\consolidate\index.js" ".\node
modules\consolidate\lib\consolidate.js" ".\node_modules\consolidate\node_modules \bluebird\js\browser\bluebird.core.js" ".\node_modules\consolidate\node_modules
bluebird\js\browser\bluebird.core.min.js" ".\node_modules\consolidate\node_modul es\bluebird\js\browser\bluebird.js" ".\node_modules\consolidate\node_modules\blu ebird\js\browser\bluebird.min.js" ".\node_modules\consolidate\node_modules\blueb ird\js\release\any.js" ".\node_modules\consolidate\node_modules\bluebird\js\rele ase\assert.js" ".\node_modules\consolidate\node_modules\bluebird\js\release\asyn c.js" ".\node_modules\consolidate\node_modules\bluebird\js\release\bind.js" ".\n ode_modules\consolidate\node_modules\bluebird\js\release\bluebird.js" ".\node_mo dules\consolidate\node_modules\bluebird\js\release\call_get.js" ".\node_modules
consolidate\node_modules\bluebird\js\release\cancel.js" ".\node_modules\consolid ate\node_modules\bluebird\js\release\catch_filter.js" ".\node_modules\consolidat e\node_modules\bluebird\js\release\context.js" ".\node_modules\consolidate\node_ modules\bluebird\js\release\debuggability.js" ".\node_modules\consolidate\node_m odules\bluebird\js\release\direct_resolve.js" ".\node_modules\consolidate\node_m odules\bluebird\js\release\each.js" ".\node_modules\consolidate\node_modules\blu ebird\js\release\errors.js" ".\node_modules\consolidate\node_modules\bluebird\js \release\es5.js" ".\node_modules\consolidate\node_modules\bluebird\js\release\fi lter.js" ".\node_modules\consolidate\node_modules\bluebird\js\release\finally.js " ".\node_modules\consolidate\node_modules\bluebird\js\release\generators.js" ". \node_modules\consolidate\node_modules\bluebird\js\release\join.js" ".\node_modu les\consolidate\node_modules\bluebird\js\release\map.js" ".\node_modules\consoli date\node_modules\bluebird\js\release\method.js" ".\node_modules\consolidate\nod e_modules\bluebird\js\release\nodeback.js" ".\node_modules\consolidate\node_modu les\bluebird\js\release\nodeify.js" ".\node_modules\consolidate\node_modules\blu ebird\js\release\promise.js" ".\node_modules\consolidate\node_modules\bluebird\j s\release\promise_array.js" ".\node_modules\consolidate\node_modules\bluebird\js \release\promisify.js" ".\node_modules\consolidate\node_modules\bluebird\js\rele ase\props.js" ".\node_modules\consolidate\node_modules\bluebird\js\release\queue .js" ".\node_modules\consolidate\node_modules\bluebird\js\release\race.js" ".\no de_modules\consolidate\node_modules\bluebird\js\release\reduce.js" ".\node_modul es\consolidate\node_modules\bluebird\js\release\schedule.js" ".\node_modules\con solidate\node_modules\bluebird\js\release\settle.js" ".\node_modules\consolidate \node_modules\bluebird\js\release\some.js" ".\node_modules\consolidate\node_modu les\bluebird\js\release\synchronous_inspection.js" ".\node_modules\consolidate\n ode_modules\bluebird\js\release\thenables.js" ".\node_modules\consolidate\node_m odules\bluebird\js\release\timers.js" ".\node_modules\consolidate\node_modules\b luebird\js\release\using.js" ".\node_modules\consolidate\node_modules\bluebird\j s\release\util.js" ".\node_modules\cookie-parser\index.js"

C:\Users\Prem\Desktop\yoga_app>docco ".\app.js" ".\config\asana_function.js" ".
config\chgpass.js" ".\config\favorites_fun.js" ".\config\loginFun.js" ".\config
logout_function.js" ".\config\options_functions.js" ".\config\signup_1.js" ".\co nfig\signup_2.js" ".\models\asana_model.js" ".\models\aspirations.js" ".\models
check_for_user_validation.js" ".\models\disease_cure.js" ".\models\option_model. js" ".\models\personalised_session.js" ".\models\profession.js" ".\models\sessio n_model.js" ".\models\started_sessions.js" ".\models\usermodel.js" ".\modules\cr yptofunctions.js" ".\modules\extraFunctions.js" ".\node_modules\assert\assert.js " ".\node_modules\assert\test.js" ".\node_modules\assert\node_modules\util\util. js" ".\node_modules\assert\node_modules\util\node_modules\inherits\inherits.js" ".\node_modules\assert\node_modules\util\node_modules\inherits\inherits_browser. js" ".\node_modules\assert\node_modules\util\node_modules\inherits\test.js" ".\n ode_modules\assert\node_modules\util\support\isBuffer.js" ".\node_modules\assert \node_modules\util\support\isBufferBrowser.js" ".\node_modules\assert\node_modul es\util\test\browser\inspect.js" ".\node_modules\assert\node_modules\util\test\b rowser\is.js" ".\node_modules\assert\node_modules\util\test\node\debug.js" ".\no de_modules\assert\node_modules\util\test\node\format.js" ".\node_modules\assert
node_modules\util\test\node\inspect.js" ".\node_modules\assert\node_modules\util \test\node\log.js" ".\node_modules\assert\node_modules\util\test\node\util.js" " .\node_modules\async\dist\async.js" ".\node_modules\async\dist\async.min.js" ".
node_modules\async\lib\async.js" ".\node_modules\body-parser\index.js" ".\node_m odules\body-parser\lib\read.js" ".\node_modules\body-parser\lib\types\json.js" " .\node_modules\body-parser\lib\types\raw.js" ".\node_modules\body-parser\lib\typ es\text.js" ".\node_modules\body-parser\lib\types\urlencoded.js" ".\node_modules \body-parser\node_modules\bytes\index.js" ".\node_modules\body-parser\node_modul es\content-type\index.js" ".\node_modules\body-parser\node_modules\depd\index.js " ".\node_modules\body-parser\node_modules\depd\lib\browser\index.js" ".\node_mo dules\body-parser\node_modules\depd\lib\compat\buffer-concat.js" ".\node_modules \body-parser\node_modules\depd\lib\compat\callsite-tostring.js" ".\node_modules
body-parser\node_modules\depd\lib\compat\event-listener-count.js" ".\node_module s\body-parser\node_modules\depd\lib\compat\index.js" ".\node_modules\body-parser \node_modules\http-errors\index.js" ".\node_modules\body-parser\node_modules\htt p-errors\node_modules\inherits\inherits.js" ".\node_modules\body-parser\node_mod ules\http-errors\node_modules\inherits\inherits_browser.js" ".\node_modules\body -parser\node_modules\http-errors\node_modules\inherits\test.js" ".\node_modules
body-parser\node_modules\http-errors\node_modules\setprototypeof\index.js" ".\no de_modules\body-parser\node_modules\http-errors\node_modules\statuses\index.js" ".\node_modules\body-parser\node_modules\iconv-lite\encodings\dbcs-codec.js" ".
node_modules\body-parser\node_modules\iconv-lite\encodings\dbcs-data.js" ".\node _modules\body-parser\node_modules\iconv-lite\encodings\index.js" ".\node_modules \body-parser\node_modules\iconv-lite\encodings\internal.js" ".\node_modules\body -parser\node_modules\iconv-lite\encodings\sbcs-codec.js" ".\node_modules\body-pa rser\node_modules\iconv-lite\encodings\sbcs-data-generated.js" ".\node_modules\b ody-parser\node_modules\iconv-lite\encodings\sbcs-data.js" ".\node_modules\body- parser\node_modules\iconv-lite\encodings\utf16.js" ".\node_modules\body-parser\n ode_modules\iconv-lite\encodings\utf7.js" ".\node_modules\body-parser\node_modul es\iconv-lite\lib\bom-handling.js" ".\node_modules\body-parser\node_modules\icon v-lite\lib\extend-node.js" ".\node_modules\body-parser\node_modules\iconv-lite\l ib\index.js" ".\node_modules\body-parser\node_modules\iconv-lite\lib\streams.js" ".\node_modules\body-parser\node_modules\on-finished\index.js" ".\node_modules
body-parser\node_modules\on-finished\node_modules\ee-first\index.js" ".\node_mod ules\body-parser\node_modules\qs\dist\qs.js" ".\node_modules\body-parser\node_mo dules\qs\lib\index.js" ".\node_modules\body-parser\node_modules\qs\lib\parse.js" ".\node_modules\body-parser\node_modules\qs\lib\stringify.js" ".\node_modules\b ody-parser\node_modules\qs\lib\utils.js" ".\node_modules\body-parser\node_module s\qs\test\index.js" ".\node_modules\body-parser\node_modules\qs\test\parse.js" " .\node_modules\body-parser\node_modules\qs\test\stringify.js" ".\node_modules\bo dy-parser\node_modules\qs\test\utils.js" ".\node_modules\body-parser\node_module s\raw-body\index.js" ".\node_modules\body-parser\node_modules\raw-body\node_modu les\unpipe\index.js" ".\node_modules\body-parser\node_modules\type-is\index.js" ".\node_modules\body-parser\node_modules\type-is\node_modules\media-typer\index. js" ".\node_modules\body-parser\node_modules\type-is\node_modules\mime-types\ind ex.js" ".\node_modules\body-parser\node_modules\type-is\node_modules\mime-types
node_modules\mime-db\index.js" ".\node_modules\consolidate\index.js" ".\node_mod ules\consolidate\lib\consolidate.js" ".\node_modules\consolidate\node_modules\bl uebird\js\browser\bluebird.core.js" ".\node_modules\consolidate\node_modules\blu ebird\js\browser\bluebird.core.min.js" ".\node_modules\consolidate\node_modules
bluebird\js\browser\bluebird.js" ".\node_modules\consolidate\node_modules\bluebi rd\js\browser\bluebird.min.js" ".\node_modules\consolidate\node_modules\bluebird \js\release\any.js" ".\node_modules\consolidate\node_modules\bluebird\js\release \assert.js" ".\node_modules\consolidate\node_modules\bluebird\js\release\async.j s" ".\node_modules\consolidate\node_modules\bluebird\js\release\bind.js" ".\node modules\consolidate\node_modules\bluebird\js\release\bluebird.js" ".\node_modul es\consolidate\node_modules\bluebird\js\release\call_get.js" ".\node_modules\con solidate\node_modules\bluebird\js\release\cancel.js" ".\node_modules\consolidate \node_modules\bluebird\js\release\catch_filter.js" ".\node_modules\consolidate\n ode_modules\bluebird\js\release\context.js" ".\node_modules\consolidate\node_mod ules\bluebird\js\release\debuggability.js" ".\node_modules\consolidate\node_modu les\bluebird\js\release\direct_resolve.js" ".\node_modules\consolidate\node_modu les\bluebird\js\release\each.js" ".\node_modules\consolidate\node_modules\bluebi rd\js\release\errors.js" ".\node_modules\consolidate\node_modules\bluebird\js\re lease\es5.js" ".\node_modules\consolidate\node_modules\bluebird\js\release\filte r.js" ".\node_modules\consolidate\node_modules\bluebird\js\release\finally.js" " .\node_modules\consolidate\node_modules\bluebird\js\release\generators.js" ".\no de_modules\consolidate\node_modules\bluebird\js\release\join.js" ".\node_modules \consolidate\node_modules\bluebird\js\release\map.js" ".\node_modules\consolidat e\node_modules\bluebird\js\release\method.js" ".\node_modules\consolidate\node_m odules\bluebird\js\release\nodeback.js" ".\node_modules\consolidate\node_modules \bluebird\js\release\nodeify.js" ".\node_modules\consolidate\node_modules\bluebi rd\js\release\promise.js" ".\node_modules\consolidate\node_modules\bluebird\js\r elease\promise_array.js" ".\node_modules\consolidate\node_modules\bluebird\js\re lease\promisify.js" ".\node_modules\consolidate\node_modules\bluebird\js\release \props.js" ".\node_modules\consolidate\node_modules\bluebird\js\release\queue.js " ".\node_modules\consolidate\node_modules\bluebird\js\release\race.js" ".\node modules\consolidate\node_modules\bluebird\js\release\reduce.js" ".\node_modules
consolidate\node_modules\bluebird\js\release\schedule.js" ".\node_modules\consol idate\node_modules\bluebird\js\release\settle.js" ".\node_modules\consolidate\no de_modules\bluebird\js\release\some.js" ".\node_modules\consolidate\node_modules \bluebird\js\release\synchronous_inspection.js" ".\node_modules\consolidate\node _modules\bluebird\js\release\thenables.js" ".\node_modules\consolidate\node_modu les\bluebird\js\release\timers.js" ".\node_modules\consolidate\node_modules\blue bird\js\release\using.js" ".\node_modules\consolidate\node_modules\bluebird\js\r elease\util.js" ".\node_modules\cookie-parser\index.js" The syntax of the command is incorrect.

sourav2029 avatar Aug 01 '16 11:08 sourav2029

@jdoose when i removed the node modules from the project ,the output was

C:\Users\Prem\Desktop\yoga_app>set LIST=".\app.js" ".\config\asana_function.js ".\config\chgpass.js" ".\config\favorites_fun.js" ".\config\loginFun.js" ".\co ig\logout_function.js" ".\config\options_functions.js" ".\config\signup_1.js" \config\signup_2.js" ".\models\asana_model.js" ".\models\aspirations.js" ".\mo ls\check_for_user_validation.js" ".\models\disease_cure.js" ".\models\option_m el.js" ".\models\personalised_session.js" ".\models\profession.js" ".\models\s sion_model.js" ".\models\started_sessions.js" ".\models\usermodel.js" ".\modul \cryptofunctions.js" ".\modules\extraFunctions.js" ".\routes\asanaListRouter.j ".\routes\backup.js" ".\routes\favorites.js" ".\routes\forgot.js" ".\routes\i ex.js" ".\routes\login.js" ".\routes\logout.js" ".\routes\option.js" ".\routes ession.js" ".\routes\signup.js" ".\routes\started_session.js" ".\routes\starte sessionRouter.js" ".\routes\users.js" ".\routes\verify.js"

C:\Users\Prem\Desktop\yoga_app>docco ".\app.js" ".\config\asana_function.js" " config\chgpass.js" ".\config\favorites_fun.js" ".\config\loginFun.js" ".\confi logout_function.js" ".\config\options_functions.js" ".\config\signup_1.js" ".
nfig\signup_2.js" ".\models\asana_model.js" ".\models\aspirations.js" ".\model check_for_user_validation.js" ".\models\disease_cure.js" ".\models\option_mode js" ".\models\personalised_session.js" ".\models\profession.js" ".\models\sess n_model.js" ".\models\started_sessions.js" ".\models\usermodel.js" ".\modules
yptofunctions.js" ".\modules\extraFunctions.js" ".\routes\asanaListRouter.js" \routes\backup.js" ".\routes\favorites.js" ".\routes\forgot.js" ".\routes\inde js" ".\routes\login.js" ".\routes\logout.js" ".\routes\option.js" ".\routes\se ion.js" ".\routes\signup.js" ".\routes\started_session.js" ".\routes\started_s sionRouter.js" ".\routes\users.js" ".\routes\verify.js" docco: .\app.js -> docs\app.html docco: .\config\asana_function.js -> docs\asana_function.html docco: .\config\chgpass.js -> docs\chgpass.html docco: .\config\favorites_fun.js -> docs\favorites_fun.html docco: .\config\loginFun.js -> docs\loginFun.html docco: .\config\logout_function.js -> docs\logout_function.html docco: .\config\options_functions.js -> docs\options_functions.html docco: .\config\signup_1.js -> docs\signup_1.html docco: .\config\signup_2.js -> docs\signup_2.html docco: .\models\asana_model.js -> docs\asana_model.html docco: .\models\aspirations.js -> docs\aspirations.html docco: .\models\check_for_user_validation.js -> docs\check_for_user_validation tml docco: .\models\disease_cure.js -> docs\disease_cure.html docco: .\models\option_model.js -> docs\option_model.html docco: .\models\personalised_session.js -> docs\personalised_session.html docco: .\models\profession.js -> docs\profession.html docco: .\models\session_model.js -> docs\session_model.html docco: .\models\started_sessions.js -> docs\started_sessions.html docco: .\models\usermodel.js -> docs\usermodel.html docco: .\modules\cryptofunctions.js -> docs\cryptofunctions.html docco: .\modules\extraFunctions.js -> docs\extraFunctions.html docco: .\routes\asanaListRouter.js -> docs\asanaListRouter.html docco: .\routes\backup.js -> docs\backup.html docco: .\routes\favorites.js -> docs\favorites.html docco: .\routes\forgot.js -> docs\forgot.html docco: .\routes\index.js -> docs\index.html docco: .\routes\login.js -> docs\login.html docco: .\routes\logout.js -> docs\logout.html docco: .\routes\option.js -> docs\option.html docco: .\routes\session.js -> docs\session.html docco: .\routes\signup.js -> docs\signup.html docco: .\routes\started_session.js -> docs\started_session.html docco: .\routes\started_sessionRouter.js -> docs\started_sessionRouter.html docco: .\routes\users.js -> docs\users.html docco: .\routes\verify.js -> docs\verify.htm

sourav2029 avatar Aug 01 '16 11:08 sourav2029

Ah, okay, I see. Well, that batch file just enumerates all js-files in the directory, including sub-directories and instructs docco to work on them. If you happen to have a node_modules folder (which any node developer most likely has) it will also traverse into that directory. That is not covered in the batch file, I missed that. That's why you have to delete the folder beforehand.

The long folder structure is the way how npm 2 works on windows. I suggest updating to npm 3 by npm install npm -g which does not have the problem with long file names any more. It still is a good idea to remove the node_modules folder before running that script

jdoose avatar Aug 01 '16 12:08 jdoose