import Ġio . spring . gradle . dependency management . org . codehaus . plex us . util . Os Ċ Ċ plugins Ġ{ ĊĠ Ġid (" ts . runtime ") Ċ } Ċ Ċ var Ġnpm Ġ= Ġ" npm "; Ċ if Ġ( Os . is Family ( Os . FAMILY _ WINDOWS )) Ġ{ ĊĠ Ġnpm Ġ= Ġ" npm . cmd " Ċ } Ċ Ċ task < Exec >(" npm Install ") Ġ{ ĊĠ Ġval Ġnode Modules Ġ= Ġfile ("./ node _ modules ") ĊĠ Ġif Ġ( node Modules . exists ()) Ġ{ ĊĠĠĠ Ġcommand Line ( npm , Ġ"-- version ") ĊĠ Ġ} Ġelse Ġ{ ĊĠĠĠ Ġcommand Line ( npm , Ġ" install ", Ġ"-- verbose ") ĊĠ Ġ} Ċ } Ċ Ċ task < Exec >(" npm Start ") Ġ{ ĊĠ Ġcommand Line ( npm , Ġ" run ", Ġ" dev ") ĊĊĠ Ġdepends On (" npm Install ") Ċ } Ċ Ċ task < Exec >(" npm Check ") Ġ{ ĊĠ Ġcommand Line ( npm , Ġ" run ", Ġ" lint ") ĊĠ Ġcommand Line ( npm , Ġ" run ", Ġ" test ") ĊĊĠ Ġdepends On (" npm Install ") Ċ } Ċ Ċ tasks . check Ġ{ ĊĠ Ġdepends On (" npm Check ") Ċ } Ċ