How do you use a build system like gulp.js with dependency managers like bower

After years of being poor - mediocre PHP developer, I decided to up my game and learn a little more about modern workflows and best practice for developing web apps.

I've studied up on task runners, dependency managers, git, and cloud servers. I'm working on a PC predominantly and I've decided to settle with

  • PHP and Bootstrap 3 for front end work
  • MYSQL (NoSQL seemed like overkill for what I need)
  • AppFog for cloud hosting with git for repository control
  • gulp.js for task automation - it seemed far simpler than grunt for PHP projects
  • either bower or composer for dependency management (still can't decide)

I used some of the answers on here to work out how to change the location bower, for example, places the files it downloads but I'm struggling to understand what the best practice is when you use a dependency manager (that seems to download a whole git repo) and a task runner.

For example I can tell bower to download jquery or bootstrap into the src/vendor folder but what gets downloaded is a mix of javascript, css and other files. I could leave them there and reference them in my code but then running a gulp process would involve cherry picking individual files and minimizing or concatenating one by one, avoiding all the other stuff in the folder that I don't need.

Is this best practice for handling this or am I in the wrong ball park. Should I even be using a task runner with a dependency manager?


Look at globbing in Gulp. You should be able to pick out your CSS and JS by using gulp.src('src/vendor/**/*.css') and gulp.src('src/vendor/**/*.js') respectively.

Alternatively, a quick search of NPM returns this which could be of some use:

Need Your Help

Client Browser to change Server side file system/change the source code

javascript php jquery html ajax

Is there a way that an action initiated by a user, on a client Browser( like clicking a button), can change characteristics of the page loaded by other clients.

How to make sizeToFit ignore width?

iphone objective-c ios

I am using sizeToFit in a piece of code where I want it to ignore the width but just "size to fit" based on height. Is that possible?

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.