Using Elixir with Gulp
I saw a tutorial on how to use gulp with elixir. The tutorial illustrated to manually enter the paths of the css and js to compile as follows.
elixir(function(mix) {
mix.sass('app.scss')
.styles([
'vendor/bootstrap.min.css',
'vendor/font-awesome.min.css',
'vendor/simple-line-icons.css'
], './public/css/lib.css')
});
I have bought a bootstrap template that provides a gulp file and the assets but not sure how to use it. Below is the partial code of provided by the template.
var gulp = require('gulp'), // Gulp
sass = require('gulp-sass'), // SASS,
changed = require('gulp-changed'),
autoprefixer = require('gulp-autoprefixer'); // Add the desired vendor prefixes and remove unnecessary in SASS-files
//
// SASS
//
gulp.task('sass', function() {
return gulp.src('./html/assets/include/scss/*/.scss')
.pipe(changed('./html/assets/css/'))
.pipe(sass({outputStyle:'expanded'}))
.pipe(autoprefixer(['last 3 versions', '> 1%'], { cascade: true }))
.pipe(gulp.dest('./html/assets/css/'))
});
//
// Watch
//
gulp.task('watch', function() {
gulp.watch('./html/assets/include/scss/*/.scss', ['sass']);
});
//
// Default
//
gulp.task('default', ['watch', 'sass']);
I'm trying to figure out how to use both so that the files created are integrated with exilir for proper folder structure etc. I tried putting the template code within the elixir function but no luck.
Please or to participate in this conversation.