background preloader

2

Facebook Twitter

GitHub - verekia/js-stack-from-scratch: Step-by-step tutorial to build a modern JavaScript stack from scratch. #angular2 released, here's how to scaffold an app with #material2 using… The future of ES6 (Jafar Husain) - Full Stack Fest 2016. Transpiling ES6. While support for ES6 is always increasing, we can't always assume that users will be using a browser that supports all its features.

Transpiling ES6

So, in order to utilize ES6 features now and make sure we won't run into cross-browser compatibility issues, we need to transpile our code. Let's look at two possible ways we can perform the task of transpiling our code. First, we will use npm scripts and Babel. For the second, we will look at using Gulp with Babel. Babel Babel is the go-to transpiler for ES6. The presets in Babel allow you to either pick and choose the transformations that you want, or you can select the babel-preset-es2015 preset and work with all the features.

Babel CLI In order to work with the three methods that we will look at, it is important to make sure you have Node.js installed. If everything goes as planned, you should have node available to you in your terminal. . $ node -v v5.2.0 If you get a response that looks something like what you see above, you are good to go! Npm init babelrc. Maps and Sets in JavaScript ES2015. Why Use Flow? · Aria. Why I Use a JavaScript Style Guide and Why You Should Too. This article was peer reviewed by Tim Severien.

Why I Use a JavaScript Style Guide and Why You Should Too

Thanks to all of SitePoint’s peer reviewers for making SitePoint content the best it can be! Let’s take a look at JavaScript Standard Style by @feross, a JavaScript style guide that’s gaining popularity. It may help you reduce friction on teams and increase programmer happiness. It’s a set of rules to make JavaScript code more consistent and can prevent boring discussion of the merits of tabs over spaces. It’s one of many styles that you can adopt and sits in the same category as other JavaScript linters such as JSLint, JSHint and ESLint. If you’re not sure what linters are, or why you’d need one, check out our comparison of JavaScript linting tools The Importance of Style.

Common Promise Mistakes. JavaScript Promises: There and back again. Ladies and gentlemen, prepare yourself for a pivotal moment in the history of web development… [Drumroll begins] Promises have arrived natively in JavaScript! [Fireworks explode, glittery paper rains from above, the crowd goes wild] At this point you fall into one of these categories: People are cheering around you, but you're not sure what all the fuss is about. What's all the fuss about? JavaScript is single threaded, meaning that two bits of script cannot run at the same time, they have to run one after another.

Setting up an ES6 dev environment — Linting — George’s Blog. Techniques With ES6 Default Parameter Values, Spread, and Rest. Default Behavior Default parameter values let function parameters be initialized with default values when no value or undefined is passed.

Techniques With ES6 Default Parameter Values, Spread, and Rest

We can also specify a function as a default value. ES6 Arrow Functions In-Depth. ES6 JavaScript - The Basics. JSFeeds - All JavaScript News & Blogs in one place. The State of Javascript - Jack Franklin. Declaring Variables in JavaScript (ES2015) - Let, Var, and Const. Getting up to speed with Gulp - @eliostruyf. This is the next article of my getting up to speed series.

Getting up to speed with Gulp - @eliostruyf

