Skip to content

Commit 21b3a8c

Browse files
rootroot
authored andcommitted
c4 exercises
1 parent 2b2bf0f commit 21b3a8c

File tree

308 files changed

+52997
-37
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

308 files changed

+52997
-37
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Gulp
2+
3+
## **Summary**
4+
5+
In this exercise, you will use Gulp to automate testing with Mocha.
6+
7+
---
8+
9+
## **Resources**
10+
11+
- [Gulp Documentation](https://gulpjs.com/)
12+
13+
---
14+
15+
## **Instructions**
16+
17+
### **1. Install Gulp**
18+
19+
1. Open the terminal and follow these steps:
20+
- Install Gulp CLI globally:
21+
```
22+
npm install -g gulp-cli
23+
```
24+
- Install Gulp and Gulp Shell locally:
25+
```
26+
npm install gulp gulp-shell --save-dev
27+
```
28+
29+
### **2. Create a Gulp Task**
30+
31+
1. Create a `gulpfile.js` in your project root.
32+
2. Add the following:
33+
- Import Gulp and Gulp Shell:
34+
```
35+
const gulp = require("gulp");
36+
const shell = require("gulp-shell");
37+
```
38+
- Define a Gulp task for running tests:
39+
```
40+
gulp.task("unit test", shell.task("mocha"));
41+
```
42+
43+
### **3. Run Gulp**
44+
45+
1. In the terminal, run the following command:
46+
```
47+
gulp "unit test"
48+
```
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import gulp from "gulp";
2+
import shell from "gulp-shell";
3+
4+
gulp.task("unit test", shell.task("mocha"));
5+
6+
gulp.task("default", gulp.series("unit test"));

0 commit comments

Comments
 (0)