Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent merge conflicts in team development #151

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prevent merge conflicts in team development
When a team works with the gulp file, the index.html gets overwritten by the wiredep task on every workstation. To avoid merge conflicts added it to the gitignore file and moved the original to a template directory. Changed the gulp and gulp config to use the template file. Tested with backend build process too
  • Loading branch information
Stwissel committed Feb 1, 2016
commit daab8563dc62aadac74f919eabcfd90d3cc98e73
3 changes: 2 additions & 1 deletion app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,9 @@ var HotTowelGenerator = generators.Base.extend({
this.directory('src/client/images');
this.directory('src/client/styles');
this.directory('src/client/test-helpers');
this.directory('src/client/template');

this.template('src/client/_index.html', 'src/client/index.html');
this.template('src/client/_index.html', 'src/client/template/index.html');

this.template('src/server/_app.js', 'src/server/app.js');
this.template('src/server/_data.js', 'src/server/data.js');
Expand Down
1 change: 1 addition & 0 deletions app/templates/_gulp.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ module.exports = function() {
htmltemplates: clientApp + '**/*.html',
images: client + 'images/**/*.*',
index: client + 'index.html',
indextemplate: client + 'template/index.html',
// app js, with no specs
js: [
clientApp + '**/*.module.js',
Expand Down
4 changes: 2 additions & 2 deletions app/templates/_gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ gulp.task('templatecache', ['clean-code'], function() {
* @return {Stream}
*/
gulp.task('wiredep', function() {
log('Wiring the bower dependencies into the html');
log('Wiring the bower dependencies from template into the html');

var wiredep = require('wiredep').stream;
var options = config.getWiredepDefaultOptions();
Expand All @@ -133,7 +133,7 @@ gulp.task('wiredep', function() {
var js = args.stubs ? [].concat(config.js, config.stubsjs) : config.js;

return gulp
.src(config.index)
.src(config.indextemplate)
.pipe(wiredep(options))
.pipe(inject(js, '', config.jsOrder))
.pipe(gulp.dest(config.client));
Expand Down
3 changes: 2 additions & 1 deletion app/templates/gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# https://docs.npmjs.com/misc/faq#should-i-check-my-node-modules-folder-into-git
node_modules/
bower_components/

# in team development this leads to merge conflicts very time
src/client/index.html
# other
.tmp