-
Notifications
You must be signed in to change notification settings - Fork 485
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support ES6 modules #112
Comments
This also does not appear to be specific to |
@benderTheCrime - Thanks for the report. Could you include the source file that causes the error above? |
Sure can, it's throwing this error in the very first file I load using ES6 module imports: |
Okay, I looked into this, and there are a couple of (deepish) issues:
@benderTheCrime For now, one non-ideal workaround might be to use the |
1 similar comment
Okay, I looked into this, and there are a couple of (deepish) issues:
@benderTheCrime For now, one non-ideal workaround might be to use the |
Let me first try the |
I don'y see any difference in the output with gulp.task('documentation', function() {
gulp.src(src)
.pipe(documentation({
format: 'html',
polyglot: true
}))
.pipe(gulp.dest('md-documentation'));
}); and I do not see documentation on passing the Is there another way to do this? |
Ah, it's I'm also going to add an issue to the gulp project to make sure that the polyglot option is available. |
|
@tmcw @benderTheCrime Yeah, I should have been clearer: the |
@benderTheCrime do you have a package.json file with transforms defined? If you've got, for instance, babelify in your project to transpile ES6 to ES5, then documentation's module-deps instance will automatically use this transform. We shouldn't need to pass any options to acorn as above - module-deps transforms abstract away from any other language like ES6 or CoffeeScript and transform before resolving dependencies. Given that not all projects that use documentation will use browserify or its "browserify" package key, this might be an area where we'll need to define transforms as passed-in options... |
I'm using a gulpfile.babel.js. This immediately loads |
On second thought, @anandthakker was totally right: we shouldn't need to babelify at that point, module-deps should permit passing options to acorn. |
@tmcw I think passing that option would still be a superficial fix, because (I'm guessing) module-deps won't resolve ES6 module deps. |
So what is the verdict here? Should I use |
@benderTheCrime Yep, I think that's the best bet in the short term. Not 100% sure on all the limitations you'll face, but one of them is that |
Upstream: browserify/module-deps#93 Re: |
Is it fixed? |
As a general rule of thumb, if the issue is open, people are still working on the problem and it is not fixed yet. |
@tmcw Is there any way I could already use this? Doesn't seem to work in 2.1.0-alpha2 |
@thealjey You could try installing straight off the github repo with |
@tmcw unfortunately this isn't really an option for me, but thanks anyway 😄 |
As soon as the 3.0.0 milestone is complete. We're moving fast, so it may be done by the end of the week. |
I am super pumped for this. What's left that is blocking |
this was confusing .. i have the same issue. Saw this as closed, but it isnt really published yet. thanks for the work though. BTW the --version command line parameter isnt really working. |
@matthiasg there isn't a --version flag. Opened #206 to add it. the 3.0.0 milestone is everything that needs to be complete before it's released. |
Ah - going to rename the existing --version flag to --project-version for clarity. |
I see in the README that ES6 code is supported, but I do no see any documentation supporting this. How would one use the
documentation
package to build documentation for an ES6 project?The text was updated successfully, but these errors were encountered: