How to use node/grunt on a project with distributed users?

Best practice recommendations please:

So, I’m working on a website and I want to use a Javascript task runner such as grunt/gulp to automate parts of the build process (minify css/js, autoprefixer, compress images, sass to css etc…).
This is relatively easy on my own pc. Install node.js. Install grunt/gulp. Set up the config. Run.

My issue is that I’m not the only one who might be working on the site.
Right now, everyone has a local copy of the site on their pc which they can work on, and then synchronize to the remote web server.
But it seems that once grunt gets involved then that runs the risk of getting out of sync.
I can have my working files in an APP directory, and then complile them to a DIST directory, and this can be synchronized to the web server. But if someone else makes changes to the web site, they’ll get synchronized to my DIST directory, but not back-synced to my APP directory, right? Any changes I then make (in APP) will then get sent to DIST and overwrite changes by other users.

I guess we could share the entire project (APP and DIST) via something like dropbox, and all work on the APP directory. There might still be issues with the task runner running on two pcs simultaneously. It would also mean every user would need node and grunt.

Or is there a way to manage things like this using git or some other form of version control?

Given the recent popularity of things like grunt, I can’t be the only one facing the issue of using it on a project that others might also modify. Anyone have any ideas on the best way to handle it?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.