Script before build

i have a code which reads a web service and updates my translations file which works fine.

currently what i do is call “node ./copy.ts” and it copies the language.json to appropriate path in the project structure. then i do ionic build. though this works fine, i know there is a way to do it automatically when ionic build is called

request the learned gentlemen to enlighten me please