Adding ES6 Support to Tests using Mocha and Babel
lessonDuration 5m 2s
By adding ES6 support to our source code, we need to add that same support to our tests so we can consume that synatx. This is quite easy with the `--compilers` flag for `Mocha`.
Browse
Find courses, lessons, articles, talks, and podcasts.
7,176 resources
Showing 6,577–6,600 · Page 275 of 299
lessonDuration 5m 2s
By adding ES6 support to our source code, we need to add that same support to our tests so we can consume that synatx. This is quite easy with the `--compilers` flag for `Mocha`.
lessonDuration 2m 28s
It's nice to know the status of a project. Adding badges to your readme gives first-timers and old-timers an at-a-glance peek into the status of your project. In this lesson, we'll add several badges using [shields.io](http://shields.io/)
lessonDuration 8m 35s
Writing the code in the next version of JavaScript can really simplify the development of a library. In this lesson, learn how to create a build which uses the BabelJS transpiler to enable you to write your code using ES6 (aka ES2015) syntax.
lessonDuration 3m 59s
Now that we're keeping track of our coverage, let's upload our reports to a third party service so we can track our stats over time. In this lesson we'll show how easy it is to upload our stats to codecov.io.
lessonDuration 2m 57s
This lesson will utilize the Istanbul tool to instrument our code for code coverage recording and reporting. We'll use this to make sure that as our library gets new features, we keep track of our coverage and can find places to improve it.
lessonDuration 3m 2s
Wouldn't it be nice if everyone ran the tests before committing code? With ghooks, you can automatically add a githook when dependencies are installed which will allow you to define common scripts to be run at various points during git actions (like committing). In this lesson, we'll add a githook for running the tests before we commit code to make sure we don't commit anything that breaks the tests.
lessonDuration 3m 24s
Now that we have code coverage being reported, let's make sure that nobody commits code which drops code coverage below our standard by adding a `check-coverage` script that utilizes istanbul's built-in `check-coverage` command.
lessonDuration 3m 49s
In this lesson, we'll add a new feature to our library and use commitizen to generate our commit message that follows the convention for semantic-release to know it needs to bump the minor version.
lessonDuration 5m 49s
There are so many repeated steps when releasing a new version of a library. The tool semantic-release automates this process by pushing off the responsibility of your releases to continuous integration. Trust us, this will change your workflow for the better.
lessonDuration 4m 47s
Because semantic-release requires a specific message format, it's easier to follow this convention using a tool called commitizen. In this lesson, we'll use it to write our first conventional commit message.
lessonDuration 3m 52s
Now that we have everything set up with semantic-release and we have a feature commit, let's push that up and watch TravisCI use semantic-release do our library release automatically.
lessonDuration 3m 1s
Now that you've got everything set up with mocha and chai, it's time to actually write tests. In this lesson you'll learn how to use `describe` and `it` to outline your tests and make sure you don't break your library in the future.
lessonDuration 2m 44s
Every dependable library needs to have tests to ensure that you don't push accidental bugs. In this lesson, see how you can set up mocha and chai to start testing your library.
lessonDuration 3m 24s
When you want to add a new feature, fix a bug, or push out a breaking API change, you need to take Semantic Versioning into account. In this lesson, learn what each number means as well as how to push out a new version of your library.
lessonDuration 2m 27s
Now that you've released your module to `npm`, it's time to learn how to associate that release with a particular commit on GitHub. In this lesson learn how to create a tag using `git tag` and then how to associate that with a release on GitHub.
lessonDuration 2m 36s
Putting your code up on GitHub is helpful, but publishing your library to npm makes it even easier for people to use your library. In this lesson, you'll learn how to publish your library and validate that it published correctly.
lessonDuration 3m 37s
Sometimes you're not quite ready to release a full on version of your open source library to npm. In this lesson, learn how to publish a beta version so people can try it out without tampering with anyone else using your library.
lessonDuration 2m 34s
Once you've written some code and you feel good about it, it's time to commit that code and push it up to your GitHub repository for storage and collaboration.
lessonDuration 4m 46s
Don't reinvent the wheel. We're creating a great library here, but we don't have to write every line of code. Learn how to depend on other libraries while creating your own in this lesson.
lessonDuration 5m 1s
In this lesson, you'll learn how to set up your machine to publish to [npm](https://www.npmjs.com/) so people can install your library. You'll configure some helpful defaults and use those to create a `package.json` file for your project using `npm init`.
lessonDuration 1m 31s
In this lesson, you'll learn how to set up a GitHub account, create a new GitHub repository, and connect your local project with that new repository so you have a place to store and collaborate on your library code.
lessonDuration 1m 35s
This is an introduction to the "How to Write a JavaScript Library" in which the scope of the series is presented. You will learn everything you need to know to create a library for JavaScript: set up the [GitHub](https://github.com) repo, publish a module to [npm](https://www.npmjs.com/), set up a test suite with code coverage reporting (using [Karma](http://karma-runner.github.io/), [Mocha](http://mochajs.org/), and [Chai](http://chaijs.com/)), add continuous integration, add ES6 (ES2015) with [Babel](http://babeljs.io/), configure [Webpack](http://webpack.github.io/), and distribute the library as a ["Universal JavaScript"](https://medium.com/@mjackson/universal-javascript-4761051b7ae9) (a.k.a. "Isomorphic JavaScript") module (consumable by both the browser and node).
lessonDuration 7m 3sFree
In this lesson we'll use PanResponder and LayoutAnimation to create a smoothly animated Swipe Panel commonly implemented in iOS and Android applications.
lessonDuration 6m
In this lesson, you will learn what an EventEmitter is and how it works. We start with a simple example creating an instance of the EventEmitter class, then expand on it by building listeners and emitting events to trigger them. You will learn how to view listeners in the global emitter object, as well as how to remove them and understand what the EventEmitter memory leak message means. We wrap everything up by examining the http server class to illustrate how node.js uses EventEmitters in many places for core features.