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 If you’ve been coding for a while, you’ll no-doubt have a style that you’ve grown to like.

Each programming language has a dominant style, sometimes like in the case of Python an official style guide is presented as the correct way to author programs. 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. Required Parameters Another technique with default parameter values is to allow a function to declare required parameters. 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: So, Proxy is a new global constructor (like Date or Number) that you pass an Object, a bunch of hooks, and it spits out a new Object that wraps the old one with all these fancy hooks.

Voilà, you have a proxy! Ok, so there’s definitely some more to it. 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. 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. 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). To this end, it encourages the use of immutable data and pure (side effect-free) functions. 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. 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. Benefits of linting "Lint" may also refer to general syntactic discrepancies, especially in interpreted languages like JavaScript and Python. For a competent ES2015 developer who already knows how to use new language features, ESLint brings joy. 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. Advertisement 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. In this tutorial, we will explore arguments and parameters in detail and see how ECMAScript 6 has upgraded them. Arguments Versus Parameters Link Arguments and parameters are often referred to interchangeably. Function foo(param1, param2) { }foo(10, 20); 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. ECMAScript 6 represents the biggest change to the core of JavaScript in the history of the language. Not only does the sixth edition add new object types, but also new syntax and exciting new capabilities. The result of years of study and debate, ECMAScript 6 reached feature complete status in 2014. ES6 Template Literals: Techniques and Tools. This article is part of a web development series from Microsoft. 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. Thank you for supporting the partners who make SitePoint possible. Most major programming languages have several types of data collections. 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. 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. 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.