Closed adam-lynch closed 10 years ago
Ok it seems like it's not even acting as expected from the command line.
biscotto
doesn't find any files../test/fixtures/simple
to test/fixtures/simple
in .biscottoopts
has no effect.biscotto ./test/fixtures/simple
, biscotto test/fixtures/simple
biscotto test\fixtures\simple
, etc. doesn't work.test/fixtures/simple/module.coffee
out to the root and just having ./
in .biscottoopts
doesn't work..biscottoopts
and running biscotto
doesn't work.The only thing that does work is removing .biscottoopts
, having the file at the root and running biscotto module.coffee
node: 0.10.20
windows: 8.1
I'm looking into this and having a hard time reproducing, mostly because I am trying to figure out how gulp-biscotto operates.
I see the failing tests in gulp-biscotto; but when I run biscotto
from the command line, it finds one file, test/fixtures/simple/module.coffee:
I am on OS X so I wonder if I messed up some of the path detection here.
Ok, I got this on my Windows 8 VM, and I also get zero files. Looking into it.
Right, so, Biscotto changed to only fetch files within predefined source directories: https://github.com/atom/biscotto/commit/11262d940217a6e9b8fa00137fcadcd942a050fa
This was because it was picking up way too many files elsewhere, like Gruntfile and test files.
If I understand what the gulp-biscotto test is doing, it should be fetching the file in test/fixtures/simple, because that's what your biscottoops is requesting. But it's not. Is that right?
@gjtorikian
Right, so, Biscotto changed to only fetch files within predefined source directories: 11262d9
Isn't that a breaking change? Shouldn't details about SRC_DIRS
be in the readme? (i.e. more than just saying biscotto tries to figure it out). The answer could be no to these, I just want to pose the question(s) :)
If I understand what the gulp-biscotto test is doing, it should be fetching the file in test/fixtures/simple, because that's what your biscottoops is requesting. But it's not. Is that right?
Correct.
Isn't that a breaking change?
In retrospect, perhaps. In my mind, extraneous files should never have been a part of the output in the first place, so I considered it a bugfix. You can always force inclusion of any directory by explicitly defining it, for example biscotto src,test,some_other_dir
(as opposed to just biscotto .
).
More directly, this sounds like biscottoopts broke, which may make this related to https://github.com/atom/biscotto/issues/55.
More directly, this sounds like biscottoopts broke, which may make this related to #55.
Oh, I'd completely forgotten about that.
i am on windows too trying to use biscotto from the command line and also using biscotto-gulp. basically they are not working. it finds the README.md but i could not get it to scan through any directories.
If I use the opts file i can specifically define exactly ONE file which will get parsed then. Adding another file has no effect and adding another empty line has the effect of not parsing any files anymore.
will parse 1 file:
./api
-
./api/api.coffee
will parse 1 file (even though both exist of course):
./api
-
./api/api.coffee
./api/controls.coffee
Whether or not./api
is included as the first line has no effect. And other coffee files in the directory are not detected.
Sadly this means its not usable for me at all right now since I cannot document more than 1 file (plus README.md).
Any hints ?
PS: I also tried command line parameters biscotto api
or biscotto ./api
biscotto ./api.coffee
biscotto ./api/api.coffee,./api/controls.coffee
etc but same issues.
@matthiasg I'm surprised gulp-biscotto isn't working for you rights now. I haven't updated it to use biscotto@2.2.1 yet.
In one of my projects, I have a .biscottoopts
file with just ./src
in it and my gulp task looks like:
gulp.task('docs', [/*'plato'*/ 'clean-docs'], function(){
return $.biscotto()
.pipe(gulp.dest(paths.other.docsRoot));
});
And it working fine (with gulp-biscotto@0.0.7, the latest).
I found it just now
the “Line Endings” of the .biscottoopts
file must have UNIX endings, which sublime did not create by default on my machine. I did not expect this to be an issue since its a node.js module parsing it and typical node packages handle that correctly , maybe biscotto is doing some manual splitting here…
cheers, Matthias
EDIT: But this seems to only solve the command line call to 'biscotto' NOT the gulp-biscotto case. will investigate some more
briefly looking at biscotto.coffee
/ @run
I am not sure how its supposed to find any source directory other than what is hardcoded into SRC_DIRS
. I will have to look deeper but basically src
/lib
and app
are built in, but api is not reconfigurable (contrary to documentation it seems)
Line 13: SRC_DIRS = ['src', 'lib', 'app']
and there doesn't seem to be any write access to that before @detectSources
Sorry about that; 2.2.3 has the fix.
You can (or should have been able to) pass in your own directories explicitly, which overrides SRC_DIR
s. Unfortunately some of the detection was broken, and instead of using user-supplied directories, SRC_DIR
was always being used. It's fixed and tested with gulp-biscotto.
It works now .. but I have to write just api
(my source folder) into the .biscottoopts. ./api
does not work
@gjtorikian ok thanks.
@matthiasg I see now what probably happened for you for gulp-biscotto
. When you installed it, npm probably installed biscotto@2.2.1
because I had ~2.2.0
in the readme which will take the latest 2.2.x
. I'm now going to be strictly pointing to 2.2.3
to be safe.
Just published gulp-biscotto@0.0.8
now.
@adam-lynch is saw that (versioning) too, thought I had written that earlier but did not seem to have. but the issues I had persisted even when using 2.2.0 .. I had that one manually checked out ..
anyway.. it does work now so thanks :) I only think that the line endings should not be forced to use unix endings...
I think #61 (i.e. v2.2.1) might have a problem. When bumping up the biscotto version gulp-biscotto depends on, the tests fail. It seems like
biscotto.run done, each
doesn't calleach
withclass/Module.html
(for a given class calledModule
) anymore.If it helps, the problem can be seen on my
biscotto-2.2.1
branch; the first test fails here where it does a dumb check against the files emitted by biscotto. Here's the test failing on TravisCI.