jaguarjs-jsdoc icon indicating copy to clipboard operation
jaguarjs-jsdoc copied to clipboard

Suppress tag-source element?

Open dotherightthing opened this issue 10 years ago • 5 comments

Is there a way to suppress the output of div.tag-source ?

I'm using jaguarjs-jsdoc via grunt-jsdoc, and the tag source is showing the file path all the way down to the root of my OS, eg:

<div class="tag-source">/Volumes/VRMiniBackup/Backups/Web/Bitbucket/ob/wp-content/themes/sitename/resources/dev/scripts/sitename.js, line 2787</div>

This makes the div.tag-source overlap the adjacent documentation at all but the widest viewport widths.

Thanks.

dotherightthing avatar Oct 30 '14 11:10 dotherightthing

I got the same problem and I think it is a bug of jaguarjs-jsdoc. Attach my fix for your refer:

jaguarjs-jsdoc/publish.js: exports.publish = function(){...} line 404: sourceFilePaths.push(resolvedSourcePath); change to: if (sourceFilePaths.indexOf(resolvedSourcePath) === -1) { sourceFilePaths.push(resolvedSourcePath); }

MultiThreadIsBad avatar Jan 29 '15 06:01 MultiThreadIsBad

Any update on this?

chiedo avatar Jan 01 '16 21:01 chiedo

I had the same problem when generating documentation for one single file. In publish.js, the array 'sourceFilePaths' is used to collect all source references (path+filename). This array is later used to find and remove the common part. When generating doc for one .js source-file, this path+filename is always the same so the process of removing the path fails (as it includes the filename padded with a path separator). The simple fix I found is to remove the filename from the path+filename before populating 'sourceFilePaths'. Change 'jaguarjs-jsdoc-master/publish.js': sourceFilePaths.push(resolvedSourcePath); To: sourceFilePaths.push(path.dirname(resolvedSourcePath));

coolsp avatar May 18 '16 20:05 coolsp

I had a similar desire. While waiting for an official fix, if you just want to hide the div.tag-source element you could do so with a grunt task:

grunt.registerTask('docsPostProcessing', function () {
    var done = this.async();
    require('fs').appendFile('./[YourDocsDestination]/styles/jaguar.css', '.tag-source { display: none; }', function (err) {
        if (err) {
            grunt.fail.fatal(err);

            return;
        }

        done();
    });
});
grunt.registerTask('docs', ['jsdoc', 'docsPostProcessing']);

Hyddan avatar Aug 03 '16 15:08 Hyddan

Hi, I have the same issue.

It seems it was fixed in "jsdoc default template" : https://github.com/jsdoc3/jsdoc/issues/590 Could it be fixed here too ?

Thanks !

jbelien avatar Dec 20 '16 11:12 jbelien