NativeScript hooks

nativescriptrocks

#1

hi,

What are hooks in Nativescript ? Can one please share some example how to use them?

thanks
Vimal


#2

Hooks are simply JavaScript files/functions/code that fires at different points in the build or run process.

i.e.:

  1. after-prepare
  2. after-watch
  3. before-livesync
  4. before-watch
  5. before-prepare

You can look at the nativescript-dev-sass repository for an example of how that is used.