gulpfile.ts 708 B

1234567891011121314151617181920212223242526
  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(
  14. copySchemas,
  15. copyI18nMessages,
  16. );
  17. export function watch() {
  18. const watcher1 = gulpWatch(SCHEMAS_GLOB, copySchemas);
  19. const watcher2 = gulpWatch(MESSAGES_GLOB, copyI18nMessages);
  20. return new Promise(resolve => {});
  21. }