File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -51,14 +51,13 @@ function findProjectDir(pkgdir) {
5151}
5252
5353function _isNativeScriptAppRoot ( dir ) {
54- var isNativeScriptAppRoot = false ;
55- var packageJsonFile = path . join ( dir , 'package.json' ) ;
56- if ( fs . existsSync ( packageJsonFile ) ) {
57- var packageJsonContent = require ( packageJsonFile ) ;
58- isNativeScriptAppRoot = ! ! packageJsonContent . nativescript && ! ! packageJsonContent . nativescript . id ;
54+ var tsConfig = path . join ( dir , 'nativescript.config.ts' ) ;
55+ var jsConfig = path . join ( dir , 'nativescript.config.js' ) ;
56+ if ( fs . existsSync ( tsConfig ) || fs . existsSync ( jsConfig ) ) {
57+ return true ;
5958 }
6059
61- return isNativeScriptAppRoot ;
60+ return false ;
6261}
6362
6463function forEachHook ( pkgdir , callback ) {
Original file line number Diff line number Diff line change 11{
22 "name" : " @nativescript/hook" ,
3- "version" : " 1 .0.0" ,
3+ "version" : " 2 .0.0" ,
44 "description" : " Helper module for installing hooks into NativeScript projects" ,
55 "main" : " index.js" ,
66 "scripts" : {
You can’t perform that action at this time.
0 commit comments