This article is completely devoted to Gulp. In the previous article I explained Node.js and NPM, but I also mentioned Gulp a couple of time. As you get in this world of JavaScript focussed development, you will see that Gulp (or Grunt – depending on the developers' preference) often used for various kind of things. Gulp logo So what is Gulp exactly? Let and const in JavaScript ES6. Migrating to ES6 classes. Migrating to ES6 classes Last week I wrote a short post about using ES6 arrow function.

Migrating to ES6 classes

Today I would love to talk about ES6 classes, what is brings onto the table, and why you should or shouldn’t be concerned. Metaprogramming in ES6: Part 3 - Proxies. In the third and final installment of my Metaprogramming in ES6 series - remember, those posts I wrote over a year ago and promised I wouldn’t take ages to complete but did?

Metaprogramming in ES6: Part 3 - Proxies

In this last post, we’ll be looking at possibly the coolest ES6 Reflection feature: Proxies. Those of you versed in my back catalogue will have already read my last post, when we had a look at the ES6 Reflect API, and the post before where we took a look at ES6 Symbols - those of you haven’t should go ahead and get versed, the Reflect will be particularly relevant here and is required reading before we continue.

Just like the other posts, I’m going to quote a point I made in Part 1: Symbols are all about Reflection within implementation - you sprinkle them on your existing classes and objects to change the behaviour. Reflect is all about Reflection through introspection - used to discover very low level information about your code. Ok, so there’s definitely some more to it. Creating Proxies. Javascript ES6 - Object is and Object assign. ES6: Iterators and Generators. Iterators and Generators in JavaScript gives us a more expressive write expressive lazy code.

ES6: Iterators and Generators

Lazily executed code can give us a bit of a performance boost because computations can be delayed until they are needed. This allows us to create some very interesting functions that can generate an infinite amount of output. Iterable / Iterator Iterator is a pattern for Iterating over a collection. It is a widely used pattern in many Object Oriented Programming languages - implemented as Iterable in Java and IEnumerable in .NET.

The design is simple, an Iterable has a method next() that returns a Tuple containing the properties identifying whether the Iterator is done and output value. We can illustrate it’s design with two simple interfaces in a static language with Generic support. Rest Parameters and Spread Operators in JavaScript ES2015. Rest Parameters and Spread Operators in JavaScript ES2015. Why choose ES2015 modules, based on the state of the art of JavaScript modularization - JS-Republic's Blog. In this article, we will see why it is important to migrate right now to the ES2015 modules for the whole community.

Why choose ES2015 modules, based on the state of the art of JavaScript modularization - JS-Republic's Blog

State of the art To understand why it is important, we first need to describe a big picture of the actual context. The JavaScript ecosystem has so growth this last five years, that lot of developers did not notice actually there is five manners to create modules of JavaScript script or application ! The ancestral IIFE () : This approach is the oldest and the more simple way to modularize a JavaScript chunk. You can see below a basic example of how to wrap a JavaScript chunck in a IIFE : This code should not surprise you, it is a common pattern to scope variables or/and functions and the only one solution to be usable natively. So, why add a new module type ? First of all, no one of this solution is a standard, defined by the TC39 group I want to say. This standard offers a more flexible and powerful solution than the others ones.

Ultimate JavaScript Strings (18 Lessons - Whole Course) JavaScript and Functional Programming – Beth Allchurch. This is a write up of my notes (plus some further research) from Kyle Simpson's excellent class Functional-Light JavaScript (slides here) on 29 of June, 2016.

JavaScript and Functional Programming – Beth Allchurch

Object-oriented programming has long been the dominant paradigm in JavaScript. Recently, however, there has been a growing interest in functional programming. Functional programming is a style of programming that emphasises minimising the number of changes to a program’s state (known as side effects). Why object literals in JavaScript are cool. Before ECMAScript 2015 object literals (also named object initializers) in JavaScript were quite elementary.

Why object literals in JavaScript are cool

It was possible to define 2 types of properties: Sadly, the object literal possibilities match into a single example: JavaScript is a prototype based language, so everything is an object. It is a must that language to provide easy constructs when it comes to objects creation, configuration and accessing prototypes. It's a common task to define an object and setup it's prototype. ES2015 (ES6) + Typescript Tutorial - 4 - ScratchJS. ES2015 (ES6) + Typescript Tutorial - 12- Default Function Parameters. Using ESLint as an ES2015 Learning Tool. I have used various linting tools to keep code consistent across teams.

A few weeks back, I started using ESLint with my website and hobby projects. Most of the projects used plain old ES3 syntax. I expected some nagging about semicolon and curly brace placement, but, to my surprise, ESLint provided many more usage suggestions than stylistic changes to the ECMAScript. In this blog post, I'll go through ESLint's suggestions and how the result was better than the original code. Default parameters in JavaScript ES2015. ES6 Destructuring Recipes. ES6 Destructuring is awesome, but it’s not always obvious how you can use it to its most awesome extent. In this post, I’ll show you just some of the ways you can make maximum use of destructuring to make your code terser and cleaner. General Destructuring Recipes Destructure the results of promise.all Promise.all accepts an array of resolved promises, and provides the results through its then() function, also in the form of an array.

This array can be destructured, providing easy access to each resolved promise. Note: to see the results of the resolved promises, check the console log. How To Use Arguments And Parameters In ECMAScript 6. About The Author Faraz is a professional JavaScript developer who is passionate about moving the web forward and promoting patterns and ideas that will make development more … More about Faraz Kelhini … Developers are using ECMAScript 6 features more and more, and soon these features will be unavoidable.

In this tutorial, you’ll learn how ECMAScript 6 has upgraded parameter handling in JavaScript, and more. ECMAScript 6 (or ECMAScript 2015) is the newest version of the ECMAScript standard and has remarkably improved parameter handling in JavaScript. We can now use rest parameters, default values and destructuring, among other new features. ES6 Crash Course. Yes, this is another article about learning ES2015 (known as ES6). It's my journey of learning it, as well as my personal notepad for new stuff I discover along the way.

Feel free to suggest new or missing sections or contribute to this article. It's open source and on GitHub. Browser Compatibility ES6 or ES2015 how it's officially called now has been released on June 2015. Using ES6 Generators And Yield To Implement Asynchronous Workflows In JavaScript. CAUTION: This post is basically a "note to self" exploration. One of the main reasons that I wanted to read Exploring ES6 by Dr. Axel Rauschmayer was that I needed to learn more about ES6 Generators. At work, some of the engineers have been using ES6 Generators to make asynchronous code look and feel like synchronous code. Use cases for ES6 proxies. Understanding… by Nicholas C. Zakas. ES6 Template Literals: Techniques and Tools. This article is part of a web development series from Microsoft.

Thank you for supporting the partners who make SitePoint possible. JavaScript template literals, new to ES6, provide a powerful new tool for doing everything from extending strings across lines to building powerful HTML and XML generators. This article will cover the big changes that template literals bring to JavaScript, including the backtick character, expressions in templates, template functions, and building more complex XML/HTML templates. Clean Code with ES6 Default Parameters & Property Shorthands. This article was peer reviewed by Sebastian Seitz. Thanks to all of SitePoint’s peer reviewers for making SitePoint content the best it can be! Using the New ES6 Collections: Map, Set, WeakMap, WeakSet. This article is part of a web development series from Microsoft. 3 Splendid JavaScript Debugging Tips. GitHub - metagrover/ES6-for-humans: A kickstarter guide to writing ES6.

ES6 Modules Standard and Syntax - JavaScriptKC meetup recording. JavaScript bind() for Cleaner Code. GitHub - metagrover/ES6-for-humans: A kickstarter guide to writing ES6. 21 ES2015 Syntax. Writing Better JavaScript with ES6. ES6, or formally ECMAScript2015, is the latest version of JavaScript and has new major enhancements for a more expressive syntax and fixes to old bad parts of the language. In this post, I'll explore some of the new features that can help improve and simplify building complex applications in JavaScript. But first, let's look at a brief history of the language. Integration and Comparison for ES6 - Web Design Weekly. If you’re still writing JavaScript using ES5 (also known as ECMAScript 5) and desire to author in ES6 (ES2015) fear not. We’ll look over some logical ways to start using this new syntactical sugar in your own work starting immediately.

We’ll discuss and examine approaches to integrate features such as let and const plus compare var versus let and finally understand when to use the spread operator. ES5 Objects vs. ES6 Maps – The differences and similarities. Use destructuring in ES2015 and write more concise code — Beautiful JavaScript. AppendTo Web Development Training Courses for Teams. Easily one of the weirder new constructs within the new ES6 spec, the es6 generator answers a perplexing question: What would happen if you stopped a loop in the middle of its execution, went off and did something else for a while, then came back? It turns out that you can actually do quite a bit. A generator, at first blush, looks very much like a function with a loop in it: ES6 Rest Parameters - js Video Tutorial #free. In this video we're going to talk about ES6 rest parameters, verse the arguments keyword in ES5.

ES6 Iterators, RxJS, IxJS and the Async Iterators proposal. Introduction to asynchronous JavaScript. ES2015 Destructuring for Assignments. GitHub - getify/You-Dont-Know-JS: A book series on JavaScript. @YDKJS on twitter. AppendTo Web Development Training Courses for Teams. Javascript Tutorial. ECMAScript® 2016 Language Specification. JavaScript ES6. Tech Talk: Object Oriented Programming with ES6. ES6 Tagged Template Literals. GitHub - lukehoban/es6features: Overview of ECMAScript 6 features. Currying Functions in JavaScript. JavaScript Object Creation: Patterns and Best Practices. One weird trick that will change the way you code forever: JavaScript TDD. Gentle explanation of 'this' keyword in JavaScript. Memory Debugging with Web Inspector. Helping web developers with JavaScript errors. A Short History of JavaScript - Web Education Community Group.

ZEIT – Async and Await. Promises are probably older than you - Sam Saccone. Generators and Arrow (we out here tryn’ ta)- functions. Basics Of ES2015. Asynchronous ES6 With Generators: Introduction. ES6 Modules. Quick TDD setup with Node, ES6, Gulp and Mocha. Friday Code Along: ES6 Spread, .filter(), .map(), RegExp and more! Modern Javascript - May 2016 - Chad Killingsworth. Taking advantage of ES6 / ECMAScript 2015’s new features. ES6: Changes and Overview. Infinite collections with ES6 generators - Advanced Web Machinery. ES6, Babel and You: Exploring the new Javascript – The Publishing Project. Writing custom EsLint rules. JavaScript ES6 Tutorial - Part 2 (Final) Web Development Reading List #139: jQuery 3, Web Payment API, And ES6 Tricks.

Web Development Reading List #139: jQuery 3, Web Payment API, And ES6 Tricks. Setting Up JavaScript Testing Tools for ES6. About classes, inheritance and object-oriented design in TypeScript and ES6. Iterators and Generators in Javascript. ES 2015 In The Browser. Read Understanding ECMAScript 6. Setting Up JavaScript Testing Tools for ES6. 03 Javascript ES6 - Arrays and Objects (The basics) 01. Javscript ES6 - The introduction.

A JavaScript Ecosystem Overview. Setting Up JavaScript Testing Tools for ES6. ES6/ES2015 For Newbies Lesson 5: Destructuring. Javascript Es6 Intro - Technology Trends News.