Andi Giga
Andi Giga

Reputation: 4162

Deploy a Yeoman Application With Gulp

Generator: https://github.com/Swiip/generator-gulp-angular

On my recent projects I just pushed everything with git even the minified versions. But the dist/ folder is on the gitignore.

I read you shouldn't store minified etc. versions anyways in your git, because you don't need version tracking there.

This gulp plugin uses git: http://yeoman.io/learning/deployment.html

1) So do I push it via git and then build it again on my server with gulp build?

2) What is a good way to automate it? I would like to do s.th. like this:

gulp serve:dist Serve it on my localhost gulp serve:server Push it to my server delete old version and build the new version there

Upvotes: 0

Views: 750

Answers (1)

Preview
Preview

Reputation: 35806

No. What you should do is work locally with all your project and when you have to deploy the minified file, only run gulp build. The dist directory will be created and the only thing you have to do is to initialize git in here with git init and then add your server as remote.

You only have to re-run the build and push the content of your dist when you want to update it.

I don't think a simple thing as this is worth to optimize.

Upvotes: 1

Related Questions