gulpTasks-remapPaths.js 572 B

12345678910111213141516171819202122
  1. // Gulp Tools
  2. var gulp = require("gulp");
  3. var minimist = require("minimist");
  4. // Helpers
  5. var remapPaths = require("../helpers/gulp-remapPaths");
  6. // Parse Command Line.
  7. var commandLineOptions = minimist(process.argv.slice(2), {
  8. string: ["path"]
  9. });
  10. /**
  11. * This tasks remaps all the import path of a typescript project to their relative paths.
  12. */
  13. gulp.task("remapPaths", function() {
  14. const path = commandLineOptions.path;
  15. return gulp.src(path + "/**/*.ts", { base: path })
  16. .pipe(remapPaths())
  17. .pipe(gulp.dest(path));
  18. });