TIL: Renaming branch in Git, VSCode sync settings, Frontend HandbookΒ 2017

Today I learned:

  • Git: Renaming current branch $ git branch -m NEW_NAME
  • VSCode: Setting Sync extension for VSCode is really handy as I regularly switch between laptop and desktop at work. This extension keep settings for VSCode on Gist and sync across all my computers.
  • PhantomJS doesn’t support Intl API and so it causes some errors running unit tests with Karma on the project I’m working on. To solve the issue, install intl module and put in polyfills.ts (for an Angular 2 project) to fix the errors.
$ yarn add intl

Then in src/polyfills.ts

import 'intl';
import 'intl/locale-data/jsonp/en.js';

The second line is required also as Intl doesn’t ship with a default locale.

  • My colleague, Mikhail Romanov, recommended our team of the Front-end Developer Handbook 2017 ebook which is a great resource for front-end devs at all level. I might need the whole year 2017 to finish everything mentioned in the book. It’s pretty massive.