gulpfile.ts 668 B

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