Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function commitFiles() {
// commit files
console.log('Committing files', commitArgs);
gulp.src('**/*', gitOptions)
.pipe(git.add(gitOptions))
.pipe(git.commit(commitMessage, { args: commitArgs, cwd: outputDirectory }))
.on('error', function(error) {
console.log('Nothing new to commit');
stepRepo();
})
.on('finish', function(callback) {
pullFiles();
})
;
}
function pullFiles() {
function commitFiles() {
// commit files
console.log('Committing files', commitArgs);
gulp.src('**/*', gitOptions)
.pipe(git.add(gitOptions))
.pipe(git.commit(commitMessage, { args: commitArgs, cwd: outputDirectory }))
.on('error', function(error) {
console.log('Nothing new to commit');
stepRepo();
})
.on('finish', function(callback) {
pullFiles();
})
;
}
function pullFiles() {
/*--------------
Exit Conditions
---------------*/
// if config exists and user specifies not to proceed
if(answers.overwrite !== undefined && answers.overwrite == 'no') {
return;
}
console.clear();
if(install.shouldAutoInstall()) {
console.log('Auto-Installing (Without User Interaction)');
}
else {
console.log('Installing');
}
console.log('------------------------------');
/*--------------
Paths
---------------*/
var
installPaths = {
config : files.config,
configFolder : folders.config,
site : answers.site || folders.site,
themeConfig : files.themeConfig,
themeConfigFolder : folders.themeConfig
}
;
json = {
paths: {
source: {},
output: {}
}
}
;
// exit if config exists and user specifies no overwrite
if(answers.overwrite !== undefined && answers.overwrite == 'no') {
return;
}
console.clear();
console.log('Installing');
console.log('------------------------------');
// create site files
if(siteExists) {
console.info('Site folder exists, merging files (no overwrite)', siteDestination);
}
else {
console.info('Creating site theme folder', siteDestination);
}
// copy recursively without overwrite
wrench.copyDirSyncRecursive(config.templates.site, siteDestination, settings.wrench.recursive);
// adjust less variable for site folder location
console.info('Adjusting @siteFolder', sitePathReplace);
if(themeConfigExists) {
gulp.src(config.files.site)
.pipe(plumber())
errorHandler: function(error) {
if(error.filename.match(/theme.less/)) {
console.error('Looks like your theme.config is out of date. You will need to add new elements from theme.config.example');
}
else {
console.log(error);
this.emit('end');
}
}
}
function tagFiles() {
console.log('Tagging new version ', version);
git.tag(version, 'Updated version from semantic-ui (automatic)', function (err) {
pushFiles();
});
}
function pushFiles() {
.on('error', function(error) {
console.log('Nothing new to merge', error);
})
.on('finish', function(callback) {
.on('error', function(error) {
console.log('Nothing new to merge', error);
})
.on('finish', function(callback) {