VanJS / meetup

Open source home for the VanJS Meetup 👩🏽‍💻👨🏼‍💻
https://www.meetup.com/vancouver-javascript-developers/
68 stars 3 forks source link

Talk Idea: Writing code to refactor code - a practical guide to Abstract Syntax Trees #24

Closed oliv9286 closed 5 years ago

oliv9286 commented 5 years ago

Earlier this year, we migrated almost two thousand files from CommonJS to ES modules using codemods based on Babel. Codemods are scripts that change source code by traversing and manipulating the Abstract Syntax Tree (AST) of each source file, targeting the nodes that we want to change and modifying them to our needs.

This talk is intended for JavaScript developers with all levels of experience, people attending the talk will learn:

The key takeaway is that working with the AST is easy, useful and fun!

About Me

ShMcK commented 5 years ago

Hi Olivia,

Fascinating and unique topic choice. I'd already love to learn more about how you created Babel codemods.

Would you be available to give a talk in September? Unspecified date so far.

oliv9286 commented 5 years ago

@ShMcK that'd be great! thank you so much for having me

Qard commented 5 years ago

If you're interested in a themed event, I could also do a talk on rewriting JavaScript AST with esprima, escodegen, and esquery.

I've also built some of my own little helper tools on top of those for experimenting with alternative APM instrumentation methods: ast-function-tools and node-module-compile-transform-ast

ShMcK commented 5 years ago

Sorry, have been active enough on here.

@oliv9286 would September 11th work?

@Qard maybe you could help @oliv9286 with some feedback?

oliv9286 commented 5 years ago

@ShMcK yup! thank you :)

Qard commented 5 years ago

I'm happy to review or provide feedback, if @oliv9286 wants it. :)

ShMcK commented 5 years ago

I'll put up the summary & bio on Meetup.com

@oliv9286 Please edit the following summary to your liking - especially the Bio!

1. Olivia Zhang - Writing code to refactor code - a practical guide to Abstract Syntax Trees

This talk is intended for JavaScript developers with all levels of experience, people attending the talk will learn
- What is the Abstract Syntax Tree
- How to use the AST to write Babel plugins
- How to use Babel plugins as codemods and as build-time transforms
The key takeaway is that working with the AST is easy, useful and fun!

Bio: Olivia is a frontend engineer at ZenHub.
ShMcK commented 5 years ago

Hi @oliv9286, just a follow up:

Are you ready for next week's presentation? If you'd like any early feedback, let me know.

oliv9286 commented 5 years ago

@ShMcK yes :) I might ask you for some feedback next monday

ShMcK commented 5 years ago

Sounds great, @Qard could have a chance to chime in too :)