jsboot / gulp-docco Goto Github PK
View Code? Open in Web Editor NEWDocco plugin for gulp
License: MIT License
Docco plugin for gulp
License: MIT License
The docco.css permissions need to be world readable:
-rw-r----- 1 Home staff 9.6K Jul 9 21:26 docco.css
I am getting this error when running the gulp docco. I have lifted the version of through2 locally, which worked.
Can you update the dependencies?
Error: Cannot find module 'through2'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at /Users/rob/Repos/thestack/node_modules/gulp-docco/index.js:4:18
at Object.<anonymous> (/Users/rob/Repos/thestack/node_modules/gulp-docco/index.js:122:2)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (/Users/rob/Repos/thestack/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/Users/rob/Repos/thestack/Gulpfile.coffee:25:9)
at Object.<anonymous> (/Users/rob/Repos/thestack/Gulpfile.coffee:1:1)
at Module._compile (module.js:456:26)
at Object.loadFile (/Users/rob/Repos/thestack/node_modules/coffee-script/lib/coffee-script/register.js:16:19)
at Module.load (/Users/rob/Repos/thestack/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/Users/rob/Repos/thestack/Gulpfile.js:4:1)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Liftoff.handleArguments (/usr/local/lib/node_modules/gulp/bin/gulp.js:116:3)
at Liftoff.<anonymous> (/usr/local/lib/node_modules/gulp/node_modules/liftoff/index.js:159:12)
at module.exports (/usr/local/lib/node_modules/gulp/node_modules/liftoff/node_modules/flagged-respawn/index.js:17:3)
at Liftoff.launch (/usr/local/lib/node_modules/gulp/node_modules/liftoff/index.js:152:5)
at Object.<anonymous> (/usr/local/lib/node_modules/gulp/bin/gulp.js:67:5)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:906:3
My installation on Windows using npm required the following additional dependencies, all used from vinyl-fs:
Below is my docco task:
gulp.task('docco', function() {
gulp.src(['index.js'])
.pipe(tasks.docco({
css: 'docco-custom.css',
template: 'docco-custom.jst'
}))
.pipe(gulp.dest('./'));
});
Without the template
property, everything works as expected. But with the template specified, the gulp task errors:
/Users/cmalven/Dropbox/Desktime/Desktime - Space Agreement/desktime-space-agreement/node_modules/gulp-docco/lib/backend.js:48
var html = config.template({
^
TypeError: Property 'template' of object #<Object> is not a function
at process (/Users/cmalven/Dropbox/Desktime/Desktime - Space Agreement/desktime-space-agreement/node_modules/gulp-docco/lib/backend.js:48:25)
at Transform.<anonymous> (/Users/cmalven/Dropbox/Desktime/Desktime - Space Agreement/desktime-space-agreement/node_modules/gulp-docco/index.js:70:14)
at Transform.<anonymous> (/Users/cmalven/Dropbox/Desktime/Desktime - Space Agreement/desktime-space-agreement/node_modules/gulp-docco/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:130:12)
at Transform.g (events.js:180:16)
at Transform.EventEmitter.emit (events.js:92:17)
at finishMaybe (/Users/cmalven/Dropbox/Desktime/Desktime - Space Agreement/desktime-space-agreement/node_modules/gulp-docco/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:363:12)
at endWritable (/Users/cmalven/Dropbox/Desktime/Desktime - Space Agreement/desktime-space-agreement/node_modules/gulp-docco/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:370:3)
at Transform.Writable.end (/Users/cmalven/Dropbox/Desktime/Desktime - Space Agreement/desktime-space-agreement/node_modules/gulp-docco/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:348:5)
at Stream.onend (stream.js:79:10)
at Stream.EventEmitter.emit (events.js:117:20)
Both css and jst files are in the same directly as the gulp file, and the custom css works perfectly. Any ideas?
How come it has its own support of type of language?
I have a task called "docs" that looks like this:
gulp.task('docs', function() {
return gulp.src('src/*')
.pipe(docco())
.pipe(gulp.dest('docs'))
});
It never "finishes". It shows:
$ gulp docs
[23:26:51] Using gulpfile ~/test/gulpfile.js
[23:26:51] Starting 'docs'...
$
It SHOULD show:
$ gulp docs
[23:27:07] Using gulpfile ~/test/gulpfile.js
[23:27:07] Starting 'docs'...
[23:27:07] Finished 'docs' after 22 ms
$
I'm not sure if this is because it doesn't provide an appropriate stream or what. It breaks other tasks by never getting to them when serializing them with docs as a dependency.
if the following gulp configuration is used:
gulp.src("./src/**/*.coffee")
.pipe(docco())
.pipe(gulp.dest('./docs'));
The docco.css file is output to docs and the HTML files are output to a directory structure that is mirroring the src one. For example if a coffee file is in src/core/test.coffee the resulting HTML file would be in docs/core/test.html.
Inside that HTML file the CSS link to docco.css is assuming that a docco.css file exists in the current directory.
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.