const path = require('path');
const gulp = require('gulp');
const pug = require('gulp-pug');
const cities = [
{
cityName : 'city1',
},
{
cityName : 'city2',
}
];
gulp.task('views', function(done) {
cities.forEach(function(city, index, cities) {
gulp.src('template/city.pug')
.pipe(pug({
data : city
}))
.pipe(gulp.dest(path.join('..', '..', 'domains', city.cityName)));
});
done();
});