Title: Method `_isNativeScriptAppRoot` always returns false if `nativescript.config.ts` is not inside app directory · Issue #22 · NativeScript/nativescript-hook · GitHub
Open Graph Title: Method `_isNativeScriptAppRoot` always returns false if `nativescript.config.ts` is not inside app directory · Issue #22 · NativeScript/nativescript-hook
X Title: Method `_isNativeScriptAppRoot` always returns false if `nativescript.config.ts` is not inside app directory · Issue #22 · NativeScript/nativescript-hook
Description: First of all, let me point out that the master branch is not up-to-date. My report refers to latest version of plugin which uses feat/ns7 branch of this repo. For few months now, NativeScript CLI has got --config parameter which allows y...
Open Graph Description: First of all, let me point out that the master branch is not up-to-date. My report refers to latest version of plugin which uses feat/ns7 branch of this repo. For few months now, NativeScript CLI h...
X Description: First of all, let me point out that the master branch is not up-to-date. My report refers to latest version of plugin which uses feat/ns7 branch of this repo. For few months now, NativeScript CLI h...
Opengraph URL: https://github.com/NativeScript/nativescript-hook/issues/22
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Method `_isNativeScriptAppRoot` always returns false if `nativescript.config.ts` is not inside app directory","articleBody":"First of all, let me point out that the `master` branch is not up-to-date. My report refers to latest version of plugin which uses `feat/ns7` branch of this repo.\r\n\r\nFor few months now, NativeScript CLI has got `--config` parameter which allows you to define a path for a custom nativescript config file.\r\nI removed old `nativescript.config.ts` and created a new one outside app root directory.\r\n\r\nUsage example:\r\n`ns build android --config=\"../../myconfig/nativescript.config.ts\"`\r\n\r\nSo far so good. On the other hand, `@nativescript/hook` plugin will decide if current directory is the app root one by checking if `nativescript.config.ts` is present. For those who use a custom file inside another directory, this will be a problem as file will be missing.\r\nAs a result, my hooks will not be generated if I don't keep an empty dummy `nativescript.config.ts` inside my app root directory just to make sure `_isNativeScriptAppRoot` returns true.\r\n\r\nThis method decides if given directory is app root directory by looking for `nativescript.config` file.\r\n```\r\nfunction _isNativeScriptAppRoot(dir) {\r\n var tsConfig = path.join(dir, 'nativescript.config.ts');\r\n var jsConfig = path.join(dir, 'nativescript.config.js');\r\n if (fs.existsSync(tsConfig) || fs.existsSync(jsConfig)) {\r\n return true;\r\n }\r\n\r\n return false;\r\n}\r\n```","author":{"url":"https://github.com/CatchABus","@type":"Person","name":"CatchABus"},"datePublished":"2021-12-25T16:14:19Z","url":"https://github.com/NativeScript/nativescript-hook/issues/22"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:65c6a669-a2e6-73bf-1fd8-381ea532a894 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D9AE:1148D3:144962B:19EC86A:6B012D2C |
| html-safe-nonce | cbab7f8e0ca97abd0aa721dae5ffa700bbe6be6080d9cd4d47ba8efe5086b79b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOUFFOjExNDhEMzoxNDQ5NjJCOjE5RUM4NkE6NkIwMTJEMkMiLCJ2aXNpdG9yX2lkIjoiMzE4NDA2MzIzOTIwMTgyODE0MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 27b21cca8bec1ded975addc75913f8146291ae83785582af31186c50087973b9 |
| hovercard-subject-tag | issue:1088623454 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/NativeScript/nativescript-hook/22/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4cbdc5992ac2771e13067b45910b297733263bf1d0b183a4e4ae5a166c37a858/NativeScript/nativescript-hook/issues/22 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4cbdc5992ac2771e13067b45910b297733263bf1d0b183a4e4ae5a166c37a858/NativeScript/nativescript-hook/issues/22 |
| og:image:alt | First of all, let me point out that the master branch is not up-to-date. My report refers to latest version of plugin which uses feat/ns7 branch of this repo. For few months now, NativeScript CLI h... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | CatchABus |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/NativeScript/nativescript-hook git https://github.com/NativeScript/nativescript-hook.git |
| octolytics-dimension-user_id | 7392261 |
| octolytics-dimension-user_login | NativeScript |
| octolytics-dimension-repository_id | 45173579 |
| octolytics-dimension-repository_nwo | NativeScript/nativescript-hook |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 45173579 |
| octolytics-dimension-repository_network_root_nwo | NativeScript/nativescript-hook |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width