Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
module.exports = function(options) {
// Get things from options
const {argv, distName, gulp, pathBuild, pathSrc, resourcePrefix} = options;
// Initialize global things
const {storage} = gulp;
const runSequence = require('run-sequence').use(gulp);
// Get config from liferay-theme.json
const proxyUrl = argv.url || storage.get('url');
const deploymentStrategy = storage.get('deploymentStrategy');
const dockerContainerName = storage.get('dockerContainerName');
const pluginName = storage.get('pluginName') || '';
// Calculate some values
const explodedBuildDir = path.join(process.cwd(), EXPLODED_BUILD_DIR_NAME);
const dockerThemePath = path.posix.join('/tmp', pluginName);
const dockerBundleDirPath = path.posix.join(
dockerThemePath,
EXPLODED_BUILD_DIR_NAME
);
/**
gulp.task(task.name, function(cb) {
var cwd = process.cwd();
var _args = args.slice();
_args.push(function() {
// restore current working directory (see #23)
process.chdir(cwd);
cb.apply(null, arguments);
});
runSequence.apply(null, _args);
});
};
'use strict'
const gulp = require('gulp')
const runSequence = require('run-sequence').use(gulp)
// const config = require('../config')
gulp.task('make', () => {
return runSequence(
'es5',
'es6'
)
})
const gulp = require('gulp')
const runSequence = require('run-sequence').use(gulp)
// const config = require('../config')
gulp.task('make', () => {
return runSequence(
'es5',
'es6'
)
})
'use strict'
const gulp = require('gulp')
const runSequence = require('run-sequence').use(gulp)
// const config = require('../config')
gulp.task('make', () => {
return runSequence(
'es5',
'es6'
)
})
gulp.task('all', ['clean'], function (cb) {
var tasks = Object.keys(this.tasks).filter(function (k) { return /^test\d+/.test(k) });
tasks.sort(function (a, b) { return a.match(/\d+/)[0] - b.match(/\d+/)[0] });
tasks.push(cb);
sequence.apply(null, tasks);
});
});
gulp.task('watch:kss', function() {
return gulp.watch(argv.kssSource, ['styleguide:generate']);
});
gulp.task('watch:styles', function() {
return gulp.watch(argv.styleSource, ['styleguide:applystyles']);
});
if (argv.watch) {
tasks.push('watch:styles');
tasks.push('watch:kss');
}
runSequence.apply(this, tasks);
} catch (err) {
console.error('Style guide generation failed');
logError(err);
}
};
});
gulp.task('watch:kss', function() {
return gulp.watch(argv.kssSource, ['styleguide:generate']);
});
gulp.task('watch:styles', function() {
return gulp.watch(argv.styleSource, ['styleguide:applystyles']);
});
if (argv.watch) {
tasks.push('watch:styles');
tasks.push('watch:kss');
}
runSequence.apply(this, tasks);
} catch (err) {
console.error('Style guide generation failed');
logError(err);
}
};
gulp.task('build', ['clean'], function (cb) {
var task_seq = [['style', 'image', 'html', 'script'], cb];
runSequence.apply(null, task_seq);
});
gulp.task('build', ['clean'], function (cb) {
var task_seq = [['style', 'image', 'html', 'script'], cb];
runSequence.apply(null, task_seq);
});