develop.js 718 B

12345678910111213141516171819202122
  1. const chokidar = require( 'chokidar' );
  2. const { buildJs, buildRenderer } = require( './build-script' );
  3. const { buildCss } = require( './build-css' );
  4. chokidar.watch( [ './src/js/**/*.ts', '!*.test.ts', '!./src/js/renderer/**/*.ts' ] ).on( 'change', async () => {
  5. console.log( 'Building Script...' );
  6. await buildJs()
  7. console.log( 'Finished' );
  8. } );
  9. chokidar.watch( [ './src/js/renderer/**/*.ts', '!*.test.ts' ] ).on( 'change', async () => {
  10. console.log( 'Building Renderer Script...' );
  11. await buildRenderer()
  12. console.log( 'Finished' );
  13. } );
  14. chokidar.watch( [ './src/css/**/*.scss' ] ).on( 'change', async () => {
  15. console.log( 'Building CSS...' );
  16. await buildCss()
  17. console.log( 'Finished' );
  18. } );