Kent installs and begins configuring Babel. All the transpiled output will be placed in a dist directory. After getting some initial configuration in place, Kent demonstrates the transpiling process and talks about a few of Babel’s features.
(electronic musical sting)…- We're going to install two things, which, again,…you already have these things installed, so I'm just going to…add it to our dev dependencies here.…Babel-cli, and the version that we have, I believe,…is still the latest version, 6.11.4.…And we're also going to install the Babel preset,…preset es2015, so we get all the plugins that we need,…and 6.9.0 is the latest version.…
And then, to configure it, it's actually kind of small.…You can configure Babel a couple different ways.…You can configure it right in your package.json,…or you can add a Babel RC file in your root directory.…Because what we have is pretty small, we're just…going to stick it right in our package.json,…and it goes right on the root of your package.json,…json object.…We'll create an object called babel, with a presets array…with es2015, that references the Babel preset es2015.…
And this is where you would put other presets.…If you wanted to add plugins, you would add plugins here,…and you'd install some plugins, like module-alias,…
Note: This course was created by Frontend Masters. It was originally released on 08/09/2016. We're pleased to host this training in our library.
- Creating an open-source library
- Linting and testing
- Code coverage
- Installing and configuring Babel
- Peer dependencies
- Forking and renaming
- Continuous integration and automating releases
Skill Level Intermediate
1. Creating an Open-Source Library
2. Linting and Testing
3. Git Hooks, Babel, and Webpack
4. Continuous Integration and Automating Releases
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.