简体   繁体   中英

Using gulp to copy, minify then concat and minify

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?

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)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM