mmacmillan / grunt-jsdox Goto Github PK
View Code? Open in Web Editor NEWRecursively generates markdown files for your project, using the jsDox parser. Optionally generates a table of contents, and supports git
License: MIT License
Recursively generates markdown files for your project, using the jsDox parser. Optionally generates a table of contents, and supports git
License: MIT License
Hi,
I am a jsdox newbie. The markdown files generated from my javascript files do not describe the @constructor notation. It looks like the support for @constructor and gfm was added in sutoiku/jsdox#3 commit. Can you please point to the fixed release or/and bump up the version so we can use the latest version of jsdox i.e 0.2.9. The two related projects are as follows.
-https://github.com/stouf/jsdox (with @constructor and gfm support)
-https://github.com/sutoiku/jsdox
I tried using this locally but it didn't resolve the issue. My package.json looks like follows.
"dependencies": {
"jsdox": ">=0.2.9"
},
"engine": "node >= 0.10",
"devDependencies": {
"grunt": "^0.4.5",
"jsdox": "git://github.com/stouf/jsdox.git",
"grunt-jsdox": "^0.1.4",
"yuidoc2md": "~0.2.0",
"grunt-yuidoc2md": "0.2.3"
}
Kindly let me know if you have any suggestions to correctly generate markdown files describing constructor.
Many thanks.
When pushing the generated documentation folder to github, the links generated in the table of contents are broken. They are missing the .md
extension.
Would you be open to maintainers of jsdox helping to maintain your awesome Grunt plugin? Myself or @pq would love to help.
I have following jsdox module defined in my Gruntfile:
jsdox: {
generate: {
options: {
contentsTitle: 'My Project API Documentation',
},
src: [ 'path/to/files' ],
dest: 'docs/markdown'
},
},
...
grunt.loadNpmTasks('grunt-jsdox');
grunt.registerTask('default', [ 'jsdox']);
I see following in the Terminal:
grunt jsdox
Loading "jsdox.js" tasks...ERROR
Error: Cannot find module 'lodash'
Warning: Task "jsdox" not found. Use --force to continue.
Aborted due to warnings.
Please share if there a solution/workaround for this issue?
Since #6 was merged, can you cut a new release of the plugin please?
This works:
jsdox dist/build.js --output docs
This does not (using load-grunt-config):
module.exports = {
generate: {
options: {
contentsTitle: 'Build Documentation'
},
src: [
'dist/build.js'
],
destination: 'docs'
}
};
output in command line:
$ grunt
Running "jshint:grunt" (jshint) task
✔ No problems
Running "jshint:gruntfile" (jshint) task
✔ No problems
Running "jshint:test" (jshint) task
✔ No problems
Running "jshint:src" (jshint) task
✔ No problems
Running "concat:dist" (concat) task
File dist/build.js created.
Running "jsdox:generate" (jsdox) task
No warning message, it just bails. Later tasks are abandoned.
Love the generator, has a lot of promise, but some parts of it are a real mystery for me.
I'm generating our api with the intent of loading it in source control (in our case GitLab). I have pointed to a templatesDir and that appears to work for customizing the appearance of a class, but for the life of my I cannot effect what is rendered in the contentsFile.
The paths are all wrong. As I build this on a windows machine, it uses backslashes in the paths, which means it all fails when I upload it to GitLab, users can browse to the contentsFile but all links within it, are with backslashes not forward slashes so it fails.
I used string-replace to get round this but the paths start with / and in order to get it to work correctly so all paths are relative to the contentFile, I need it to start with ./
Any help on this would be really great.
I get an error with the following config
Config:
module.exports = function(grunt) {
grunt.initConfig({
jsdox: {
generate: {
options: {
contentsTitle: 'Project Source Documentation'
//contentsEnabled: true
},
src: ['assets/**/*.js'],//'!*.min.js', '!*.min.js.gzip', '!*.min.js.map'
dest: 'docs'
}
}
});
// Load the tasks
grunt.loadNpmTasks('grunt-jsdox');
// Define the base path
grunt.file.setBase('../Project/');
// Register Tasks
grunt.registerTask('default', 'jsdox:generate');
};
Error:
Fatal Error: Unexpected end of input
The files im testing on are pretty standard, Angular, jQuery etc.
Is there anything I can do to get some more debug information?
Hey, running your example task throws "Warning: Cannot read property 'recursive' of undefined Use --force to continue.". Unfortunately: every run results in this error.
Running "example" task
[D] Task source: node_modules/grunt-jsdox/Gruntfile.js
Running "jsdox:generate" (jsdox) task
[D] Task source: tasks/jsdox.js
Verifying property jsdox.generate exists in config...OK
Files: example/code/folder1/moduleA.js, example/code/folder1/moduleB.js, example/code/folder1/moduleC.js, example/code/folder2/moduleA.js, example/code/folder2/moduleB.js, example/code/folder2/moduleC.js, example/code/folder2/subfolder1/moduleA.js, example/code/folder2/subfolder1/moduleB.js, example/code/folder2/subfolder1/moduleC.js, example/code/moduleA.js, example/code/moduleB.js, example/code/moduleC.js -> example/docs
Options: contentsEnabled, contentsFile="readme.md", contentsTitle="Example Documentation", templateDir=null, pathFilter={}
Warning: Cannot read property 'recursive' of undefined Use --force to continue.
Depends on issue for bumping jsdox version.
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.