How to use the gulp-prompt.confirm function in gulp-prompt

To help you get started, we’ve selected a few gulp-prompt examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ikari-pl / gulp-tag-version / gulpfile.js View on Github external
function inc(importance, cake_mustnt_be_a_lie) {
    var process = gulp.src(paths.versionToBump) // get all the files to bump version in
    	.pipe(prompt.confirm('Have you commited all the changes to be included by this version?'));
    if (cake_mustnt_be_a_lie === true) {
        /* never ever do a big release without proper celebration, it's a company Hoshin thing */
        process.pipe(prompt.confirm('Has cake been served to celebrate the release?'));
    }
    process.pipe(bump({type: importance})) // bump the version number in those files
        .pipe(gulp.dest(paths.dest))  // save it back to filesystem
        .pipe(git.commit('bumps package version')) // commit the changed version number
        .pipe(filter(paths.versionToCheck)) // read only one file to get the version number
        .pipe(tag_version()) // tag it in the repository 
        //.pipe(git.push('origin', 'master', { args: '--tags' })) // push the tags to master
}
github The-Politico / generator-politico-interactives / generators / gulp-common / templates / gulp / tasks / aws.js View on Github external
indexRootPath: true,
  };

  return gulp.src('./dist/**/*')
    .pipe(gulpIf(() => {
      // As a dumb check against syncing the entire bucket
      // we check to make sure you're putting your project at
      // least 2 directories deep.
      const depth = awsDirectory.replace(/\/$/, '').split('/').length;
      return depth < 2;
    }, fail(`Can't publish to ${awsDirectory}. Check meta.json and your publishPath setting.`)))
    .on('end', () => {
      gutil.log(
        gutil.colors.cyan(`You're about to publish this project to AWS under directory ${gutil.colors.bold.black.bgYellow(awsDirectory)}. This will sync this directory with your local dist folder and may cause files to be deleted.`));
    })
    .pipe(prompt.confirm('Are you sure?'))
    .pipe(rename((pubPath) => {
      // eslint-disable-next-line no-param-reassign
      pubPath.dirname = path.join(awsDirectory, pubPath.dirname.replace('.\\', ''));
    }))
    .pipe(revAll.revision({
      dontRenameFile: versionIgnore,
      dontUpdateReference: versionIgnore,
    }))
    .pipe(awspublish.gzip())
    .pipe(publisher.publish(headers, { force: false }))
    .pipe(publisher.sync(awsDirectory))
    // eslint-disable-next-line no-extra-boolean-cast
    .pipe(!!gutil.env.invalidate ? invalidate(cloudFrontConfig) : gutil.noop())
    .pipe(publisher.cache())
    .pipe(awspublish.reporter())
    .on('end', () => {
github gridgrid / grid / gulp / tasks / release.js View on Github external
gulp.task('confirmAndBump', function () {
    var process = gulp.src(config.paths.package) // get all the files to bump version in
        .pipe(prompt.confirm({
            message: 'Have you commited all the changes to be included by this version?',
            default: true
        }));
    if (cake_mustnt_be_a_lie === true) {
        /* never ever do a big release without proper celebration, it's a company Hoshin thing */
        process.pipe(prompt.confirm('Has cake been served to celebrate the release?'));
    }

    process.pipe(bump({type: importance})) // bump the version number in those files
        .pipe(gulp.dest('./'));  // save it back to filesystem
    return process;
});
github goalgorilla / open_social / themes / socialold / gulpfile.js View on Github external
if (argv.production) {
    rsyncConf.hostname = deploy.hostname; // hostname
    rsyncConf.username = deploy.username; // ssh username
    rsyncConf.destination = deploy.destination; // path where uploaded files go
    rsyncConf.root = 'dist/';
  // Missing/Invalid Target
  } else {
    throwError('deploy', gutil.colors.red('Missing or invalid target'));
  }

  // Use gulp-rsync to sync the files
  return gulp.src(config.dist + '/**/*')
  .pipe(gulpif(
      argv.production,
      prompt.confirm({
        message: 'Heads Up! Are you SURE you want to push to PRODUCTION?',
        default: false
      })
  ))
  .pipe(rsync(rsyncConf));

});
github i18next / i18next / gulpfile.js View on Github external
// **tag it in the repository**
    .pipe(tag_version({prefix: ''}))

    // push tag
    .pipe(prompt.confirm({
        message: 'Push tag ' + version + ' to github?',
        default: false
    }))
    .pipe(cb(function() {
      git.push('origin','master', {args: ' --tags  --force'}, function (err) {
        if (err) throw err;
      });
    }))

    // npm publish
    .pipe(prompt.confirm({
        message: 'publish ' + version + ' to npm?',
        default: false
    }))
    .pipe(shell([
      'npm publish --tag ' + (tag ? tag : 'latest')
    ]));
}
github i18next / i18next-sprintf-postProcessor / gulpfile.js View on Github external
// **tag it in the repository**
    .pipe(tag_version({prefix: ''}))

    // push tag
    .pipe(prompt.confirm({
        message: 'Push tag ' + version + ' to github?',
        default: false
    }))
    .pipe(cb(function() {
      git.push('origin','master', {args: ' --tags'}, function (err) {
        if (err) throw err;
      });
    }))

    // npm publish
    .pipe(prompt.confirm({
        message: 'publish ' + version + ' to npm?',
        default: false
    }))
    .pipe(shell([
      'npm publish --tag ' + (tag ? tag : 'latest')
    ]));
}
github i18next / i18next-express-middleware / gulpfile.js View on Github external
// **tag it in the repository**
    .pipe(tag_version({prefix: ''}))

    // push tag
    .pipe(prompt.confirm({
        message: 'Push tag ' + version + ' to github?',
        default: false
    }))
    .pipe(cb(function() {
      git.push('origin','master', {args: ' --tags'}, function (err) {
        if (err) throw err;
      });
    }))

    // npm publish
    .pipe(prompt.confirm({
        message: 'publish ' + version + ' to npm?',
        default: false
    }))
    .pipe(shell([
      'npm publish --tag ' + (tag ? tag : 'latest')
    ]));
}
github i18next / i18next-node-fs-backend / gulpfile.js View on Github external
// **tag it in the repository**
    .pipe(tag_version({prefix: ''}))

    // push tag
    .pipe(prompt.confirm({
        message: 'Push tag ' + version + ' to github?',
        default: false
    }))
    .pipe(cb(function() {
      git.push('origin','master', {args: ' --tags'}, function (err) {
        if (err) throw err;
      });
    }))

    // npm publish
    .pipe(prompt.confirm({
        message: 'publish ' + version + ' to npm?',
        default: false
    }))
    .pipe(shell([
      'npm publish --tag ' + (tag ? tag : 'latest')
    ]));
}
github Availity / availity-toolkit / workflow / gulp / tasks / deploy.js View on Github external
gulp.task('deploy', function() {
  gulp.src(config.deploy.src + '/**/*')
    .pipe(prompt.confirm({
      message: 'Are you sure you want to replace the contents of ' + config.deploy.dest +
      ' with the current contents of ' + config.deploy.src + '?',
      default: false
    }))
    .pipe(gulp.dest(config.deploy.dest));
});
github iVis-at-Bilkent / cytoscape.js-graphml / gulpfile.js View on Github external
gulp.task('confver', ['version'], function(){
  return gulp.src('.')
    .pipe( prompt.confirm({ message: 'Are you sure version `' + version + '` is OK to publish?' }) )
  ;
});

gulp-prompt

Add interactive console prompts to gulp

MIT
Latest version published 6 years ago

Package Health Score

45 / 100
Full package analysis

Popular gulp-prompt functions