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.info('Committing ' + component + ' files', commitArgs);
gulp.src('./', gitOptions)
.pipe(git.add(gitOptions))
.pipe(git.commit(commitMessage, commitOptions))
.on('error', function(error) {
// canProceed = false; bug in git commit
})
.on('finish', function(callback) {
if(canProceed) {
pushFiles();
}
else {
console.info('Nothing new to commit');
nextRepo();
}
})
;
function commitFiles() {
// commit files
console.info('Committing ' + distribution + ' files', commitArgs);
gulp.src('./', gitOptions)
.pipe(git.add(gitOptions))
.pipe(git.commit(commitMessage, commitOptions))
.on('error', function(error) {
// canProceed = false; bug in git commit
})
.on('finish', function(callback) {
if(canProceed) {
pushFiles();
}
else {
console.info('Nothing new to commit');
nextRepo();
}
})
;
function commitFiles() {
// commit files
console.info('Committing ' + component + ' files', commitArgs);
gulp.src('./', gitOptions)
.pipe(git.add(gitOptions))
.pipe(git.commit(commitMessage, commitOptions))
.on('error', function(error) {
// canProceed = false; bug in git commit
})
.on('finish', function(callback) {
if(canProceed) {
pushFiles();
}
else {
console.info('Nothing new to commit');
nextRepo();
}
})
;
function commitFiles() {
// commit files
console.info('Committing ' + distribution + ' files', commitArgs);
gulp.src('./', gitOptions)
.pipe(git.add(gitOptions))
.pipe(git.commit(commitMessage, commitOptions))
.on('error', function(error) {
// canProceed = false; bug in git commit
})
.on('finish', function(callback) {
if(canProceed) {
pushFiles();
}
else {
console.info('Nothing new to commit');
nextRepo();
}
})
;
function commitFiles() {
// commit files
console.info('Committing ' + component + ' files', commitArgs);
gulp.src('./', gitOptions)
.pipe(git.add(gitOptions))
.pipe(git.commit(commitMessage, commitOptions))
.on('error', function(error) {
// canProceed = false; bug in git commit
})
.on('finish', function(callback) {
if(canProceed) {
pushFiles();
}
else {
console.info('Nothing new to commit');
nextRepo();
}
})
;
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() {
console.info('Creating gulpfile.js');
gulp.src(source.userGulpFile)
.pipe(plumber())
.pipe(gulp.dest(installFolder))
;
}
/*--------------
Site Theme
---------------*/
// Copy _site templates folder to destination
if( fs.existsSync(installPaths.site) ) {
console.info('Site folder exists, merging files (no overwrite)', installPaths.site);
}
else {
console.info('Creating site theme folder', installPaths.site);
}
wrench.copyDirSyncRecursive(source.site, installPaths.site, settings.wrench.merge);
/*--------------
Theme Config
---------------*/
gulp.task('create theme.config', function() {
var
// determine path to site theme folder from theme config
// force CSS path variable to use forward slashes for paths
pathToSite = path.relative(path.resolve(installPaths.themeConfigFolder), path.resolve(installPaths.site)).replace(/\\/g,'/'),
siteVariable = "@siteFolder : '" + pathToSite + "/';"
console.info('Creating gulpfile.js');
gulp.src(source.userGulpFile)
.pipe(plumber())
.pipe(gulp.dest(installFolder))
;
}
/*--------------
Site Theme
---------------*/
// Copy _site templates folder to destination
if (fs.existsSync(installPaths.site)) {
console.info('Site folder exists, merging files (no overwrite)', installPaths.site);
} else {
console.info('Creating site theme folder', installPaths.site);
}
wrench.copyDirSyncRecursive(source.site, installPaths.site, settings.wrench.merge);
/*--------------
Theme Config
---------------*/
gulp.task('create theme.config', function () {
var
// determine path to site theme folder from theme config
// force CSS path variable to use forward slashes for paths
pathToSite = path.relative(path.resolve(installPaths.themeConfigFolder), path.resolve(installPaths.site)).replace(/\\/g, '/'),
siteVariable = "@siteFolder : '" + pathToSite + "/';"
;
console.info('Creating gulpfile.js');
gulp.src(source.userGulpFile)
.pipe(plumber())
.pipe(gulp.dest(installFolder))
;
}
/*--------------
Site Theme
---------------*/
// Copy _site templates folder to destination
if( fs.existsSync(installPaths.site) ) {
console.info('Site folder exists, merging files (no overwrite)', installPaths.site);
}
else {
console.info('Creating site theme folder', installPaths.site);
}
wrench.copyDirSyncRecursive(source.site, installPaths.site, settings.wrench.merge);
/*--------------
Theme Config
---------------*/
gulp.task('create theme.config', function() {
var
// determine path to site theme folder from theme config
// force CSS path variable to use forward slashes for paths
pathToSite = path.relative(path.resolve(installPaths.themeConfigFolder), path.resolve(installPaths.site)).replace(/\\/g,'/'),
siteVariable = "@siteFolder : '" + pathToSite + "/';"