How to use gulp-prettier - 1 common examples

To help you get started, we’ve selected a few gulp-prettier 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 ampproject / amphtml / build-system / tasks / prettify.js View on Github external
}
      resolve();
    };

    if (argv.fix) {
      return gulp
        .src(filesToCheck)
        .pipe(prettier())
        .on('data', onData)
        .on('error', onError)
        .pipe(gulp.dest(file => file.base))
        .on('finish', onFinish);
    } else {
      return gulp
        .src(filesToCheck)
        .pipe(prettier.check())
        .on('data', onData)
        .on('error', onError)
        .on('finish', onFinish);
    }
  });
}

gulp-prettier

Format files with Prettier

MIT
Latest version published 1 year ago

Package Health Score

54 / 100
Full package analysis

Popular gulp-prettier functions