Skip to content

Instantly share code, notes, and snippets.

@velotiotech
Created July 14, 2020 10:24
Show Gist options
  • Save velotiotech/f7ea28602aec64ce1e6cc9b708684898 to your computer and use it in GitHub Desktop.
Save velotiotech/f7ea28602aec64ce1e6cc9b708684898 to your computer and use it in GitHub Desktop.
const fsE = require('fs-extra');
const childProcess = require('child_process');
// Remove current build
fsE.removeSync('./dist/');
// Copy front-end files
fsE.copySync('./src/public', './dist/public');
fsE.copySync('./src/views', './dist/views');
// Transpile the typescript files
childProcess.execSync('tsc --build tsconfig.prod.json');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment