I get so "in the zone" when I'm writing anything to do with ASTs these days
-
-
Replying to @_developit
So true, I spent whole weekend writing ESLint rules, this is very addictive...1 reply 0 retweets 2 likes -
Replying to @hsablonniere @_developit
I’ve been using es-module-lexer to flatten modules on the server this weekend.. haven’t had so many recursion dreams in a long while
1 reply 0 retweets 2 likes -
Replying to @lukejacksonn @hsablonniere
ahhhh man you stole my todo item hahapic.twitter.com/ejALadRomG
1 reply 0 retweets 1 like -
are you able to publish the code? I'd love to get a head start on this.
1 reply 0 retweets 1 like -
Replying to @_developit @lukejacksonn
What do you mean by "flatten modules on the server"
1 reply 0 retweets 0 likes -
Replying to @hsablonniere @lukejacksonn
take a nested module graph and collapse it into a single module. not sure if he's doing scope merging since es-module-lexer doesn't retain that info.
1 reply 0 retweets 1 like -
Replying to @_developit @hsablonniere
Hah, what a coincidence eh! But yep the idea is as Jason says.. take a request for a file, parse and fetch the dependency graph then return a single module. There is a twist though.. I’m not smart enough to AST so am not rewriting code/scopes, rather, just import paths.
1 reply 0 retweets 1 like -
Seems to be working pretty nicely now.. just tidying up the code. Will share soon!
2 replies 0 retweets 2 likes
Very interested to try this myself, too! :)
-
-
Replying to @sebinsua
So, I think I conflated too many ideas when implementing this and it’s probably all wrong.. but it works as a proof of concept and I got to learn a bunch so here is the write uphttps://github.com/lukejacksonn/blub …
2 replies 0 retweets 2 likes -
Replying to @lukejacksonn
Very cool of you to release a POC. No worries about design choices probably being wrong (etc), seeing different implementations is helpful for understanding the problem better!
1 reply 0 retweets 1 like - 4 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.