zivtech/bear_skin

Task 'serve' not in gulpfile.js

Opened this issue · 0 comments

I'm installing the bear skin theme and when running gulp I get an error saying "Task 'serve' is not in your gulpfile".

image

It looks like the gulp watch task calls 'serve' but 'serve' isn't being defined in the gulpfile.

`(function () {
'use strict';

var gulp = require('gulp');
var yaml = require('js-yaml');
var fs = require('fs');
var assign = require('lodash.assign');
var backstopConfig = require('./backstop.json');
var argv = require('yargs').argv;
var runSequence = require('run-sequence').use(gulp);

// read default config settings
var config = yaml.safeLoad(fs.readFileSync('default.gulpfile.yml', 'utf8'), {json: true});
try {
// override default config settings
var customConfig = yaml.safeLoad(fs.readFileSync('gulpfile.yml', 'utf8'), {json: true});
config = assign(config, customConfig);
} catch (e) {
console.log('No custom config found! Proceeding with default config only.');
}

// should we build sourcemaps? "gulp build --sourcemaps"
var buildSourceMaps = !!argv.sourcemaps;
config.buildSourceMaps = buildSourceMaps;

var gulpRequireTasks = require('gulp-require-tasks');
gulpRequireTasks({
path: process.cwd() + '/gulp-tasks',
arguments: [config]
});

var patternLabTasks = require('./gulp-tasks/patternLab.js');
patternLabTasks(gulp, config);

var backstopTasks = require('./gulp-tasks/backstop.js');
backstopTasks(gulp, config);

var renameTasks = require('./gulp-tasks/rename/rename.js');
renameTasks(gulp, config);

gulp.task('watch', ['serve', 'styles:watch', 'scripts:watch', 'pl:watch']);
gulp.task('default', ['watch']);
gulp.task('build', ['styles:build', 'pl:build', 'favicons:build', 'images:build', 'fonts:download']);
gulp.task('favicons:build', ['favicons:generate', 'favicons:inject']);
gulp.task('audit', ['audit:specificity', 'audit:pa11y', 'audit:analyze']);

}());`

It should also be noted that the bear skin gulpfile doesn't run with gulp 4.0.0+. It throws an assertion error:

`assert.js:42
throw new errors.AssertionError({
^

AssertionError [ERR_ASSERTION]: Task function must be specified
at Gulp.set [as _setTask] (/data/sites/drupal8_starter_kit/drupal/docroot/themes/contrib/bear_skin/node_modules/undertaker/lib/set-task.js:10:3)
at Gulp.task (/data/sites/drupal8_starter_kit/drupal/docroot/themes/contrib/bear_skin/node_modules/undertaker/lib/task.js:13:8)
at /data/sites/drupal8_starter_kit/drupal/docroot/themes/contrib/bear_skin/gulpfile.js:41:8
at Object. (/data/sites/drupal8_starter_kit/drupal/docroot/themes/contrib/bear_skin/gulpfile.js:47:2)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Module.require (module.js:597:17)`

It also should be noted that I had to use node v. 7.10.1 in order to get it to install properly.