asciidoctor / gulp-asciidoctor

gulp-asciidoctor
https://www.npmjs.com/package/@asciidoctor/gulp-asciidoctor
14 stars 8 forks source link

gulpfile in documentation failing #27

Closed sanderson-sfdc closed 3 years ago

sanderson-sfdc commented 3 years ago

I'm a newbie to gulp, so this could be my issue, but when I copy the example gulpfile, changing only the paths, and run gulp --tasks I get the following error:

$ gulp --tasks
/Users/sanderson/git/mulesoft/test-pipeline/gulpfile.js:7
              .pipe(gulp.dest('targetdir'))
                                          ^

SyntaxError: missing ) after argument list
    at wrapSafe (internal/modules/cjs/loader.js:1053:16)
    at Module._compile (internal/modules/cjs/loader.js:1101:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
    at Module.load (internal/modules/cjs/loader.js:985:32)
    at Function.Module._load (internal/modules/cjs/loader.js:878:14)
    at Module.require (internal/modules/cjs/loader.js:1025:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at requireOrImport (/Users/sanderson/.nvm/versions/node/v12.18.3/lib/node_modules/gulp-cli/lib/shared/require-or-import.js:19:11)
    at execute (/Users/sanderson/.nvm/versions/node/v12.18.3/lib/node_modules/gulp-cli/lib/versioned/^4.0.0/index.js:37:3)
    at Liftoff.handleArguments (/Users/sanderson/.nvm/versions/node/v12.18.3/lib/node_modules/gulp-cli/index.js:211:24)`

If I add a closing parenthesis to the asciidoctor pipe

.pipe(asciidoctor({}))

gulp --tasks succeeds.

ggrossetie commented 3 years ago

Hello @sanderson-sfdc

No, I think you are right, we need to add a closing parenthesis on the examples. If you want to fix the documentation/code examples, I will gladly merge it 😉

Nice catch 👍

ggrossetie commented 3 years ago

Fixed in https://github.com/asciidoctor/gulp-asciidoctor/pull/28 Thanks @sanderson-sfdc 👏