gruntjs / grunt-contrib-yuidoc Goto Github PK
View Code? Open in Web Editor NEWCompile YUIDoc Documentation.
Home Page: http://gruntjs.com/
License: MIT License
Compile YUIDoc Documentation.
Home Page: http://gruntjs.com/
License: MIT License
Hello,
I tried several paths but nothing happens.
Hi,
I'm using yuidoc and trying to view within my jenkins environment, however rather annoyingly some script/css tags links are hardcoded to:
<link rel="stylesheet" href="http://yui.yahooapis.com/3.9.1/build/cssgrids/cssgrids-min.css">
<script src="http://yui.yahooapis.com/combo?3.9.1/build/yui/yui-min.js"></script>
Which creates a security alert when behind https.
Is there a way to fix this?
Thanks
JD
I need someone to help update this plugin to work with grunt 0.4.0rc5.
I had to revert the whole file src-dest mappings implicit iteration abstraction per gruntjs/grunt#606, and once again, multi tasks have to iterate over this.files
manually. In addition, there's a new this.filesSrc
array that contains a reduced, uniqued set of all matched src
files in case the task is read-only and only cares about source files.
See:
this.filesSrc
array.this.files
array.Notes:
nonull
in addition to src
to tell grunt to keep patterns or filepaths that don't actually match files. Because of this, the task shouldn't explode if a nonexistent src
filepath is encountered. I handle this in the grunt-contrib-concat by warning if not grunt.file.exists
but not failing the task.Guidelines for updating / publishing this plugin:
"*"
)README.md
file via grunt.node_modules
, run npm cache clean
and re-run npm install
to test.--tag=master
(not latest
)Does anyone mind if I convert this repo's line endings to LF
and add a .gitattributes
* text=auto
? It currently has CRLF
line endings committed.
I've been trying to use a different theme but with no luck it always uses the default. I used the "themedir" under "options" is this the correct way?
I'm running the yuidoc:compile
task with parseOnly: true
and sometimes (ca. 3 out of 4 times) the generated data.json file is empty.
Sorry for this being a relatively unspecific bug report but that's really all I can say - sometimes there's JSON in the file, sometimes not. Fortunately the code this problem occurs with is open source so the bug can be easily reproduced. The repo is here: https://github.com/simplabs/ember-simple-auth; just run grunt yuidoc:compile
and check tmp/data.json
- sometimes it's empty, sometimes not.
I just started using this task today but ran into some confusion for a few minutes until I realized that the paths
option doesn't use grunt.file.expand
.
My config is similar to the following, wherein I'm trying to generate documentation for a Platform codebase plus multiple derived products:
yuidoc: {
compile: {
name: "<%= pkg.name %>",
version: "<%= pkg.version %>",
options: {
paths: ["Platform/js", "Products/*/js"],
outdir: "docs"
}
}
}
The workaround (using grunt.file.expand
) was easy enough:
yuidoc: {
compile: {
name: "<%= pkg.name %>",
version: "<%= pkg.version %>",
options: {
paths: grunt.file.expand(["Platform/js", "Products/*/js"]),
outdir: "docs"
}
}
}
However, it's the behavior that threw me for a loop since I've become very accustomed to the typical auto-expanding nature of Grunt tasks that use the standard Grunt src
/filesSrc
config patterns. It would be nice to either follow this behavior for this task's paths
option, or else provide this behavior via the normal src
option that would take precedence over this YUIDoc one-off paths
option.
And yes, I understand that (a) my use case is not the norm, and (b) this task was setup such that the options mapped directly to their YUIDoc equivalents.
Anyway, please consider it. If the group is opposed, though, I'm not going to cry about it. ๐ช
I'm using the example configuration, but when I try to compile w grunt, I get:
Warning: No path(s) provided for YUIDoc to scan. Use --force to continue
Browsing through the source, it seems that the options object (which contains the paths) is expected to be a sibling of the compile object, but in your example it is a child of compile.
However, when I move the options object up one level, everything compiles without errors, but the docs don't get generated. I attempted to debug the tasks/yuidoc.js file, and noticed that execution stops on line 61:
json = (new Y.YUIDoc(options)).run();
After that, nothing is executed.
My yuidoc generation works fine when using the command line generator
Here are the versions I'm using:
grunt-cli v0.1.6
grunt v0.4.0rc7
yuidoc 0.3.35
[email protected]
Hope that helps
I tried using this plugin but found it better to just setup a Makefile to run yuidoc --server
I had a really hard time getting it to run out of the Gruntfile (even with some plugins)
It would be quite helpful if project properties (project name, description, version etc.) could be parsed as templates: this would allow e.g. to use version information from the package or other locations.
Example:
grunt.initConfig({
...
pkg: '<json:package.json>',
...
yuidoc: {
myTask : {
name: '<%= pkg.name %>',
description: '<%= pkg.description %>',
version: '<%= pkg.version %>,
options: {
...
}
}
...
}
...
});
When trying to use a path glob, task is unable to find directory.
Example:
paths: 'tasks/*/.js'
Currently, use yuidoc with Grunt doesn't display any yuidoc warning (like detecting unknown tags)
is it possible to add a way to display them ?
It could help a lot to find typos.
Not sure if I'm doing something wrong here, but all of my code examples using the @example tag get pushed a bunch of indents after the first line: http://d.pr/i/jply
Any way to fix this? Here's my example code:
/**
* Creates a new user
*
* @method create
* @for sdk.user
* @param data {object}
* @param data.email {string}
* @param data.first_name {string}
* @param data.last_name {string}
* @param data.metadata {object}
* @param data.tags {array}
* @param callback
* @param callback.err {string}
* @param callback.response {object} [User object](/classes/object.user.html)
* @example
*
* sdk.user.create({
* first_name: 'Ron',
* last_name: 'Swanson',
* email: '[email protected]'
* }, function (err, response) {
* if (!err) {
* // User created
* }
* });
*/
I thought at first it might be the theme I'm using, but having the same issue with the default theme. Thanks!
hello
Thanks for this project; it's very useful. I ran into a small problem when trying to configure it to use the --no-code
flag (to suppress the "found at suchandsuch.js
, line 456" messages). The readme states that "Settings mirror YUIDoc config.", but in fact that's not exactly the case. The page that is linked to lists command line arguments, such as this for the one I wanted to set:
But if I set --no-code
in the Grunt config it was ignored. Looking through the source for yuidoc:
https://github.com/yui/yuidoc/blob/e7f26989a0a403389d4b05894c5f04bde399f361/lib/options.js#L79
I noticed that in fact these command line flags are converted:
and it is these converted values that you need to set in the Grunt config. So for me it was this:
nocode:true
Perhaps this is abundantly obvious to everyone else and this issue is a waste of time. But perhaps not.
There are two slight complications in the conversion of command line flags to actual flags:
..some command line flags cause two options to be set, and:
not all command line flags are converted in the same way. --no-code
becomes nocode
, so you'd be tempted to suggest --project-version
would become projectversion
. But it does not.
Unless there is a different standard for defining what an array contains in YUIDoc, (e.g. Array[type]), then grunt-contrib-yuidoc should correctly handle these tags and not output them as elements.
Currently, once such a declaration is run in to, the rest of the page is broken.
Just updated some packages in project and got same error as I found a year ago.
Firstly I addressed it to yuidocjs, but now I found out, that this problem depends on grunt-contrib-yuidoc version.
Problem description with debugging is HERE: yui/yuidoc#242
For now we use "yuidocjs": "0.9.0" and "grunt-contrib-yuidoc": "0.5.0" without any problems, but when we use 0.6...10 versions of your package, we are getting same error as described in the linked youdocjs issue 242.
Warning: Object src/ has no method 'parsedir' Use --force to continue.
gruntfile config:
{//...
yuidoc: {
compile: {
name: '<%= pkg.name %>',
description: '<%= pkg.description %>',
version: '<%= pkg.version %>',
url: 'http://example.com',
options: {
paths: 'src/',
//themedir: 'path/to/custom/theme/',
outdir: 'doc/code',
"extension": ".ts"
}
}
}
}
see the full description of error HERE: yui/yuidoc#242
I tried a few things to see if I can this plugin to generate docs for TypeScript files but I am not sure what to do. Can you add support for TypeScript files?
Hello,
I am very new to this documentation thing, so I guess I am missing the obvious but apparently I am not able to compile a documentation:
https://gist.github.com/Soelen/48c89b78adaf02fa42e8
app/Controller has like 5 files, I gisted one of those 5 called UsersController.
I must do something wrong, I just don't see it. Please if anyone would be so kind, point me out what exactly I am doing wrong.
Thanks in advance!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.