learnyounode
learnyounode copied to clipboard
Enhancement: Node.js Local Document Generator
Update One adding custom Node.js documentation building, to start the upgrade process per Issue #503 .
The new API module is setup to create new documents once learnyounode is started, generating to node_apidoc and the version reflecting the version of Node.js used to execute. To keep with the consistency of offering an offline solution, all requests are made locally so there is no need for connectivity after the deps have been installed.
Note: Once the documents are created any future requests will be ignored as long as the folder exists, making sure not to add overhead on every single run. If a user accidentally removes the doc folder, it will recreate that folder on the next run.
To remove the need to overwrite files, reduce size, and redundancy the old 0.10 apidoc folder has been removed.
The CI build check is choking on the docbuild file which cannot get past the test. I am not sure what to do to get around the errors on the require calls, but everything works as intended.
Looks like one more issue where it is checking the local file build, and adding the default folder path. Fix on the way up.
Looks like the travis is still unhappy :P
Ok, it looks like it is now failing on the official Node.js document generator API that is part of the offline document API, otherwise it seems to be working as intended. I could go through those files, and change them all to standard if needed, and it should remove any of the CI errors.
Actually, going to check out this EEXISTS issue first.
Ok, I see now. It is catching the fs.stat error which isn't an actual error. Let me quiet that down, and see if it will ignore the standard on the official after that. Fix coming up.
Well, the fatal errors are gone now. The only issue with the tests is where the tests see some of the verbosity of the API when testing the exercises.
~~The reason for this is due to running that offline document API upon startup. It is run quietly per the buildOptions.quiet setting so no one actually sees this when running LYN, and it only runs when the document directory does not exist (first run unless doc dir is removed). For some reason the exercise tests still see these in the test though.~~
EDIT: Yep, I need to check this out. It seems when running it with next/verify/help/etc the messages still show. I'll create a new fix in the morning. Apologies for all of the surprises there at the end.
Ok, refactored, and re-released module to allow 100% passing locally.
It looks like there is a possible issue when validating files. I'm going to take the weekend to look for a way to limit the possible executions, instead of running on every instance.
Since I rebased with the latest master, it seems that the 5.x build is now erroring, but the 6.x and 7.x tests are passing. Unfortunately the 5.0 build is giving an npm error that if cannot find the function Buffer.alloc
, which requires Node.js 5.10.0
+ and the CI is using 5.0.0
:


Looking through my latest source, I am not finding this being called. It looks like this is an external issue, but not sure where when no node modules are being installed due to the error.
Please let me know if you need anything from me, as I would love to see this move forward so I can continue to help with new updates to help make this a more recent-friendly workshop. 😃
I went ahead and cleaned up the module, and added the postinstall script. Let me know if there is anything else that you feel would work better, or be more ideal in other situations.
EDIT: rebased the branch due to some lockfile conflicts. Not sure if you want an updated lockfile, so left it as-is until later.