DocumentJS currently does not move the demos into the output folder and this makes it difficult to add demos to the generated docs. One can do it manually, but I've taken to creating a grunt task that handles this. This seems like a basic missing feature.
Suggestion
The @demo tag should point to the current location of the demo file and then DocumentJS should grab the file and move it to a common demos folder inside the output folder. Then it would update the relative link to the demo in the outputted HTML.
Also possible that we should rename the demo files (to avoid name conflicts) and put them all in the demo folder flat. I don't think this would cause any problems. That way, the user can put the demo file wherever they want and DocJS copys/moves/renames it and updates the link.
This is a big problem, the the fix isn't simple. Most demo pages reference external scripts and styles. Those would also have to be moved. This can't be done in a deterministic fashion.
DocumentJS currently does not move the demos into the output folder and this makes it difficult to add demos to the generated docs. One can do it manually, but I've taken to creating a
grunt
task that handles this. This seems like a basic missing feature.Suggestion
The
@demo
tag should point to the current location of the demo file and then DocumentJS should grab the file and move it to a commondemos
folder inside the output folder. Then it would update the relative link to the demo in the outputted HTML.For example
Would get copied to:
Also possible that we should rename the demo files (to avoid name conflicts) and put them all in the
demo
folder flat. I don't think this would cause any problems. That way, the user can put the demo file wherever they want and DocJS copys/moves/renames it and updates the link.Ref https://github.com/bitovi/documentjs/issues/116