Things started off slow. I dragged myself through the first page and a half of the Babel JavaScript compiler docs. It isn’t easy starting on something new that you have a bad history with. I hope I can redeem myself and conquer popular JavaScript packages with my improved comfort with the features of the language.
TLDR;
Okay, so here are the highlights of what I did:
- JavaScript -> Started reading through the Babel JavaScript Compiler Package’s documentation. I’ll be honest it’s DRY!!! I had to use my microphone recording while reading trick to stay engaged. Although it’s dry I am already overcoming some of my fears from when I first encountered the compiler. I can connect the dots in how it’s used now which makes it less scary for sure. I think my comfort with the CLI has helped with that for sure. My improved JavaScript knowledge as well.
Babel Rough Copied Notes
Basic Usage with CLI
All the Babel modules you’ll need are published as separate npm packages scoped under @babel (since version 7). This modular design allows for various tools each designed for a specific use case. Here we’ll look at @babel/core and @babel/cli.
Core Library (@babel/core)
The core functionality of Babel resides at the @babel/core module. Here’s the installation:
npm install --save-dev @babel/core
The CLI tool (@babel/cli)
@babel/cli is a tool that allows you to use babel from the terminal. Here’s the installation command and a basic usage example:
npm install --save-dev @babel/core @babel/cli
./node_modules/.bin/babel src --out-dir lib
This will parse all the JavaScript files in the src directory, apply any transformations we have told it to, and output each file to the lib directory. Since we haven’t told it to apply any transformations yet, the output code will be identical to the input (exact code styling is not preserved). We can specify what transformations we want by passing them as options.
Goal For Round 7 of the #100DaysofCode Challenge
This is my seventh round of the “#100daysofcode” challenge. I will be continuing my work from round five and round six into round seven. I am currently working through the book “Cracking the Coding Interview” by Gayle Laakmann McDowell. My goal is to become more familiar with algorithms and data structures. This goal was derived from my goal to better understand operating systems and key programs that I use in the terminal regularly e.g. Git. This goal was in turn derived from my desire to better understand the fundamental tools used for coding outside of popular GUIs. This in turn was derived from my desire to be a better back-end developer.
I have no idea if my path is correct but I am walking down this road anyways. Worst case scenario I learn a whole bunch of stuff that will help me out on my own personal projects.