As you probably know, I wrote a little book called The Babel Tutorial, but I don’t know the background, the context, the context. Let’s talk about that today:

Around the beginning of the year, I defined my dream and what I wanted to do. It was divided into several stages, but I won’t say anything too far. My dream for the last 3 years was to write a book on front-end compilation.

There are many applications of compiler technology in the front-end domain, such as Babel for JS and TS code conversion, typescript Compiler, SWC, PostCSS for CSS code conversion, ESLint for checking code, stylelint, Prettier for beautifying code, Terser for computting code, Template Compiler for Vue, Parser for GraphQL’s DSL, and so on. However, there is no book that covers compilation techniques and the implementation of these tools in an in-depth and systematic way. I’m interested in compilation technology, and I’m working on it, so I wanted to write a book on it.

Actually press editors talked, and I also passed the audit, even wrote a chapter, but I feel like I’m still not ready, in the process of of these tools have yet to have a thorough grasp of, so I say to suspend and editing, save a part of content through online brochure in the form of the try water, look at all of the contents of this aspect, degree, also on polishing content, It makes more sense to write a book later. The editor agreed. And then there’s the Babel Playbook.

In this small volume, I talked about the AST of Babel, the compilation process of these basic things, but also about THE API and plug-in as well as the application of various scenarios these specific practices, but also to achieve a simple Babel, is a relatively thorough grasp of Babel.

And it’s not just Babel. There are JS interpreters, Linter, Type Checker, all built on Babel Parser. These are not strictly Babel plugins, but they are compilation techniques, and I hope to explain as much as possible about how compilation techniques work in various applications (Linter, Type Checker, interpreters, etc.), not just Babel.

After the Babel, can we start writing a book? Not enough, because I don’t have a thorough grasp of the other techniques. Then write a book? It’s not that good. So I’m going to keep writing about it.

It will also read:

“Eslint + Prettier” also talks about principles, plugins, lots of practical examples, and a simple, hand-written version of Eslint and Prettier. Not necessarily volume source code, but I think only to achieve a simple version, to really understand them.

Typescript Source Code Hacks there are a lot of articles on Typescript usage, but there is no system that implements Typescript source code. You know that TS can do type checking, but you may not know how to implement type checking.

Postcss is the same translator as Babel, only for CSS. There is very little information on Postcss, but Postcss is one of the tools we need to work with. This small volume will also from the principle to the plug-in to a variety of actual combat cases, and finally add a handwritten PostCSS, postCSS to really speak through.

There will be v8, SWC, Terser, etc., and finally a little book called “Front End Build Secrets” to put everything together, as well as a practical case study of the “Handwritten Easy Browser” that I have now written.

I gave myself two and a half years, and then six months to write the book. I believe that these contents are laid out, explained thoroughly, then after comprehensive talk about the principle of front-end compilation, talk about the application of various scenarios will come naturally.

In fact, those who follow my official account may find that all my articles are original, not that I have to be unique or anything, but because I do this official account’s original intention is to convey some of my technical views, share some of the technical points of recent research, and also to prepare for writing a book on compilation. I always think that only can put that part of the content of the clear popular speak out, it is really understood, so write the public number for me is also a process of growth. If just reprint the article, do the activity operation, it is not the purpose of my public number. Sure, I’ll post some ads occasionally, but they’ll be technology-related.

I now have about 5000 fans on my official account, thank you for your support, I have been very satisfied, because I may post many of the content is relatively cold, such as the writing method of Eslint plug-in, the implementation principle of fix, etc., these actually most people do not need to care about. I will also write about node.js, VsCode plug-ins, front-end frameworks, technology management, cross-side, etc., but not all of them.

It’s a long process, and it takes time to get something done. If you can make it quickly and someone else can, it’s not worth much. And that’s one of the things I want to share with you, is to be long-term, to learn something thoroughly, to make it your core competence, not just a little bit of it, just to know how to use it.

In the next few years, I will write these little books one by one, and finally organize them into a book called “Front-end Compilation and Clearance Secrets”, you can witness the process.

It’s going to be hard, it’s going to be long, but it’s also going to be fun, because it’s about realizing your dreams, and you can share that.

Since the choice of the distance, they only trials and hardships.

Finally, thank you again for your support and company. I hope I can grow up with you.

I wish you a happy Mid-Autumn Festival.