In this exercise, Kent walks through how to create a validate script to automatically run the test and linting scripts for the project. The code for this exercise is on the FEM/06.0-validate branch.
(oriental music)…- What're we're going to do now, we're first going…to create what's called a validate script.…So we have two things that we want to have run,…we want to run both tests and linting…and that like validates that our project is good to go.…So this is something that's really good to have just…in general for receiving contributions is you like you say…hey, go clone this repo like make a fork of it,…then clone your fork, then install all the dependencies…and then run npm-run-validate.…
And that will run like the tests and the linting…and whatever like we're going to add…the build to it eventually.…That way it's really easy for people to know…before they start contributing whether they have…their environment set up properly.…It's the same concept behind that…set up script that I gave to you.…So, yeah, let's go ahead and do that.…Just like kind of the naive approach this would be just…to add in your package.json, in your scripts a validate,…spelled correctly, validate script…that runs npm run lint and npm run test.…
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.