Question: you would make a change to the parser, babylon and you wouldn't need to make a new plugin just extend existing code?

Asked By
hzoo
Asked At
2018-02-10 20:09:26

Found 15 possible answers.

User Answered At Possible Answer
jamesdigioia 2018-02-10 20:10:23 im using the current code as a base, yeah, but this is to experiment with some ideas, so i wouldn't put it in babel until we've adopted it
hzoo 2018-02-10 20:10:30 https://github.com/babel/babel/pull/6335 you can just make a pr, and link to the repl url to share
jamesdigioia 2018-02-10 20:12:39 another flag in the plugin? we've got 2 proposals we're playing with, so i wouldnt want to overcomplicate the one in babel
hzoo 2018-02-10 20:13:05 I wouldn't expect people to be using it, still in beta it's pretty easy to isolate in the code/tests so i'd be cool with doing that
jamesdigioia 2018-02-10 20:14:52 hmmm, interesting. that works, probably easier than setting it up in a separate repo
hzoo 2018-02-10 20:15:26 my point is that it's probably good enough to just allow people to try it in the repl
jamesdigioia 2018-02-10 20:15:49 i thought the repl could pull in 3rd-party plugins now?
hzoo 2018-02-10 20:15:50 although currently it doesn't support options we should figure out how to do that even better oh ok -yeah that link works
jamesdigioia 2018-02-10 20:16:21 altho let me look into what changes i need to make to babylon
hzoo 2018-02-10 20:16:36 yea that changes it then don't make that easy to consume
jacques.yakoub 2018-02-10 20:18:21 talking about babylon and babel 7, wonder if a fix will be created for code coverage stuff : https://github.com/istanbuljs/istanbuljs/issues/119 I wonder why my package ( https://npm.runkit.com/torrent-files-library ) cannot be runned on Runnit with Node 9 : Any ideas ?
jamesdigioia 2018-02-10 20:38:07 looks like someone started with this https://github.com/babel/babel/pull/7154 nvm, this doesn't have any changes in babylon
plexigras678 2018-02-10 21:09:11 is there a more comprehensive alternative to babel-plugin-lodash out there? for now i will just alias bar with somepath i want to do import { foo } from 'bar' and have it transformed to import foo from 'somepath/foo'
gregorwbr 2018-02-11 09:33:45 Heya bableians, I'm building a code editor with the help of babylon and babel-types (which I just added after I realized I'm basically reimplementing it). I got 3 questions regarding babel-types: 3. I noticed that flow types are used, but not part of the npm published module. Is that on purpose? if not I could look into a PR fixing that. 2. And adding onto that, could it also tell me which are subtypes of a type? E.g. subtypesOf(Statement) == [IfStatement, ExpressionStatement,...] 1. Can it tell me which node type is expected for which field? E.g. typeOf(Program.body) == [Statement, ModuleDeclaration] .
nveenjain 2018-02-11 13:34:55 Hey there, Gregor, all the types supported by babel-types are listed here :- https://github.com/babel/babel/blob/master/packages/babel-types/README.md I guess for point 2, you'll need to look for aliases in the file.. which gives information about superType of a type.. In the link mentioned, you'll find all the types, what properties they require to be created, or what properties are not required, how to test whether given node is of one type or not ( t.isType ).. I guess you mean to say alias in point 2?? as flow types are not parsed by JS engine, they are used only in development purposed which are then removed for production purposes.

Related Questions