Skip to content

Conversation

egeloen
Copy link

@egeloen egeloen commented Jan 21, 2016

This PR removes Assetic in favor of Gulp. As you can see, this approach allows us to remove lot of codes and make the assets management much more easier.

]
};

gulp.task('js', function () {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can have one file per task it's more readable thanks to wrench

var gulp = require('gulp');
var wrench = require('wrench');

/**
 *  This will load all js or coffee files in the gulp directory
 *  in order to load all gulp tasks
 */
wrench.readdirSyncRecursive('./gulp').filter(function(file) {
  return (/\.(js|coffee)$/i).test(file);
}).map(function(file) {
  require('./gulp/' + file);
});

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for the feedback. I was not aware of this gulp module but as the current script is pretty light and the tasks are too, I would prefer keep everything in a single file and if tomorrow, it becomes too fat, I will split them using wrench.

egeloen pushed a commit that referenced this pull request Jan 21, 2016
Remove Assetic in favor of Gulp
@egeloen egeloen merged commit 6fd756f into master Jan 21, 2016
@egeloen egeloen deleted the gulp branch January 21, 2016 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants