0

I have a site that contains the base javascript and css for a number of other sites. Most of the sites use a javascript bundle that has everything in it, although a few of them are lightweight and only use a few of the scripts. I'm learning how to use gulp to manipulate these files and mostly understand what's going on. However, I'd like to be able to perform the following sequence and I'm not sure how.

  • Compile my coffeescript files
  • Copy the compiled files to a folder
  • Minify the copied files
  • Bundle the compiled files into one file
  • Bundle the minified files into one file

Is there any way to make this happen all within one task?

DrewB
  • 1,503
  • 1
  • 14
  • 28
  • 1
    Yes, but why put it one task? Look into the `pipe` method https://stackoverflow.com/questions/38404862/what-exactly-does-pipe-mean-in-gulp – evolutionxbox Nov 03 '17 at 13:04
  • Why all in one task? To keep from repeating code. But that may not be the best approach. I'm still trying to get my head around what gulp can do for me. – DrewB Nov 03 '17 at 18:39

1 Answers1

0

Below the list of tools how u can do it. And the important one is documentation.

In short you have to create gulp task "build",for example, which will run tasks below.

and so on)