Gulp-101 Flashcards

1
Q

What is a gulpfile ?

A

it is the doorway to execute the task from till serving.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How can you execute the gulp file?

A

gulp [task-name]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which function defines the task?

A

gulp.task(“task-name”, function(){});

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How do you define task dependencies?

A

gulp.task(“task-name”, [“task1”], …)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Does dependency order is predictable?

A

Nope, the dependency can execute on their own

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Can we have a task without impl function?

A

Yes just to group the order

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the relevance of streams?

A

Since gulp is used to transformt the state of the src and dest files. Streams are just do that using pipe function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Show an e.g. of streams

A

gulp. task(“transform”, function(){
gulp. src(“src/”).pipe(gulp.dest(“/dest))

})

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are gulp plugins?

A

For each complex work there a plugin that gulp makes use of with the help of pipe function
gulp.task(“task”, function(){
gulp.src(“/src”).pipe(uglify())).pipe(gulp.dest(“/dest”))
)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly