migration blocked by gulp and 'main-bower-files`
I tried using bower-away on my project (https://github.com/WikiEducationFoundation/WikiEduDashboard) but I ran into trouble with dependencies on bower.json. One of the gulp tasks for the build looks like this:
import gulp from 'gulp';
import mainBowerFiles from 'main-bower-files';
import loadPlugins from 'gulp-load-plugins';
const plugins = loadPlugins();
import config from '../config.js';
//--------------------------------------------------------
// Concatenate Bower libraries
//--------------------------------------------------------
gulp.task('bower', () => {
return gulp.src(mainBowerFiles())
.pipe(plugins.concat('vendor.js'))
.pipe(gulp.dest(`${config.outputPath}/${config.jsDirectory}`));
});
This task breaks with bower.json missing, and it doesn't play nicely with the symlinked vendor if I follow the rest of the steps but keep bower.json.
Any pointers on how to work through this?
bower.json is not missing, but .bower.json could be. might it be the issue?
The solution would be to create post-install command that creates these files, but really ideally you shoud change your gulp script so it doesn't depend on .bower.json but bower.json