Comments (17)
@mmoss Thanks question!
I welcome pull-request that is ignore ES6+ features 😄
However, Espree does not seem to support ES6+.
So, this work is hard for me 😓
And, for now, I am not going to merge opt-into ES6+ feature pull request. Sorry.
from esdoc.
Actually, espree supports ES7 Rest/Spread Properties (stage 1) experimentally.
But currently espree seems to have no plan to support more. 😢
from esdoc.
@mysticatea oh...
ES7 support is very hard for everyone.
(Babel and @sebmck is special!)
from esdoc.
I'll take a stab at adding the ability to ignore ES7 features (at least decorators), or at the very least try and figure out a way to output a warning if a file is ignored due to ES7 syntax preventing parsing.
from esdoc.
FWIW, babel-eslint is essentially an Esprima-/Espree-compatible parser that uses Babel under the covers, but returns an Espree-like AST. (its intent is only to support ESLint, but I suspect it might be generally useful as a mostly-Esprima-compatible parser)
One option: provide a setting to configure an alternate parser (like ESLint does) and let users attempt to use ES7+ features at their own peril. You can then continue to default to (and only officially support) Espree, but users/potential committers can play around on the bleeding edge.
Pending your tolerance for non-ESTree/SpiderMonkey node types (things like ExportNamespaceSpecifier
from Lee Byron's import/export symmetry proposal: export * as ns from 'module'
), it may be as simple as dropping in the parser
config option.
from esdoc.
@mmoss @benmosher Thanks 😄
I am considering plugin feature #27 . The plugin provides onHandleCodeParser
to use own JavaScript parser. The parser must be compatible with Espree.
exports.onHandleCodeParser = function(event) {
var code = event.code;
var ast = yourParser.parse(code);
event.ast = ast;
}
And, with this feature, it becomes possible with TypeScript and other transpile language not only ES7.
from esdoc.
i tried to use esdoc, but it fails on files with es7 syntax (i am using async/await + decorators + property initializers), so i was forced to switch on yuidoc. It will be nice to see possibility to use another js parsers, such babel.
from esdoc.
@PinkaminaDianePie Thanks for comment! I will try to provide the plugin feature 🚀
from esdoc.
@h13i32maru let me know if I can help out in any way 😄
from esdoc.
@mmoss Thank you!
from esdoc.
@mmoss @benmosher @PinkaminaDianePie @mysticatea Hi!
I published ESDoc ES7 Plugin 😄
This plugin enables to generate documentation from source code including ES7.
You can use this plugin with [email protected]
from esdoc.
@h13i32maru, cool, thx! Ill try it tomorrow, i hope ill move out from yui. One more question: esdoc supports markdown? Or maybe custom templates, where i can switch from html to markdown? its usefull feature for easier integration to github-pages site, created from markdown via jekyll. I can use same styles for manual docs and for auto-generated.
from esdoc.
@PinkaminaDianePie ESDoc does not support markdown documentation. However, you can perhaps generate it by using plugin feature. But I think that it is very hard work...
On the other hand, I have been developing ESDoc Hosting Service.
In there, you can generate your documentation and host it. Please try it if it is good for you 😄
from esdoc.
I was tried to use esdoc with es7 plugin, but it does not help T_T I thought what only es7 features will be ignored or maybe async functions will be parsed like es5 functions but... any code uses es7 will be ignored, so if i use async function in my class - entire class will be ignored. So almost nothing was generated. Sad. And some code still crushes esdoc, i dont know exacly where
from esdoc.
@PinkaminaDianePie The plugin requires ESDoc version 0.2.1. Do you use the version?
If it is ok, please tell me your code or repository url.
The plugin supports async/await of ES7 following code.
export class ES7AsyncFunctions {
async method(){
await Promise.revole(1);
}
}
from esdoc.
@h13i32maru, oh, im sorry, thx for answer! There was something with my global modules, even after install v0.1.2 was used. For now everything is ok. Ok, ill see what can i use for my docs, maybve it will be better than yui
from esdoc.
from esdoc.
Related Issues (20)
- @returns v.s @return - ambiguity causes inconsistency HOT 3
- Bug: Magically infer the return data type of a function is not working correctly.
- Make esdoc responsive on mobile
- Defining Identifies
- Outdated website / docs HOT 4
- Project Dead? HOT 18
- Add support for asciidoc manuals
- rewrite links: .md -> .html
- Table of Contents rendering with display: none
- import.meta.url will throw an error
- Linked markdown files in README don't get HTMLized, so get lost in documentation
- Cannot read property 'program' of undefined HOT 1
- @type description after dot is ignored/removed in docs
- please consider supporting the @readonly tag
- How to disable doc for just a line
- runtime error
- Can't parse private members of classes HOT 1
- Can't parse `||=` operator. HOT 1
- Documenting events?
- Dependency ice-cap isn't maintained
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esdoc.