gulpfile.ts 766 B

123456789101112131415161718192021222324
  1. import { exec } from 'child_process';
  2. import fs from 'fs-extra';
  3. import { dest, parallel, series, src, watch as gulpWatch } from 'gulp';
  4. import path from 'path';
  5. const SCHEMAS_GLOB = ['../src/**/*.graphql'];
  6. const MESSAGES_GLOB = ['../src/i18n/messages/**/*'];
  7. function copySchemas() {
  8. return src(SCHEMAS_GLOB).pipe(dest('../dist'));
  9. }
  10. function copyI18nMessages() {
  11. return src(MESSAGES_GLOB).pipe(dest('../dist/i18n/messages'));
  12. }
  13. export const build = parallel(copySchemas, copyI18nMessages);
  14. export function watch() {
  15. const watcher1 = gulpWatch(SCHEMAS_GLOB, copySchemas);
  16. const watcher2 = gulpWatch(MESSAGES_GLOB, copyI18nMessages);
  17. // eslint-disable-next-line @typescript-eslint/no-empty-function
  18. return new Promise(resolve => {});
  19. }