├── .editorconfig ├── .eslintrc.json ├── .gitignore ├── .prettierignore ├── .prettierrc ├── .vscode └── extensions.json ├── CHANGELOG.md ├── LICENSE ├── README.md ├── e2e └── nx-e2e │ ├── jest.config.js │ ├── project.json │ ├── tests │ └── nx.test.ts │ ├── tsconfig.json │ └── tsconfig.spec.json ├── jest.config.ts ├── jest.preset.js ├── migrations.json ├── nx.json ├── package.json ├── packages └── nx │ ├── .eslintrc.json │ ├── LICENSE │ ├── README.md │ ├── executors.json │ ├── generators.json │ ├── jest.config.ts │ ├── migrations.json │ ├── package.json │ ├── project.json │ ├── src │ ├── executors │ │ └── build │ │ │ ├── build.schema.json │ │ │ ├── builder.ts │ │ │ ├── clean.schema.json │ │ │ ├── debug.schema.json │ │ │ ├── executor.spec.ts │ │ │ ├── executor.ts │ │ │ ├── prepare.schema.json │ │ │ ├── run.schema.json │ │ │ └── test.schema.json │ ├── generators │ │ ├── app-resources │ │ │ ├── app-resources.ts │ │ │ ├── compat.ts │ │ │ ├── files │ │ │ │ └── __name__ │ │ │ │ │ ├── Android │ │ │ │ │ ├── app.gradle │ │ │ │ │ ├── before-plugins.gradle │ │ │ │ │ └── src │ │ │ │ │ │ └── main │ │ │ │ │ │ ├── AndroidManifest.xml │ │ │ │ │ │ └── res │ │ │ │ │ │ ├── drawable-hdpi │ │ │ │ │ │ ├── background.png │ │ │ │ │ │ └── logo.png │ │ │ │ │ │ ├── drawable-ldpi │ │ │ │ │ │ ├── background.png │ │ │ │ │ │ └── logo.png │ │ │ │ │ │ ├── drawable-mdpi │ │ │ │ │ │ ├── background.png │ │ │ │ │ │ └── logo.png │ │ │ │ │ │ ├── drawable-nodpi │ │ │ │ │ │ └── splash_screen.xml │ │ │ │ │ │ ├── drawable-xhdpi │ │ │ │ │ │ ├── background.png │ │ │ │ │ │ └── logo.png │ │ │ │ │ │ ├── drawable-xxhdpi │ │ │ │ │ │ ├── background.png │ │ │ │ │ │ └── logo.png │ │ │ │ │ │ ├── drawable-xxxhdpi │ │ │ │ │ │ ├── background.png │ │ │ │ │ │ └── logo.png │ │ │ │ │ │ ├── drawable │ │ │ │ │ │ └── ic_launcher_foreground.xml │ │ │ │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ │ │ └── ic_launcher.xml │ │ │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ │ ├── values-v21 │ │ │ │ │ │ ├── colors.xml │ │ │ │ │ │ └── styles.xml │ │ │ │ │ │ ├── values-v29 │ │ │ │ │ │ └── styles.xml │ │ │ │ │ │ ├── values │ │ │ │ │ │ ├── colors.xml │ │ │ │ │ │ ├── ic_launcher_background.xml │ │ │ │ │ │ └── styles.xml │ │ │ │ │ │ └── xml │ │ │ │ │ │ └── file_paths.xml │ │ │ │ │ └── iOS │ │ │ │ │ ├── Assets.xcassets │ │ │ │ │ ├── AppIcon.appiconset │ │ │ │ │ │ ├── Contents.json │ │ │ │ │ │ ├── icon-1024.png │ │ │ │ │ │ ├── icon-20.png │ │ │ │ │ │ ├── icon-20@2x.png │ │ │ │ │ │ ├── icon-20@3x.png │ │ │ │ │ │ ├── icon-29.png │ │ │ │ │ │ ├── icon-29@2x.png │ │ │ │ │ │ ├── icon-29@3x.png │ │ │ │ │ │ ├── icon-40.png │ │ │ │ │ │ ├── icon-40@2x.png │ │ │ │ │ │ ├── icon-40@3x.png │ │ │ │ │ │ ├── icon-60@2x.png │ │ │ │ │ │ ├── icon-60@3x.png │ │ │ │ │ │ ├── icon-76.png │ │ │ │ │ │ ├── icon-76@2x.png │ │ │ │ │ │ └── icon-83.5@2x.png │ │ │ │ │ ├── Contents.json │ │ │ │ │ ├── LaunchScreen.AspectFill.imageset │ │ │ │ │ │ ├── Contents.json │ │ │ │ │ │ ├── LaunchScreen-AspectFill.png │ │ │ │ │ │ ├── LaunchScreen-AspectFill@2x.png │ │ │ │ │ │ └── LaunchScreen-AspectFill@3x.png │ │ │ │ │ └── LaunchScreen.Center.imageset │ │ │ │ │ │ ├── Contents.json │ │ │ │ │ │ ├── LaunchScreen-Center.png │ │ │ │ │ │ ├── LaunchScreen-Center@2x.png │ │ │ │ │ │ └── LaunchScreen-Center@3x.png │ │ │ │ │ ├── Info.plist │ │ │ │ │ ├── LaunchScreen.storyboard │ │ │ │ │ └── build.xcconfig │ │ │ ├── schema.d.ts │ │ │ └── schema.json │ │ ├── application │ │ │ ├── application.spec.ts │ │ │ ├── application.ts │ │ │ ├── compat.ts │ │ │ ├── files_angular │ │ │ │ ├── __dot__gitignore │ │ │ │ ├── jest.config.js │ │ │ │ ├── nativescript.config.ts__tmpl__ │ │ │ │ ├── package.json │ │ │ │ ├── references.d.ts__tmpl__ │ │ │ │ ├── src │ │ │ │ │ ├── app.component.html │ │ │ │ │ ├── app.component.ts__tmpl__ │ │ │ │ │ ├── app.css │ │ │ │ │ ├── app.routes.ts__tmpl__ │ │ │ │ │ ├── assets │ │ │ │ │ │ └── images │ │ │ │ │ │ │ └── nx-nativescript.png │ │ │ │ │ ├── core │ │ │ │ │ │ └── services │ │ │ │ │ │ │ └── item.service.ts__tmpl__ │ │ │ │ │ ├── environments │ │ │ │ │ │ ├── environment.prod.ts__tmpl__ │ │ │ │ │ │ └── environment.ts__tmpl__ │ │ │ │ │ ├── features │ │ │ │ │ │ ├── detail │ │ │ │ │ │ │ ├── detail.component.html │ │ │ │ │ │ │ └── detail.component.ts__tmpl__ │ │ │ │ │ │ └── home │ │ │ │ │ │ │ ├── home.component.html │ │ │ │ │ │ │ └── home.component.ts__tmpl__ │ │ │ │ │ ├── fonts │ │ │ │ │ │ └── .gitkeep │ │ │ │ │ ├── main.ts__tmpl__ │ │ │ │ │ ├── polyfills.ts__tmpl__ │ │ │ │ │ ├── test-setup.ts__tmpl__ │ │ │ │ │ └── utils │ │ │ │ │ │ ├── index.ts__tmpl__ │ │ │ │ │ │ └── status-bar.ts__tmpl__ │ │ │ │ ├── tailwind.config.js │ │ │ │ ├── tsconfig.app.json │ │ │ │ ├── tsconfig.editor.json │ │ │ │ ├── tsconfig.json │ │ │ │ ├── tsconfig.spec.json │ │ │ │ └── webpack.config.js │ │ │ ├── files_vanilla │ │ │ │ ├── __dot__gitignore │ │ │ │ ├── nativescript.config.ts__tmpl__ │ │ │ │ ├── package.json │ │ │ │ ├── references.d.ts__tmpl__ │ │ │ │ ├── src │ │ │ │ │ ├── app-root.xml │ │ │ │ │ ├── app.css │ │ │ │ │ ├── app.ts__tmpl__ │ │ │ │ │ ├── environments │ │ │ │ │ │ ├── environment.prod.ts__tmpl__ │ │ │ │ │ │ └── environment.ts__tmpl__ │ │ │ │ │ ├── main-page.ts__tmpl__ │ │ │ │ │ ├── main-page.xml │ │ │ │ │ └── main-view-model.ts__tmpl__ │ │ │ │ ├── tailwind.config.js │ │ │ │ ├── tsconfig.app.json │ │ │ │ ├── tsconfig.editor.json │ │ │ │ ├── tsconfig.json │ │ │ │ ├── tsconfig.spec.json │ │ │ │ └── webpack.config.js │ │ │ ├── lib │ │ │ │ ├── add-linting.ts │ │ │ │ ├── create-files.ts │ │ │ │ ├── normalize-options.ts │ │ │ │ └── project-json.ts │ │ │ ├── schema.d.ts │ │ │ └── schema.json │ │ ├── init │ │ │ ├── compat.ts │ │ │ ├── init.spec.ts │ │ │ ├── init.ts │ │ │ ├── schema.d.ts │ │ │ └── schema.json │ │ └── library │ │ │ ├── compat.ts │ │ │ ├── files │ │ │ └── references.d.ts__tmpl__ │ │ │ ├── lib │ │ │ ├── create-files.ts │ │ │ ├── normalize-options.ts │ │ │ └── update-ts-config.ts │ │ │ ├── library.spec.ts │ │ │ ├── library.ts │ │ │ ├── schema.d.ts │ │ │ └── schema.json │ ├── index.ts │ ├── schemas │ │ ├── android-properties.schema.ts │ │ ├── base.schema.ts │ │ ├── build.schema.ts │ │ ├── clean.schema.ts │ │ ├── debug.schema.ts │ │ ├── deep-merge.ts │ │ ├── ios-properties.schema.ts │ │ ├── prepare.schema.ts │ │ ├── run.schema.ts │ │ ├── test.schema.ts │ │ └── visionos-properties.schema.ts │ └── utils │ │ ├── commands.ts │ │ ├── errors.ts │ │ ├── executors.ts │ │ ├── general.ts │ │ ├── generate-schemas.ts │ │ ├── helpers.ts │ │ ├── index.ts │ │ ├── normalize-extra-flags.ts │ │ ├── parse-option-name.ts │ │ ├── types.ts │ │ └── versions.ts │ ├── tsconfig.json │ ├── tsconfig.lib.json │ └── tsconfig.spec.json ├── tools ├── assets │ └── images │ │ └── nx-nativescript.jpg └── tsconfig.tools.json ├── tsconfig.base.json └── yarn.lock /.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | max_line_length = 160 11 | 12 | [*.md] 13 | max_line_length = off 14 | trim_trailing_whitespace = false 15 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "ignorePatterns": ["**/*"], 4 | "plugins": ["@nx"], 5 | "overrides": [ 6 | { 7 | "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], 8 | "rules": { 9 | "@nx/enforce-module-boundaries": [ 10 | "error", 11 | { 12 | "enforceBuildableLibDependency": true, 13 | "allow": [], 14 | "depConstraints": [ 15 | { 16 | "sourceTag": "*", 17 | "onlyDependOnLibsWithTags": ["*"] 18 | } 19 | ] 20 | } 21 | ] 22 | } 23 | }, 24 | { 25 | "files": ["*.ts", "*.tsx"], 26 | "extends": ["plugin:@nx/typescript"], 27 | "rules": { 28 | "@typescript-eslint/no-extra-semi": "error", 29 | "no-extra-semi": "off" 30 | } 31 | }, 32 | { 33 | "files": ["*.js", "*.jsx"], 34 | "extends": ["plugin:@nx/javascript"], 35 | "rules": { 36 | "@typescript-eslint/no-extra-semi": "error", 37 | "no-extra-semi": "off" 38 | } 39 | }, 40 | { 41 | "files": ["*.json"], 42 | "parser": "jsonc-eslint-parser", 43 | "rules": { 44 | "@nx/dependency-checks": ["error", {}] 45 | } 46 | } 47 | ] 48 | } 49 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /tmp 6 | /out-tsc 7 | 8 | # dependencies 9 | /node_modules 10 | .npmrc 11 | 12 | # IDEs and editors 13 | /.idea 14 | .project 15 | .classpath 16 | .c9/ 17 | *.launch 18 | .settings/ 19 | *.sublime-workspace 20 | 21 | # IDE - VSCode 22 | .vscode/* 23 | !.vscode/settings.json 24 | !.vscode/tasks.json 25 | !.vscode/launch.json 26 | !.vscode/extensions.json 27 | 28 | # misc 29 | /.sass-cache 30 | /connect.lock 31 | /coverage 32 | /libpeerconnection.log 33 | npm-debug.log 34 | yarn-error.log 35 | testem.log 36 | /typings 37 | 38 | # System Files 39 | .DS_Store 40 | Thumbs.db 41 | 42 | .nx/cache 43 | .nx/workspace-data 44 | .angular 45 | .env 46 | .cursor/rules/nx-rules.mdc 47 | .github/instructions/nx.instructions.md 48 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | # Add files here to ignore them from prettier formatting 2 | 3 | /dist 4 | /coverage 5 | 6 | /.nx/cache 7 | /.nx/workspace-data 8 | .angular 9 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "printWidth": 160 4 | } 5 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["ms-vscode.vscode-typescript-tslint-plugin", "esbenp.prettier-vscode", "firsttris.vscode-jest-runner"] 3 | } 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | packages/nx/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | packages/nx/README.md -------------------------------------------------------------------------------- /e2e/nx-e2e/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | displayName: 'nx-e2e', 3 | preset: '../../jest.preset.js', 4 | transform: { 5 | '^.+\\.[tj]s$': [ 6 | 'ts-jest', 7 | { 8 | tsConfig: '/tsconfig.spec.json', 9 | }, 10 | ], 11 | }, 12 | moduleFileExtensions: ['ts', 'js', 'html'], 13 | coverageDirectory: '../../coverage/e2e/nx-e2e', 14 | }; 15 | -------------------------------------------------------------------------------- /e2e/nx-e2e/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nx-e2e", 3 | "$schema": "../../node_modules/nx/schemas/project-schema.json", 4 | "projectType": "application", 5 | "sourceRoot": "e2e/nx-e2e/src", 6 | "tags": [], 7 | "implicitDependencies": ["nx"], 8 | "targets": { 9 | "e2e": { 10 | "executor": "@nx/jest:jest", 11 | "options": { 12 | "npmPackageName": "@nativescript/nx", 13 | "pluginOutputPath": "dist/packages/nx", 14 | "jestConfig": "e2e/nx-e2e/jest.config.js", 15 | "runInBand": true, 16 | "passWithNoTests": false 17 | }, 18 | "dependsOn": ["nx:build"] 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /e2e/nx-e2e/tests/nx.test.ts: -------------------------------------------------------------------------------- 1 | import { checkFilesExist, ensureNxProject, readJson, runNxCommandAsync, uniq } from '@nx/plugin/testing'; 2 | describe('nx e2e', () => { 3 | it('should create nx', async (done) => { 4 | const plugin = uniq('nx'); 5 | ensureNxProject('@nativescript/nx', 'dist/packages/nx'); 6 | await runNxCommandAsync(`generate @nativescript/nx:nx ${plugin}`); 7 | 8 | const result = await runNxCommandAsync(`build ${plugin}`); 9 | expect(result.stdout).toContain('Builder ran'); 10 | 11 | done(); 12 | }); 13 | 14 | describe('--directory', () => { 15 | it('should create src in the specified directory', async (done) => { 16 | const plugin = uniq('nx'); 17 | ensureNxProject('@nativescript/nx', 'dist/packages/nx'); 18 | await runNxCommandAsync(`generate @nativescript/nx:nx ${plugin} --directory subdir`); 19 | expect(() => checkFilesExist(`libs/subdir/${plugin}/src/index.ts`)).not.toThrow(); 20 | done(); 21 | }); 22 | }); 23 | 24 | describe('--tags', () => { 25 | it('should add tags to nx.json', async (done) => { 26 | const plugin = uniq('nx'); 27 | ensureNxProject('@nativescript/nx', 'dist/packages/nx'); 28 | await runNxCommandAsync(`generate @nativescript/nx:nx ${plugin} --tags e2etag,e2ePackage`); 29 | const nxJson = readJson('nx.json'); 30 | expect(nxJson.projects[plugin].tags).toEqual(['e2etag', 'e2ePackage']); 31 | done(); 32 | }); 33 | }); 34 | }); 35 | -------------------------------------------------------------------------------- /e2e/nx-e2e/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "files": [], 4 | "include": [], 5 | "references": [ 6 | { 7 | "path": "./tsconfig.e2e.json" 8 | }, 9 | { 10 | "path": "./tsconfig.spec.json" 11 | } 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /e2e/nx-e2e/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "include": ["**/*.spec.ts", "**/*.d.ts"] 9 | } 10 | -------------------------------------------------------------------------------- /jest.config.ts: -------------------------------------------------------------------------------- 1 | const { getJestProjects } = require('@nx/jest'); 2 | 3 | export default { projects: [...getJestProjects(), '/e2e/nx-e2e'] }; 4 | -------------------------------------------------------------------------------- /jest.preset.js: -------------------------------------------------------------------------------- 1 | const nxPreset = require('@nx/jest/preset').default; 2 | 3 | module.exports = { ...nxPreset }; 4 | -------------------------------------------------------------------------------- /migrations.json: -------------------------------------------------------------------------------- 1 | { 2 | "migrations": [ 3 | { 4 | "version": "21.0.0-beta.8", 5 | "description": "Removes the legacy cache configuration from nx.json", 6 | "implementation": "./src/migrations/update-21-0-0/remove-legacy-cache", 7 | "package": "nx", 8 | "name": "remove-legacy-cache" 9 | }, 10 | { 11 | "version": "21.0.0-beta.8", 12 | "description": "Removes the legacy cache configuration from nx.json", 13 | "implementation": "./src/migrations/update-21-0-0/remove-custom-tasks-runner", 14 | "package": "nx", 15 | "name": "remove-custom-tasks-runner" 16 | }, 17 | { 18 | "version": "21.0.0-beta.11", 19 | "description": "Updates release version config based on the breaking changes in Nx v21", 20 | "implementation": "./src/migrations/update-21-0-0/release-version-config-changes", 21 | "package": "nx", 22 | "name": "release-version-config-changes" 23 | }, 24 | { 25 | "version": "21.0.0-beta.11", 26 | "description": "Updates release changelog config based on the breaking changes in Nx v21", 27 | "implementation": "./src/migrations/update-21-0-0/release-changelog-config-changes", 28 | "package": "nx", 29 | "name": "release-changelog-config-changes" 30 | }, 31 | { 32 | "version": "21.1.0-beta.2", 33 | "description": "Adds **/nx-rules.mdc and **/nx.instructions.md to .gitignore if not present", 34 | "implementation": "./src/migrations/update-21-1-0/add-gitignore-entry", 35 | "package": "nx", 36 | "name": "21-1-0-add-ignore-entries-for-nx-rule-files" 37 | }, 38 | { 39 | "cli": "nx", 40 | "version": "21.0.0-beta.9", 41 | "description": "Replace usage of `getJestProjects` with `getJestProjectsAsync`.", 42 | "implementation": "./src/migrations/update-21-0-0/replace-getJestProjects-with-getJestProjectsAsync", 43 | "package": "@nx/jest", 44 | "name": "replace-getJestProjects-with-getJestProjectsAsync-v21" 45 | }, 46 | { 47 | "version": "21.0.0-beta.10", 48 | "description": "Remove the previously deprecated and unused `tsConfig` option from the `@nx/jest:jest` executor.", 49 | "implementation": "./src/migrations/update-21-0-0/remove-tsconfig-option-from-jest-executor", 50 | "package": "@nx/jest", 51 | "name": "remove-tsconfig-option-from-jest-executor" 52 | }, 53 | { 54 | "cli": "nx", 55 | "version": "21.0.0-beta.3", 56 | "description": "Set the `continuous` option to `true` for continuous tasks.", 57 | "factory": "./src/migrations/update-21-0-0/set-continuous-option", 58 | "package": "@nx/angular", 59 | "name": "set-continuous-option" 60 | } 61 | ] 62 | } 63 | -------------------------------------------------------------------------------- /nx.json: -------------------------------------------------------------------------------- 1 | { 2 | "workspaceLayout": { 3 | "appsDir": "e2e", 4 | "libsDir": "packages" 5 | }, 6 | "$schema": "./node_modules/nx/schemas/nx-schema.json", 7 | "targetDefaults": { 8 | "build": { 9 | "dependsOn": ["^build"], 10 | "inputs": ["production", "^production"], 11 | "cache": true 12 | }, 13 | "@nx/jest:jest": { 14 | "cache": true, 15 | "inputs": ["default", "^production", "{workspaceRoot}/jest.preset.js"], 16 | "options": { 17 | "passWithNoTests": true 18 | }, 19 | "configurations": { 20 | "ci": { 21 | "ci": true, 22 | "codeCoverage": true 23 | } 24 | } 25 | }, 26 | "@nx/eslint:lint": { 27 | "cache": true, 28 | "inputs": ["default", "{workspaceRoot}/.eslintrc.json", "{workspaceRoot}/tools/eslint-rules/**/*"] 29 | } 30 | }, 31 | "namedInputs": { 32 | "default": ["{projectRoot}/**/*", "sharedGlobals"], 33 | "sharedGlobals": ["{workspaceRoot}/workspace.json", "{workspaceRoot}/tsconfig.base.json", "{workspaceRoot}/tslint.json", "{workspaceRoot}/nx.json"], 34 | "production": [ 35 | "default", 36 | "!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)", 37 | "!{projectRoot}/tsconfig.spec.json", 38 | "!{projectRoot}/jest.config.[jt]s", 39 | "!{projectRoot}/src/test-setup.[jt]s" 40 | ] 41 | }, 42 | "parallel": 1, 43 | "useInferencePlugins": false, 44 | "defaultBase": "main" 45 | } 46 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nativescript-nx-plugins", 3 | "version": "21.0.0", 4 | "license": "MIT", 5 | "scripts": { 6 | "nx": "nx", 7 | "start": "nx serve", 8 | "build": "nx prepare nx", 9 | "test": "nx run-many --target=test --all --parallel", 10 | "lint": "nx workspace-lint && nx lint", 11 | "e2e": "nx e2e", 12 | "affected:apps": "nx affected:apps", 13 | "affected:libs": "nx affected:libs", 14 | "affected:build": "nx affected:build", 15 | "affected:e2e": "nx affected:e2e", 16 | "affected:test": "nx affected:test", 17 | "affected:lint": "nx affected:lint", 18 | "affected:dep-graph": "nx affected:dep-graph", 19 | "affected": "nx affected", 20 | "format": "nx format:write", 21 | "format:write": "nx format:write", 22 | "format:check": "nx format:check", 23 | "update": "nx migrate latest", 24 | "dep-graph": "nx dep-graph", 25 | "help": "nx help", 26 | "doctoc": "doctoc packages/nx/README.md", 27 | "workspace-generator": "nx workspace-generator", 28 | "clean": "npx rimraf node_modules package-lock.json yarn.lock && yarn", 29 | "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s", 30 | "reset.changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0" 31 | }, 32 | "private": true, 33 | "devDependencies": { 34 | "@angular-devkit/core": "~19.2.0", 35 | "@nx/angular": "21.1.2", 36 | "@nx/devkit": "21.1.2", 37 | "@nx/eslint": "21.1.2", 38 | "@nx/eslint-plugin": "21.1.2", 39 | "@nx/express": "21.1.2", 40 | "@nx/jest": "21.1.2", 41 | "@nx/js": "21.1.2", 42 | "@nx/plugin": "21.1.2", 43 | "@nx/web": "21.1.2", 44 | "@nx/workspace": "21.1.2", 45 | "@types/fs-extra": "^11.0.3", 46 | "@types/jest": "29.5.13", 47 | "@types/node": "^20.0.0", 48 | "@types/plist": "^3.0.2", 49 | "@typescript-eslint/utils": "^8.13.0", 50 | "conventional-changelog-cli": "^5.0.0", 51 | "cz-conventional-changelog": "^3.3.0", 52 | "doctoc": "^2.0.0", 53 | "dotenv": "~16.4.0", 54 | "enquirer": "^2.4.1", 55 | "eslint": "8.57.0", 56 | "eslint-config-prettier": "10.1.2", 57 | "fast-xml-parser": "^4.5.0", 58 | "fs-extra": "^11.2.0", 59 | "jest": "29.7.0", 60 | "nx": "21.1.2", 61 | "nx-cloud": "19.1.0", 62 | "plist": "^3.1.0", 63 | "prettier": "^3.3.0", 64 | "ts-jest": "29.2.5", 65 | "ts-node": "10.9.2", 66 | "tslib": "^2.8.0", 67 | "typescript": "5.7.3" 68 | }, 69 | "dependencies": {} 70 | } 71 | -------------------------------------------------------------------------------- /packages/nx/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../.eslintrc.json", 3 | "ignorePatterns": ["!**/*"], 4 | "rules": {}, 5 | "overrides": [ 6 | { 7 | "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], 8 | "rules": {} 9 | }, 10 | { 11 | "files": ["*.ts", "*.tsx"], 12 | "rules": {} 13 | }, 14 | { 15 | "files": ["*.js", "*.jsx"], 16 | "rules": {} 17 | } 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /packages/nx/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright OpenJS Foundation and other contributors, https://openjsf.org 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. -------------------------------------------------------------------------------- /packages/nx/executors.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/schema", 3 | "executors": { 4 | "build": { 5 | "implementation": "./src/executors/build/executor", 6 | "schema": "./src/executors/build/build.schema.json", 7 | "description": "NativeScript executor" 8 | }, 9 | "debug": { 10 | "implementation": "./src/executors/build/executor", 11 | "schema": "./src/executors/build/debug.schema.json", 12 | "description": "NativeScript debug executor" 13 | }, 14 | "run": { 15 | "implementation": "./src/executors/build/executor", 16 | "schema": "./src/executors/build/run.schema.json", 17 | "description": "NativeScript run executor" 18 | }, 19 | "prepare": { 20 | "implementation": "./src/executors/build/executor", 21 | "schema": "./src/executors/build/prepare.schema.json", 22 | "description": "NativeScript prepare executor" 23 | }, 24 | "test": { 25 | "implementation": "./src/executors/build/executor", 26 | "schema": "./src/executors/build/test.schema.json", 27 | "description": "Start the NativeScript unit test runner" 28 | }, 29 | "clean": { 30 | "implementation": "./src/executors/build/executor", 31 | "schema": "./src/executors/build/clean.schema.json", 32 | "description": "NativeScript clean executor" 33 | } 34 | }, 35 | "builders": { 36 | "build": { 37 | "implementation": "./src/executors/build/builder", 38 | "schema": "./src/executors/build/build.schema.json", 39 | "description": "NativeScript build builder" 40 | }, 41 | "debug": { 42 | "implementation": "./src/executors/build/builder", 43 | "schema": "./src/executors/build/debug.schema.json", 44 | "description": "NativeScript debug builder" 45 | }, 46 | "run": { 47 | "implementation": "./src/executors/build/builder", 48 | "schema": "./src/executors/build/run.schema.json", 49 | "description": "NativeScript run builder" 50 | }, 51 | "prepare": { 52 | "implementation": "./src/executors/build/builder", 53 | "schema": "./src/executors/build/prepare.schema.json", 54 | "description": "NativeScript prepare builder" 55 | }, 56 | "test": { 57 | "implementation": "./src/executors/build/builder", 58 | "schema": "./src/executors/build/test.schema.json", 59 | "description": "NativeScript test builder" 60 | }, 61 | "clean": { 62 | "implementation": "./src/executors/build/builder", 63 | "schema": "./src/executors/build/clean.schema.json", 64 | "description": "NativeScript clean builder" 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /packages/nx/generators.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/schema", 3 | "name": "NativeScript Nx", 4 | "version": "3.0", 5 | "generators": { 6 | "init": { 7 | "factory": "./src/generators/init/init", 8 | "schema": "./src/generators/init/schema.json", 9 | "description": "Initialize @nativescript/nx", 10 | "aliases": ["ng-add"], 11 | "hidden": true 12 | }, 13 | "application": { 14 | "factory": "./src/generators/application/application", 15 | "schema": "./src/generators/application/schema.json", 16 | "description": "Create an application", 17 | "aliases": ["app"], 18 | "x-type": "application" 19 | }, 20 | "library": { 21 | "factory": "./src/generators/library/library", 22 | "schema": "./src/generators/library/schema.json", 23 | "description": "Create a library", 24 | "x-type": "library" 25 | }, 26 | "app-resources": { 27 | "factory": "./src/generators/app-resources/app-resources", 28 | "schema": "./src/generators/app-resources/schema.json", 29 | "description": "Create app resources for NativeScript app.", 30 | "hidden": true 31 | } 32 | }, 33 | "schematics": { 34 | "init": { 35 | "factory": "./src/generators/init/compat", 36 | "schema": "./src/generators/init/schema.json", 37 | "description": "Initialize @nativescript/nx", 38 | "aliases": ["ng-add"], 39 | "hidden": true 40 | }, 41 | "application": { 42 | "factory": "./src/generators/application/compat", 43 | "schema": "./src/generators/application/schema.json", 44 | "description": "Create an application", 45 | "aliases": ["app"], 46 | "x-type": "application" 47 | }, 48 | "library": { 49 | "factory": "./src/generators/library/compat", 50 | "schema": "./src/generators/library/schema.json", 51 | "description": "Create a library", 52 | "x-type": "library" 53 | }, 54 | "app-resources": { 55 | "factory": "./src/generators/app-resources/compat", 56 | "schema": "./src/generators/app-resources/schema.json", 57 | "description": "Create app resources for NativeScript app.", 58 | "hidden": true 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /packages/nx/jest.config.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | export default { 3 | displayName: 'nx', 4 | preset: '../../jest.preset.js', 5 | transform: { 6 | '^.+\\.[tj]sx?$': ['ts-jest', { tsconfig: '/tsconfig.spec.json' }], 7 | }, 8 | moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], 9 | coverageDirectory: '../../coverage/packages/nx', 10 | testEnvironment: 'node', 11 | }; 12 | -------------------------------------------------------------------------------- /packages/nx/migrations.json: -------------------------------------------------------------------------------- 1 | { 2 | "generators": {} 3 | } 4 | -------------------------------------------------------------------------------- /packages/nx/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@nativescript/nx", 3 | "version": "21.0.0", 4 | "description": "NativeScript Plugin for Nx", 5 | "repository": { 6 | "type": "git", 7 | "url": "git+https://github.com/nativescript/nx.git" 8 | }, 9 | "keywords": [ 10 | "Nx", 11 | "NativeScript", 12 | "Monorepo", 13 | "Mobile", 14 | "iOS", 15 | "Android" 16 | ], 17 | "main": "src/index.js", 18 | "types": "src/index.d.ts", 19 | "schematics": "./generators.json", 20 | "builders": "./executors.json", 21 | "author": { 22 | "name": "NativeScript", 23 | "email": "oss@nativescript.org" 24 | }, 25 | "contributors": [ 26 | { 27 | "name": "Jake Ihasz", 28 | "url": "https://github.com/JakeAi" 29 | } 30 | ], 31 | "license": "Apache-2.0", 32 | "bugs": { 33 | "url": "https://github.com/nativescript/nx/issues" 34 | }, 35 | "homepage": "https://nativescript.org/nx", 36 | "nx-migrations": { 37 | "migrations": "./migrations.json" 38 | }, 39 | "dependencies": { 40 | "enquirer": "^2.4.1", 41 | "fast-xml-parser": "^4.5.0", 42 | "fs-extra": "^11.2.0", 43 | "plist": "^3.1.0" 44 | }, 45 | "peerDependencies": { 46 | "@nx/devkit": "^21.0.0", 47 | "@nx/eslint": "^21.0.0", 48 | "@nx/js": "^21.0.0", 49 | "@nx/workspace": "^21.0.0", 50 | "nx": "^21.0.0" 51 | } 52 | } -------------------------------------------------------------------------------- /packages/nx/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nx", 3 | "$schema": "../../node_modules/nx/schemas/project-schema.json", 4 | "sourceRoot": "packages/nx/src", 5 | "projectType": "library", 6 | "tags": [], 7 | "generators": {}, 8 | "targets": { 9 | "lint": { 10 | "executor": "@nx/eslint:lint", 11 | "outputs": ["{options.outputFile}"], 12 | "options": { 13 | "lintFilePatterns": ["packages/nx/**/*.{ts,tsx,js,jsx}", "packages/nx/package.json"] 14 | } 15 | }, 16 | "test": { 17 | "executor": "@nx/jest:jest", 18 | "outputs": ["{workspaceRoot}/coverage/packages/nx"], 19 | "options": { 20 | "jestConfig": "packages/nx/jest.config.ts" 21 | } 22 | }, 23 | "prepare": { 24 | "executor": "nx:run-commands", 25 | "options": { 26 | "commands": [ 27 | { 28 | "command": "ts-node -P ./packages/nx/tsconfig.lib.json ./packages/nx/src/utils/generate-schemas.ts" 29 | }, 30 | { 31 | "command": "nx build nx" 32 | } 33 | ] 34 | } 35 | }, 36 | "build": { 37 | "executor": "@nx/js:tsc", 38 | "outputs": ["{options.outputPath}"], 39 | "options": { 40 | "outputPath": "dist/packages/nx", 41 | "tsConfig": "packages/nx/tsconfig.lib.json", 42 | "packageJson": "packages/nx/package.json", 43 | "main": "packages/nx/src/index.ts", 44 | "assets": [ 45 | "packages/nx/*.md", 46 | "packages/nx/LICENSE", 47 | { 48 | "input": "./packages/nx/src", 49 | "glob": "**/!(*.ts)", 50 | "output": "./src" 51 | }, 52 | { 53 | "input": "./packages/nx/src", 54 | "glob": "**/*.d.ts", 55 | "output": "./src" 56 | }, 57 | { 58 | "input": "./packages/nx", 59 | "glob": "generators.json", 60 | "output": "." 61 | }, 62 | { 63 | "input": "./packages/nx", 64 | "glob": "executors.json", 65 | "output": "." 66 | }, 67 | { 68 | "input": "./packages/nx", 69 | "glob": "migrations.json", 70 | "output": "." 71 | } 72 | ] 73 | } 74 | } 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /packages/nx/src/executors/build/build.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/schema", 3 | "title": "NativeScript builder", 4 | "description": "", 5 | "type": "object", 6 | "properties": { 7 | "command": { 8 | "type": "string", 9 | "description": "NativeScript CLI command to invoke", 10 | "default": "build" 11 | }, 12 | "platform": { 13 | "type": "string", 14 | "description": "Platform to run on" 15 | }, 16 | "force": { 17 | "type": "boolean", 18 | "default": true, 19 | "description": "If true, skips the application compatibility checks and forces npm i to ensure all dependencies are installed. Otherwise, the command will check the application compatibility with the current CLI version and could fail requiring ns migrate." 20 | }, 21 | "silent": { 22 | "type": "boolean", 23 | "default": false, 24 | "description": "If true, skips prompts.", 25 | "alias": "s" 26 | }, 27 | "verbose": { 28 | "type": "boolean", 29 | "default": false, 30 | "description": "Enable verbose logging" 31 | }, 32 | "id": { 33 | "type": "string", 34 | "description": "App bundle id. Use with configurations that desire a specific bundle id to be set." 35 | }, 36 | "combineWithConfig": { 37 | "type": "string", 38 | "description": "Used with targets to share build configurations and avoid duplicating configurations across multiple targets." 39 | }, 40 | "provision": { 41 | "type": "string", 42 | "description": "(Apple Only) When building, use this provision profile name." 43 | }, 44 | "aab": { 45 | "type": "boolean", 46 | "default": false, 47 | "description": "(Android Only) When building, create an Android App Bundle (.aab file)." 48 | }, 49 | "keyStorePath": { 50 | "type": "string", 51 | "description": "(Android Only) When building, use the keystore file at this location." 52 | }, 53 | "keyStorePassword": { 54 | "type": "string", 55 | "description": "(Android Only) When building, use this keystore password." 56 | }, 57 | "keyStoreAlias": { 58 | "type": "string", 59 | "description": "(Android Only) When building, use this keystore alias." 60 | }, 61 | "keyStoreAliasPassword": { 62 | "type": "string", 63 | "description": "(Android Only) When building, use this keystore alias password." 64 | }, 65 | "copyTo": { 66 | "type": "string", 67 | "description": "When building, copy the package to this location." 68 | }, 69 | "android": { 70 | "type": "object", 71 | "aab": { 72 | "type": "boolean", 73 | "default": false, 74 | "description": "(Android Only) When building, create an Android App Bundle (.aab file)." 75 | }, 76 | "keyStorePath": { 77 | "type": "string", 78 | "description": "(Android Only) When building, use the keystore file at this location." 79 | }, 80 | "keyStorePassword": { 81 | "type": "string", 82 | "description": "(Android Only) When building, use this keystore password." 83 | }, 84 | "keyStoreAlias": { 85 | "type": "string", 86 | "description": "(Android Only) When building, use this keystore alias." 87 | }, 88 | "keyStoreAliasPassword": { 89 | "type": "string", 90 | "description": "(Android Only) When building, use this keystore alias password." 91 | }, 92 | "xmlUpdates": { 93 | "type": "object", 94 | "description": "Update any .xml value. Specify name of any filename with key/value pairs, e.g. { 'src/main/res/values/strings.xml': { app_name: 'MyApp', title_activity_kimera: 'MyApp' } }. Defaults to look in App_Resources/Android/{filepath} however you can specify relative path if located elsewhere." 95 | } 96 | }, 97 | "ios": { 98 | "type": "object", 99 | "required": [], 100 | "provision": { 101 | "type": "string", 102 | "description": "(iOS Only) When building, use this provision profile name." 103 | }, 104 | "plistUpdates": { 105 | "type": "object", 106 | "description": "Update any .plist value. Specify name of any filename with key/value pairs, e.g. { 'Info.plist': { CFBundleDisplayName: 'MyApp' } }. Defaults to look in App_Resources/iOS/{filepath} however you can specify relative path if located elsewhere." 107 | } 108 | }, 109 | "visionos": { 110 | "type": "object", 111 | "required": [], 112 | "provision": { 113 | "type": "string", 114 | "description": "(visionOS Only) When building, use this provision profile name." 115 | }, 116 | "plistUpdates": { 117 | "type": "object", 118 | "description": "Update any .plist value. Specify name of any filename with key/value pairs, e.g. { 'Info.plist': { CFBundleDisplayName: 'MyApp' } }. Defaults to look in App_Resources/visionOS/{filepath} however you can specify relative path if located elsewhere." 119 | } 120 | }, 121 | "device": { 122 | "type": "string", 123 | "description": "Device identifier to run app on.", 124 | "alias": "d" 125 | }, 126 | "emulator": { 127 | "type": "boolean", 128 | "default": false, 129 | "description": "Explicitly run with an emulator or simulator" 130 | }, 131 | "noHmr": { 132 | "type": "boolean", 133 | "default": false, 134 | "description": "Disable HMR" 135 | }, 136 | "uglify": { 137 | "type": "boolean", 138 | "default": false, 139 | "description": "Enable uglify during the webpack build" 140 | }, 141 | "release": { 142 | "type": "boolean", 143 | "default": false, 144 | "description": "Enable release mode during build using the --release flag" 145 | }, 146 | "forDevice": { 147 | "type": "boolean", 148 | "default": false, 149 | "description": "Build in device mode using the --for-device flag" 150 | }, 151 | "production": { 152 | "type": "boolean", 153 | "default": false, 154 | "description": "Build in production mode using the --env.production flag", 155 | "alias": "prod" 156 | }, 157 | "fileReplacements": { 158 | "description": "Replace files with other files in the build.", 159 | "type": "array", 160 | "items": { 161 | "type": "object", 162 | "properties": { 163 | "replace": { 164 | "type": "string", 165 | "description": "The file to be replaced." 166 | }, 167 | "with": { 168 | "type": "string", 169 | "description": "The file to replace with." 170 | } 171 | }, 172 | "additionalProperties": false, 173 | "required": [ 174 | "replace", 175 | "with" 176 | ] 177 | }, 178 | "default": [] 179 | }, 180 | "clean": { 181 | "type": "boolean", 182 | "default": false, 183 | "description": "Do a full project clean" 184 | } 185 | } 186 | } -------------------------------------------------------------------------------- /packages/nx/src/executors/build/builder.ts: -------------------------------------------------------------------------------- 1 | import { convertNxExecutor } from '@nx/devkit'; 2 | 3 | import runExecutor from './executor'; 4 | 5 | export default convertNxExecutor(runExecutor); 6 | -------------------------------------------------------------------------------- /packages/nx/src/executors/build/clean.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/schema", 3 | "title": "NativeScript clean", 4 | "description": "", 5 | "type": "object", 6 | "properties": { 7 | "command": { 8 | "type": "string", 9 | "description": "NativeScript CLI command to invoke", 10 | "default": "clean" 11 | }, 12 | "force": { 13 | "type": "boolean", 14 | "default": true, 15 | "description": "If true, skips the application compatibility checks and forces npm i to ensure all dependencies are installed. Otherwise, the command will check the application compatibility with the current CLI version and could fail requiring ns migrate." 16 | }, 17 | "silent": { 18 | "type": "boolean", 19 | "default": false, 20 | "description": "If true, skips prompts.", 21 | "alias": "s" 22 | }, 23 | "verbose": { 24 | "type": "boolean", 25 | "default": false, 26 | "description": "Enable verbose logging" 27 | } 28 | }, 29 | "required": [] 30 | } -------------------------------------------------------------------------------- /packages/nx/src/executors/build/debug.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/schema", 3 | "title": "NativeScript builder", 4 | "description": "", 5 | "type": "object", 6 | "properties": { 7 | "command": { 8 | "type": "string", 9 | "description": "NativeScript CLI command to invoke", 10 | "default": "debug" 11 | }, 12 | "platform": { 13 | "type": "string", 14 | "description": "Platform to run on" 15 | }, 16 | "force": { 17 | "type": "boolean", 18 | "default": true, 19 | "description": "If true, skips the application compatibility checks and forces npm i to ensure all dependencies are installed. Otherwise, the command will check the application compatibility with the current CLI version and could fail requiring ns migrate." 20 | }, 21 | "silent": { 22 | "type": "boolean", 23 | "default": false, 24 | "description": "If true, skips prompts.", 25 | "alias": "s" 26 | }, 27 | "verbose": { 28 | "type": "boolean", 29 | "default": false, 30 | "description": "Enable verbose logging" 31 | }, 32 | "id": { 33 | "type": "string", 34 | "description": "App bundle id. Use with configurations that desire a specific bundle id to be set." 35 | }, 36 | "combineWithConfig": { 37 | "type": "string", 38 | "description": "Used with targets to share build configurations and avoid duplicating configurations across multiple targets." 39 | }, 40 | "provision": { 41 | "type": "string", 42 | "description": "(Apple Only) When building, use this provision profile name." 43 | }, 44 | "aab": { 45 | "type": "boolean", 46 | "default": false, 47 | "description": "(Android Only) When building, create an Android App Bundle (.aab file)." 48 | }, 49 | "keyStorePath": { 50 | "type": "string", 51 | "description": "(Android Only) When building, use the keystore file at this location." 52 | }, 53 | "keyStorePassword": { 54 | "type": "string", 55 | "description": "(Android Only) When building, use this keystore password." 56 | }, 57 | "keyStoreAlias": { 58 | "type": "string", 59 | "description": "(Android Only) When building, use this keystore alias." 60 | }, 61 | "keyStoreAliasPassword": { 62 | "type": "string", 63 | "description": "(Android Only) When building, use this keystore alias password." 64 | }, 65 | "copyTo": { 66 | "type": "string", 67 | "description": "When building, copy the package to this location." 68 | }, 69 | "android": { 70 | "type": "object", 71 | "aab": { 72 | "type": "boolean", 73 | "default": false, 74 | "description": "(Android Only) When building, create an Android App Bundle (.aab file)." 75 | }, 76 | "keyStorePath": { 77 | "type": "string", 78 | "description": "(Android Only) When building, use the keystore file at this location." 79 | }, 80 | "keyStorePassword": { 81 | "type": "string", 82 | "description": "(Android Only) When building, use this keystore password." 83 | }, 84 | "keyStoreAlias": { 85 | "type": "string", 86 | "description": "(Android Only) When building, use this keystore alias." 87 | }, 88 | "keyStoreAliasPassword": { 89 | "type": "string", 90 | "description": "(Android Only) When building, use this keystore alias password." 91 | }, 92 | "xmlUpdates": { 93 | "type": "object", 94 | "description": "Update any .xml value. Specify name of any filename with key/value pairs, e.g. { 'src/main/res/values/strings.xml': { app_name: 'MyApp', title_activity_kimera: 'MyApp' } }. Defaults to look in App_Resources/Android/{filepath} however you can specify relative path if located elsewhere." 95 | } 96 | }, 97 | "ios": { 98 | "type": "object", 99 | "required": [], 100 | "provision": { 101 | "type": "string", 102 | "description": "(iOS Only) When building, use this provision profile name." 103 | }, 104 | "plistUpdates": { 105 | "type": "object", 106 | "description": "Update any .plist value. Specify name of any filename with key/value pairs, e.g. { 'Info.plist': { CFBundleDisplayName: 'MyApp' } }. Defaults to look in App_Resources/iOS/{filepath} however you can specify relative path if located elsewhere." 107 | } 108 | }, 109 | "visionos": { 110 | "type": "object", 111 | "required": [], 112 | "provision": { 113 | "type": "string", 114 | "description": "(visionOS Only) When building, use this provision profile name." 115 | }, 116 | "plistUpdates": { 117 | "type": "object", 118 | "description": "Update any .plist value. Specify name of any filename with key/value pairs, e.g. { 'Info.plist': { CFBundleDisplayName: 'MyApp' } }. Defaults to look in App_Resources/visionOS/{filepath} however you can specify relative path if located elsewhere." 119 | } 120 | }, 121 | "device": { 122 | "type": "string", 123 | "description": "Device identifier to run app on.", 124 | "alias": "d" 125 | }, 126 | "emulator": { 127 | "type": "boolean", 128 | "default": false, 129 | "description": "Explicitly run with an emulator or simulator" 130 | }, 131 | "noHmr": { 132 | "type": "boolean", 133 | "default": false, 134 | "description": "Disable HMR" 135 | }, 136 | "uglify": { 137 | "type": "boolean", 138 | "default": false, 139 | "description": "Enable uglify during the webpack build" 140 | }, 141 | "release": { 142 | "type": "boolean", 143 | "default": false, 144 | "description": "Enable release mode during build using the --release flag" 145 | }, 146 | "forDevice": { 147 | "type": "boolean", 148 | "default": false, 149 | "description": "Build in device mode using the --for-device flag" 150 | }, 151 | "production": { 152 | "type": "boolean", 153 | "default": false, 154 | "description": "Build in production mode using the --env.production flag", 155 | "alias": "prod" 156 | }, 157 | "fileReplacements": { 158 | "description": "Replace files with other files in the build.", 159 | "type": "array", 160 | "items": { 161 | "type": "object", 162 | "properties": { 163 | "replace": { 164 | "type": "string", 165 | "description": "The file to be replaced." 166 | }, 167 | "with": { 168 | "type": "string", 169 | "description": "The file to replace with." 170 | } 171 | }, 172 | "additionalProperties": false, 173 | "required": [ 174 | "replace", 175 | "with" 176 | ] 177 | }, 178 | "default": [] 179 | }, 180 | "clean": { 181 | "type": "boolean", 182 | "default": false, 183 | "description": "Do a full project clean" 184 | }, 185 | "debug": { 186 | "type": "boolean", 187 | "default": true, 188 | "description": "Use 'ns debug' instead of 'ns run'. Defaults to true" 189 | }, 190 | "timeout": { 191 | "type": "number", 192 | "default": -1, 193 | "description": "Increase the default 90s timeout to connect to a device/simulator" 194 | }, 195 | "prepare": { 196 | "type": "boolean", 197 | "description": "Starts a Webpack compilation and prepares the app's App_Resources and the plugins platforms directories. The output is generated in a subdirectory for the selected target platform in the platforms directory. This lets you build the project for the selected platform.", 198 | "default": false 199 | }, 200 | "flags": { 201 | "type": "string", 202 | "description": "Extra flags to pass to the NativeScript CLI (e.g. '--env.config=myapp'). You can separate multiple flags by spaces and use '=' to join option/values (e.g. '--env.config=myapp --env.appComponents=myCustomActivity.ts" 203 | } 204 | } 205 | } -------------------------------------------------------------------------------- /packages/nx/src/executors/build/executor.spec.ts: -------------------------------------------------------------------------------- 1 | import { ExecutorSchema } from '../../utils/types'; 2 | 3 | const options: Partial = { 4 | noHmr: true, 5 | prepare: true, 6 | platform: 'ios', 7 | }; 8 | 9 | describe('Executor: build', () => { 10 | it('sample', () => { 11 | expect(true).toBe(true); 12 | }); 13 | }); 14 | 15 | xdescribe('Command Runner Builder', () => { 16 | // const context = { 17 | // logger: { 18 | // info: (args) => { 19 | // console.log(args); 20 | // }, 21 | // }, 22 | // } as any; 23 | // let architect: Architect; 24 | // let architectHost: TestingArchitectHost; 25 | // beforeEach(async () => { 26 | // const registry = new schema.CoreSchemaRegistry(); 27 | // registry.addPostTransform(schema.transforms.addUndefinedDefaults); 28 | // architectHost = new TestingArchitectHost('/root', '/root'); 29 | // architect = new Architect(architectHost, registry); 30 | // // This will either take a Node package name, or a path to the directory 31 | // // for the package.json file. 32 | // await architectHost.addBuilderFromPackage(join(__dirname, '../../..')); 33 | // }); 34 | // it('can run', async () => { 35 | // const exec = spyOn(require('child_process'), 'spawn').and.callThrough(); 36 | // await runBuilder( 37 | // { 38 | // ...options, 39 | // }, 40 | // context 41 | // ); 42 | // expect(exec).toHaveBeenCalledWith('ns', ['debug', 'ios', '--no-hmr'], { 43 | // // stdio: ["debug", "ios", "--no-hmr"], 44 | // cwd: undefined, 45 | // env: process.env, 46 | // // maxBuffer: LARGE_BUFFER, 47 | // }); 48 | // // A "run" can have multiple outputs, and contains progress information. 49 | // // const run = await architect.scheduleBuilder('@nativescript/nx:build', options); 50 | // // // The "result" member (of type BuilderOutput) is the next output. 51 | // // const output = await run.result; 52 | // // // Stop the builder from running. This stops Architect from keeping 53 | // // // the builder-associated states in memory, since builders keep waiting 54 | // // // to be scheduled. 55 | // // await run.stop(); 56 | // // // Expect that it succeeded. 57 | // // expect(output.success).toBe(true); 58 | // }); 59 | }); 60 | -------------------------------------------------------------------------------- /packages/nx/src/executors/build/executor.ts: -------------------------------------------------------------------------------- 1 | import { ExecutorContext } from '@nx/devkit'; 2 | import { commonExecutor } from '../../utils'; 3 | import { ExecutorSchema } from '../../utils/types'; 4 | 5 | export default async function runExecutor(options: ExecutorSchema, context: ExecutorContext) { 6 | return commonExecutor(options, context); 7 | } 8 | -------------------------------------------------------------------------------- /packages/nx/src/executors/build/prepare.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/schema", 3 | "title": "NativeScript builder", 4 | "description": "", 5 | "type": "object", 6 | "properties": { 7 | "command": { 8 | "type": "string", 9 | "description": "NativeScript CLI command to invoke", 10 | "default": "prepare" 11 | }, 12 | "platform": { 13 | "type": "string", 14 | "description": "Platform to run on" 15 | }, 16 | "force": { 17 | "type": "boolean", 18 | "default": true, 19 | "description": "If true, skips the application compatibility checks and forces npm i to ensure all dependencies are installed. Otherwise, the command will check the application compatibility with the current CLI version and could fail requiring ns migrate." 20 | }, 21 | "silent": { 22 | "type": "boolean", 23 | "default": false, 24 | "description": "If true, skips prompts.", 25 | "alias": "s" 26 | }, 27 | "verbose": { 28 | "type": "boolean", 29 | "default": false, 30 | "description": "Enable verbose logging" 31 | }, 32 | "id": { 33 | "type": "string", 34 | "description": "App bundle id. Use with configurations that desire a specific bundle id to be set." 35 | }, 36 | "combineWithConfig": { 37 | "type": "string", 38 | "description": "Used with targets to share build configurations and avoid duplicating configurations across multiple targets." 39 | }, 40 | "provision": { 41 | "type": "string", 42 | "description": "(Apple Only) When building, use this provision profile name." 43 | }, 44 | "aab": { 45 | "type": "boolean", 46 | "default": false, 47 | "description": "(Android Only) When building, create an Android App Bundle (.aab file)." 48 | }, 49 | "keyStorePath": { 50 | "type": "string", 51 | "description": "(Android Only) When building, use the keystore file at this location." 52 | }, 53 | "keyStorePassword": { 54 | "type": "string", 55 | "description": "(Android Only) When building, use this keystore password." 56 | }, 57 | "keyStoreAlias": { 58 | "type": "string", 59 | "description": "(Android Only) When building, use this keystore alias." 60 | }, 61 | "keyStoreAliasPassword": { 62 | "type": "string", 63 | "description": "(Android Only) When building, use this keystore alias password." 64 | }, 65 | "copyTo": { 66 | "type": "string", 67 | "description": "When building, copy the package to this location." 68 | }, 69 | "android": { 70 | "type": "object", 71 | "aab": { 72 | "type": "boolean", 73 | "default": false, 74 | "description": "(Android Only) When building, create an Android App Bundle (.aab file)." 75 | }, 76 | "keyStorePath": { 77 | "type": "string", 78 | "description": "(Android Only) When building, use the keystore file at this location." 79 | }, 80 | "keyStorePassword": { 81 | "type": "string", 82 | "description": "(Android Only) When building, use this keystore password." 83 | }, 84 | "keyStoreAlias": { 85 | "type": "string", 86 | "description": "(Android Only) When building, use this keystore alias." 87 | }, 88 | "keyStoreAliasPassword": { 89 | "type": "string", 90 | "description": "(Android Only) When building, use this keystore alias password." 91 | }, 92 | "xmlUpdates": { 93 | "type": "object", 94 | "description": "Update any .xml value. Specify name of any filename with key/value pairs, e.g. { 'src/main/res/values/strings.xml': { app_name: 'MyApp', title_activity_kimera: 'MyApp' } }. Defaults to look in App_Resources/Android/{filepath} however you can specify relative path if located elsewhere." 95 | } 96 | }, 97 | "ios": { 98 | "type": "object", 99 | "required": [], 100 | "provision": { 101 | "type": "string", 102 | "description": "(iOS Only) When building, use this provision profile name." 103 | }, 104 | "plistUpdates": { 105 | "type": "object", 106 | "description": "Update any .plist value. Specify name of any filename with key/value pairs, e.g. { 'Info.plist': { CFBundleDisplayName: 'MyApp' } }. Defaults to look in App_Resources/iOS/{filepath} however you can specify relative path if located elsewhere." 107 | } 108 | }, 109 | "visionos": { 110 | "type": "object", 111 | "required": [], 112 | "provision": { 113 | "type": "string", 114 | "description": "(visionOS Only) When building, use this provision profile name." 115 | }, 116 | "plistUpdates": { 117 | "type": "object", 118 | "description": "Update any .plist value. Specify name of any filename with key/value pairs, e.g. { 'Info.plist': { CFBundleDisplayName: 'MyApp' } }. Defaults to look in App_Resources/visionOS/{filepath} however you can specify relative path if located elsewhere." 119 | } 120 | }, 121 | "device": { 122 | "type": "string", 123 | "description": "Device identifier to run app on.", 124 | "alias": "d" 125 | }, 126 | "emulator": { 127 | "type": "boolean", 128 | "default": false, 129 | "description": "Explicitly run with an emulator or simulator" 130 | }, 131 | "noHmr": { 132 | "type": "boolean", 133 | "default": false, 134 | "description": "Disable HMR" 135 | }, 136 | "uglify": { 137 | "type": "boolean", 138 | "default": false, 139 | "description": "Enable uglify during the webpack build" 140 | }, 141 | "release": { 142 | "type": "boolean", 143 | "default": false, 144 | "description": "Enable release mode during build using the --release flag" 145 | }, 146 | "forDevice": { 147 | "type": "boolean", 148 | "default": false, 149 | "description": "Build in device mode using the --for-device flag" 150 | }, 151 | "production": { 152 | "type": "boolean", 153 | "default": false, 154 | "description": "Build in production mode using the --env.production flag" 155 | }, 156 | "fileReplacements": { 157 | "description": "Replace files with other files in the build.", 158 | "type": "array", 159 | "items": { 160 | "type": "object", 161 | "properties": { 162 | "replace": { 163 | "type": "string", 164 | "description": "The file to be replaced." 165 | }, 166 | "with": { 167 | "type": "string", 168 | "description": "The file to replace with." 169 | } 170 | }, 171 | "additionalProperties": false, 172 | "required": [ 173 | "replace", 174 | "with" 175 | ] 176 | }, 177 | "default": [] 178 | }, 179 | "clean": { 180 | "type": "boolean", 181 | "default": false, 182 | "description": "Do a full project clean" 183 | }, 184 | "debug": { 185 | "type": "boolean", 186 | "default": true, 187 | "description": "Use 'ns debug' instead of 'ns run'. Defaults to true" 188 | }, 189 | "timeout": { 190 | "type": "number", 191 | "default": -1, 192 | "description": "Increase the default 90s timeout to connect to a device/simulator" 193 | }, 194 | "prepare": { 195 | "type": "boolean", 196 | "description": "Starts a Webpack compilation and prepares the app's App_Resources and the plugins platforms directories. The output is generated in a subdirectory for the selected target platform in the platforms directory. This lets you build the project for the selected platform.", 197 | "default": false 198 | }, 199 | "flags": { 200 | "type": "string", 201 | "description": "Extra flags to pass to the NativeScript CLI (e.g. '--env.config=myapp'). You can separate multiple flags by spaces and use '=' to join option/values (e.g. '--env.config=myapp --env.appComponents=myCustomActivity.ts" 202 | } 203 | } 204 | } -------------------------------------------------------------------------------- /packages/nx/src/executors/build/run.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/schema", 3 | "title": "NativeScript builder", 4 | "description": "", 5 | "type": "object", 6 | "properties": { 7 | "command": { 8 | "type": "string", 9 | "description": "NativeScript CLI command to invoke", 10 | "default": "run" 11 | }, 12 | "platform": { 13 | "type": "string", 14 | "description": "Platform to run on" 15 | }, 16 | "force": { 17 | "type": "boolean", 18 | "default": true, 19 | "description": "If true, skips the application compatibility checks and forces npm i to ensure all dependencies are installed. Otherwise, the command will check the application compatibility with the current CLI version and could fail requiring ns migrate." 20 | }, 21 | "silent": { 22 | "type": "boolean", 23 | "default": false, 24 | "description": "If true, skips prompts.", 25 | "alias": "s" 26 | }, 27 | "verbose": { 28 | "type": "boolean", 29 | "default": false, 30 | "description": "Enable verbose logging" 31 | }, 32 | "id": { 33 | "type": "string", 34 | "description": "App bundle id. Use with configurations that desire a specific bundle id to be set." 35 | }, 36 | "combineWithConfig": { 37 | "type": "string", 38 | "description": "Used with targets to share build configurations and avoid duplicating configurations across multiple targets." 39 | }, 40 | "provision": { 41 | "type": "string", 42 | "description": "(Apple Only) When building, use this provision profile name." 43 | }, 44 | "aab": { 45 | "type": "boolean", 46 | "default": false, 47 | "description": "(Android Only) When building, create an Android App Bundle (.aab file)." 48 | }, 49 | "keyStorePath": { 50 | "type": "string", 51 | "description": "(Android Only) When building, use the keystore file at this location." 52 | }, 53 | "keyStorePassword": { 54 | "type": "string", 55 | "description": "(Android Only) When building, use this keystore password." 56 | }, 57 | "keyStoreAlias": { 58 | "type": "string", 59 | "description": "(Android Only) When building, use this keystore alias." 60 | }, 61 | "keyStoreAliasPassword": { 62 | "type": "string", 63 | "description": "(Android Only) When building, use this keystore alias password." 64 | }, 65 | "copyTo": { 66 | "type": "string", 67 | "description": "When building, copy the package to this location." 68 | }, 69 | "android": { 70 | "type": "object", 71 | "aab": { 72 | "type": "boolean", 73 | "default": false, 74 | "description": "(Android Only) When building, create an Android App Bundle (.aab file)." 75 | }, 76 | "keyStorePath": { 77 | "type": "string", 78 | "description": "(Android Only) When building, use the keystore file at this location." 79 | }, 80 | "keyStorePassword": { 81 | "type": "string", 82 | "description": "(Android Only) When building, use this keystore password." 83 | }, 84 | "keyStoreAlias": { 85 | "type": "string", 86 | "description": "(Android Only) When building, use this keystore alias." 87 | }, 88 | "keyStoreAliasPassword": { 89 | "type": "string", 90 | "description": "(Android Only) When building, use this keystore alias password." 91 | }, 92 | "xmlUpdates": { 93 | "type": "object", 94 | "description": "Update any .xml value. Specify name of any filename with key/value pairs, e.g. { 'src/main/res/values/strings.xml': { app_name: 'MyApp', title_activity_kimera: 'MyApp' } }. Defaults to look in App_Resources/Android/{filepath} however you can specify relative path if located elsewhere." 95 | } 96 | }, 97 | "ios": { 98 | "type": "object", 99 | "required": [], 100 | "provision": { 101 | "type": "string", 102 | "description": "(iOS Only) When building, use this provision profile name." 103 | }, 104 | "plistUpdates": { 105 | "type": "object", 106 | "description": "Update any .plist value. Specify name of any filename with key/value pairs, e.g. { 'Info.plist': { CFBundleDisplayName: 'MyApp' } }. Defaults to look in App_Resources/iOS/{filepath} however you can specify relative path if located elsewhere." 107 | } 108 | }, 109 | "visionos": { 110 | "type": "object", 111 | "required": [], 112 | "provision": { 113 | "type": "string", 114 | "description": "(visionOS Only) When building, use this provision profile name." 115 | }, 116 | "plistUpdates": { 117 | "type": "object", 118 | "description": "Update any .plist value. Specify name of any filename with key/value pairs, e.g. { 'Info.plist': { CFBundleDisplayName: 'MyApp' } }. Defaults to look in App_Resources/visionOS/{filepath} however you can specify relative path if located elsewhere." 119 | } 120 | }, 121 | "device": { 122 | "type": "string", 123 | "description": "Device identifier to run app on.", 124 | "alias": "d" 125 | }, 126 | "emulator": { 127 | "type": "boolean", 128 | "default": false, 129 | "description": "Explicitly run with an emulator or simulator" 130 | }, 131 | "noHmr": { 132 | "type": "boolean", 133 | "default": false, 134 | "description": "Disable HMR" 135 | }, 136 | "uglify": { 137 | "type": "boolean", 138 | "default": false, 139 | "description": "Enable uglify during the webpack build" 140 | }, 141 | "release": { 142 | "type": "boolean", 143 | "default": false, 144 | "description": "Enable release mode during build using the --release flag" 145 | }, 146 | "forDevice": { 147 | "type": "boolean", 148 | "default": false, 149 | "description": "Build in device mode using the --for-device flag" 150 | }, 151 | "production": { 152 | "type": "boolean", 153 | "default": false, 154 | "description": "Build in production mode using the --env.production flag" 155 | }, 156 | "fileReplacements": { 157 | "description": "Replace files with other files in the build.", 158 | "type": "array", 159 | "items": { 160 | "type": "object", 161 | "properties": { 162 | "replace": { 163 | "type": "string", 164 | "description": "The file to be replaced." 165 | }, 166 | "with": { 167 | "type": "string", 168 | "description": "The file to replace with." 169 | } 170 | }, 171 | "additionalProperties": false, 172 | "required": [ 173 | "replace", 174 | "with" 175 | ] 176 | }, 177 | "default": [] 178 | }, 179 | "clean": { 180 | "type": "boolean", 181 | "default": false, 182 | "description": "Do a full project clean" 183 | }, 184 | "debug": { 185 | "type": "boolean", 186 | "default": true, 187 | "description": "Use 'ns debug' instead of 'ns run'. Defaults to true" 188 | }, 189 | "timeout": { 190 | "type": "number", 191 | "default": -1, 192 | "description": "Increase the default 90s timeout to connect to a device/simulator" 193 | }, 194 | "prepare": { 195 | "type": "boolean", 196 | "description": "Starts a Webpack compilation and prepares the app's App_Resources and the plugins platforms directories. The output is generated in a subdirectory for the selected target platform in the platforms directory. This lets you build the project for the selected platform.", 197 | "default": false 198 | }, 199 | "flags": { 200 | "type": "string", 201 | "description": "Extra flags to pass to the NativeScript CLI (e.g. '--env.config=myapp'). You can separate multiple flags by spaces and use '=' to join option/values (e.g. '--env.config=myapp --env.appComponents=myCustomActivity.ts" 202 | } 203 | } 204 | } -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/app-resources.ts: -------------------------------------------------------------------------------- 1 | import { Tree, generateFiles, joinPathFragments } from '@nx/devkit'; 2 | import { getDefaultTemplateOptions } from '../../utils'; 3 | 4 | import { Schema as AppResourcesSchema } from './schema'; 5 | 6 | export function appResources(tree: Tree, options: AppResourcesSchema) { 7 | generateFiles(tree, joinPathFragments(__dirname, 'files'), options.path, { 8 | ...getDefaultTemplateOptions(tree), 9 | name: options.name ?? 'App_Resources', 10 | }); 11 | } 12 | 13 | export default appResources; 14 | -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/compat.ts: -------------------------------------------------------------------------------- 1 | import { convertNxGenerator } from '@nx/devkit'; 2 | 3 | import { appResources } from './app-resources'; 4 | 5 | export default convertNxGenerator(appResources); 6 | -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/Android/app.gradle: -------------------------------------------------------------------------------- 1 | // You can add your native dependencies here 2 | dependencies { 3 | // implementation 'androidx.multidex:multidex:2.0.1' 4 | } 5 | 6 | android { 7 | compileSdkVersion 34 8 | buildToolsVersion "34" 9 | defaultConfig { 10 | minSdkVersion 23 11 | targetSdkVersion 34 12 | generatedDensities = [] 13 | } 14 | 15 | aaptOptions { 16 | additionalParameters "--no-version-vectors" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/Android/before-plugins.gradle: -------------------------------------------------------------------------------- 1 | // this configurations is loaded before building plugins, as well as before building 2 | // the app - this is where you can apply global settings and overrides 3 | 4 | project.ext { 5 | // androidXAppCompat = "1.4.1" 6 | // androidXExifInterface = "1.3.3" 7 | // androidXFragment = "1.4.1" 8 | // androidXMaterial = "1.5.0" 9 | // androidXMultidex = "2.0.1" 10 | // androidXTransition = "1.4.1" 11 | // androidXViewPager = "1.0.0" 12 | 13 | // useKotlin = true 14 | // kotlinVersion = "1.6.0" 15 | } 16 | -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/Android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 13 | 14 | 15 | 16 | 17 | 18 | 25 | 26 | 32 | 36 | 37 | 38 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/Android/src/main/res/drawable-hdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nx/282cd9ad800ef371caa76ef2839cf7a5cdd0b791/packages/nx/src/generators/app-resources/files/__name__/Android/src/main/res/drawable-hdpi/background.png -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/Android/src/main/res/drawable-hdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nx/282cd9ad800ef371caa76ef2839cf7a5cdd0b791/packages/nx/src/generators/app-resources/files/__name__/Android/src/main/res/drawable-hdpi/logo.png -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/Android/src/main/res/drawable-ldpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nx/282cd9ad800ef371caa76ef2839cf7a5cdd0b791/packages/nx/src/generators/app-resources/files/__name__/Android/src/main/res/drawable-ldpi/background.png -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/Android/src/main/res/drawable-ldpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nx/282cd9ad800ef371caa76ef2839cf7a5cdd0b791/packages/nx/src/generators/app-resources/files/__name__/Android/src/main/res/drawable-ldpi/logo.png -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/Android/src/main/res/drawable-mdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nx/282cd9ad800ef371caa76ef2839cf7a5cdd0b791/packages/nx/src/generators/app-resources/files/__name__/Android/src/main/res/drawable-mdpi/background.png -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/Android/src/main/res/drawable-mdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nx/282cd9ad800ef371caa76ef2839cf7a5cdd0b791/packages/nx/src/generators/app-resources/files/__name__/Android/src/main/res/drawable-mdpi/logo.png -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/Android/src/main/res/drawable-nodpi/splash_screen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/Android/src/main/res/drawable-xhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nx/282cd9ad800ef371caa76ef2839cf7a5cdd0b791/packages/nx/src/generators/app-resources/files/__name__/Android/src/main/res/drawable-xhdpi/background.png -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/Android/src/main/res/drawable-xhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nx/282cd9ad800ef371caa76ef2839cf7a5cdd0b791/packages/nx/src/generators/app-resources/files/__name__/Android/src/main/res/drawable-xhdpi/logo.png -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/Android/src/main/res/drawable-xxhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nx/282cd9ad800ef371caa76ef2839cf7a5cdd0b791/packages/nx/src/generators/app-resources/files/__name__/Android/src/main/res/drawable-xxhdpi/background.png -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/Android/src/main/res/drawable-xxhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nx/282cd9ad800ef371caa76ef2839cf7a5cdd0b791/packages/nx/src/generators/app-resources/files/__name__/Android/src/main/res/drawable-xxhdpi/logo.png -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/Android/src/main/res/drawable-xxxhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nx/282cd9ad800ef371caa76ef2839cf7a5cdd0b791/packages/nx/src/generators/app-resources/files/__name__/Android/src/main/res/drawable-xxxhdpi/background.png -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/Android/src/main/res/drawable-xxxhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nx/282cd9ad800ef371caa76ef2839cf7a5cdd0b791/packages/nx/src/generators/app-resources/files/__name__/Android/src/main/res/drawable-xxxhdpi/logo.png -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/Android/src/main/res/drawable/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 6 | 10 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/Android/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/Android/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nx/282cd9ad800ef371caa76ef2839cf7a5cdd0b791/packages/nx/src/generators/app-resources/files/__name__/Android/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/Android/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nx/282cd9ad800ef371caa76ef2839cf7a5cdd0b791/packages/nx/src/generators/app-resources/files/__name__/Android/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/Android/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nx/282cd9ad800ef371caa76ef2839cf7a5cdd0b791/packages/nx/src/generators/app-resources/files/__name__/Android/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/Android/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nx/282cd9ad800ef371caa76ef2839cf7a5cdd0b791/packages/nx/src/generators/app-resources/files/__name__/Android/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/Android/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nx/282cd9ad800ef371caa76ef2839cf7a5cdd0b791/packages/nx/src/generators/app-resources/files/__name__/Android/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/Android/src/main/res/values-v21/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #65ADF1 4 | -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/Android/src/main/res/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | 11 | 13 | 14 | 15 | 18 | 19 | 20 | 23 | 24 | 28 | -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/Android/src/main/res/values-v29/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 11 | 12 | -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/Android/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #F5F5F5 4 | #757575 5 | #65ADF1 6 | #272734 7 | -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/Android/src/main/res/values/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFFFFF 4 | -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/Android/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 17 | 18 | 20 | 21 | 22 | 29 | 30 | 32 | 33 | 34 | 39 | 40 | 42 | 43 | -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/Android/src/main/res/xml/file_paths.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 9 | 12 | 15 | 18 | -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images": [ 3 | { 4 | "size": "20x20", 5 | "idiom": "iphone", 6 | "filename": "icon-20@2x.png", 7 | "scale": "2x" 8 | }, 9 | { 10 | "size": "20x20", 11 | "idiom": "iphone", 12 | "filename": "icon-20@3x.png", 13 | "scale": "3x" 14 | }, 15 | { 16 | "size": "29x29", 17 | "idiom": "iphone", 18 | "filename": "icon-29.png", 19 | "scale": "1x" 20 | }, 21 | { 22 | "size": "29x29", 23 | "idiom": "iphone", 24 | "filename": "icon-29@2x.png", 25 | "scale": "2x" 26 | }, 27 | { 28 | "size": "29x29", 29 | "idiom": "iphone", 30 | "filename": "icon-29@3x.png", 31 | "scale": "3x" 32 | }, 33 | { 34 | "size": "40x40", 35 | "idiom": "iphone", 36 | "filename": "icon-40@2x.png", 37 | "scale": "2x" 38 | }, 39 | { 40 | "size": "40x40", 41 | "idiom": "iphone", 42 | "filename": "icon-40@3x.png", 43 | "scale": "3x" 44 | }, 45 | { 46 | "size": "60x60", 47 | "idiom": "iphone", 48 | "filename": "icon-60@2x.png", 49 | "scale": "2x" 50 | }, 51 | { 52 | "size": "60x60", 53 | "idiom": "iphone", 54 | "filename": "icon-60@3x.png", 55 | "scale": "3x" 56 | }, 57 | { 58 | "size": "20x20", 59 | "idiom": "ipad", 60 | "filename": "icon-20.png", 61 | "scale": "1x" 62 | }, 63 | { 64 | "size": "20x20", 65 | "idiom": "ipad", 66 | "filename": "icon-20@2x.png", 67 | "scale": "2x" 68 | }, 69 | { 70 | "size": "29x29", 71 | "idiom": "ipad", 72 | "filename": "icon-29.png", 73 | "scale": "1x" 74 | }, 75 | { 76 | "size": "29x29", 77 | "idiom": "ipad", 78 | "filename": "icon-29@2x.png", 79 | "scale": "2x" 80 | }, 81 | { 82 | "size": "40x40", 83 | "idiom": "ipad", 84 | "filename": "icon-40.png", 85 | "scale": "1x" 86 | }, 87 | { 88 | "size": "40x40", 89 | "idiom": "ipad", 90 | "filename": "icon-40@2x.png", 91 | "scale": "2x" 92 | }, 93 | { 94 | "size": "76x76", 95 | "idiom": "ipad", 96 | "filename": "icon-76.png", 97 | "scale": "1x" 98 | }, 99 | { 100 | "size": "76x76", 101 | "idiom": "ipad", 102 | "filename": "icon-76@2x.png", 103 | "scale": "2x" 104 | }, 105 | { 106 | "size": "83.5x83.5", 107 | "idiom": "ipad", 108 | "filename": "icon-83.5@2x.png", 109 | "scale": "2x" 110 | }, 111 | { 112 | "size": "1024x1024", 113 | "idiom": "ios-marketing", 114 | "filename": "icon-1024.png", 115 | "scale": "1x" 116 | } 117 | ], 118 | "info": { 119 | "version": 1, 120 | "author": "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nx/282cd9ad800ef371caa76ef2839cf7a5cdd0b791/packages/nx/src/generators/app-resources/files/__name__/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/iOS/Assets.xcassets/AppIcon.appiconset/icon-20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nx/282cd9ad800ef371caa76ef2839cf7a5cdd0b791/packages/nx/src/generators/app-resources/files/__name__/iOS/Assets.xcassets/AppIcon.appiconset/icon-20.png -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nx/282cd9ad800ef371caa76ef2839cf7a5cdd0b791/packages/nx/src/generators/app-resources/files/__name__/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nx/282cd9ad800ef371caa76ef2839cf7a5cdd0b791/packages/nx/src/generators/app-resources/files/__name__/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nx/282cd9ad800ef371caa76ef2839cf7a5cdd0b791/packages/nx/src/generators/app-resources/files/__name__/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nx/282cd9ad800ef371caa76ef2839cf7a5cdd0b791/packages/nx/src/generators/app-resources/files/__name__/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nx/282cd9ad800ef371caa76ef2839cf7a5cdd0b791/packages/nx/src/generators/app-resources/files/__name__/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nx/282cd9ad800ef371caa76ef2839cf7a5cdd0b791/packages/nx/src/generators/app-resources/files/__name__/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nx/282cd9ad800ef371caa76ef2839cf7a5cdd0b791/packages/nx/src/generators/app-resources/files/__name__/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nx/282cd9ad800ef371caa76ef2839cf7a5cdd0b791/packages/nx/src/generators/app-resources/files/__name__/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nx/282cd9ad800ef371caa76ef2839cf7a5cdd0b791/packages/nx/src/generators/app-resources/files/__name__/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nx/282cd9ad800ef371caa76ef2839cf7a5cdd0b791/packages/nx/src/generators/app-resources/files/__name__/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nx/282cd9ad800ef371caa76ef2839cf7a5cdd0b791/packages/nx/src/generators/app-resources/files/__name__/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nx/282cd9ad800ef371caa76ef2839cf7a5cdd0b791/packages/nx/src/generators/app-resources/files/__name__/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nx/282cd9ad800ef371caa76ef2839cf7a5cdd0b791/packages/nx/src/generators/app-resources/files/__name__/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/iOS/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info": { 3 | "version": 1, 4 | "author": "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images": [ 3 | { 4 | "idiom": "universal", 5 | "filename": "LaunchScreen-AspectFill.png", 6 | "scale": "1x" 7 | }, 8 | { 9 | "idiom": "universal", 10 | "filename": "LaunchScreen-AspectFill@2x.png", 11 | "scale": "2x" 12 | }, 13 | { 14 | "idiom": "universal", 15 | "filename": "LaunchScreen-AspectFill@3x.png", 16 | "scale": "3x" 17 | } 18 | ], 19 | "info": { 20 | "version": 1, 21 | "author": "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nx/282cd9ad800ef371caa76ef2839cf7a5cdd0b791/packages/nx/src/generators/app-resources/files/__name__/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nx/282cd9ad800ef371caa76ef2839cf7a5cdd0b791/packages/nx/src/generators/app-resources/files/__name__/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nx/282cd9ad800ef371caa76ef2839cf7a5cdd0b791/packages/nx/src/generators/app-resources/files/__name__/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@3x.png -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/iOS/Assets.xcassets/LaunchScreen.Center.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images": [ 3 | { 4 | "idiom": "universal", 5 | "filename": "LaunchScreen-Center.png", 6 | "scale": "1x" 7 | }, 8 | { 9 | "idiom": "universal", 10 | "filename": "LaunchScreen-Center@2x.png", 11 | "scale": "2x" 12 | }, 13 | { 14 | "idiom": "universal", 15 | "filename": "LaunchScreen-Center@3x.png", 16 | "scale": "3x" 17 | } 18 | ], 19 | "info": { 20 | "version": 1, 21 | "author": "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nx/282cd9ad800ef371caa76ef2839cf7a5cdd0b791/packages/nx/src/generators/app-resources/files/__name__/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nx/282cd9ad800ef371caa76ef2839cf7a5cdd0b791/packages/nx/src/generators/app-resources/files/__name__/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nx/282cd9ad800ef371caa76ef2839cf7a5cdd0b791/packages/nx/src/generators/app-resources/files/__name__/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@3x.png -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/iOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIRequiresFullScreen 28 | 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | ITSAppUsesNonExemptEncryption 47 | 48 | NSAppTransportSecurity 49 | 50 | NSAllowsArbitraryLoads 51 | 52 | NSAllowsArbitraryLoadsForMedia 53 | 54 | NSAllowsArbitraryLoadsInWebContent 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/iOS/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/files/__name__/iOS/build.xcconfig: -------------------------------------------------------------------------------- 1 | // You can add custom settings here 2 | // for example you can uncomment the following line to force distribution code signing 3 | // CODE_SIGN_IDENTITY = iPhone Distribution 4 | // To build for device with XCode you need to specify your development team. 5 | // DEVELOPMENT_TEAM = YOUR_TEAM_ID; 6 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 7 | -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/schema.d.ts: -------------------------------------------------------------------------------- 1 | export interface Schema { 2 | /** 3 | * Specifies the destination path. 4 | */ 5 | path: string; 6 | /** 7 | * Specifies the name of the App Resources folder. 8 | */ 9 | name?: string; 10 | } 11 | -------------------------------------------------------------------------------- /packages/nx/src/generators/app-resources/schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/schema", 3 | "$id": "nativescript-app-resources", 4 | "title": "NativeScript App Resources Options Schema", 5 | "type": "object", 6 | "properties": { 7 | "path": { 8 | "type": "string", 9 | "alias": "p" 10 | }, 11 | "name": { 12 | "type": "string", 13 | "alias": "n", 14 | "default": "App_Resources" 15 | } 16 | }, 17 | "required": ["path"] 18 | } 19 | -------------------------------------------------------------------------------- /packages/nx/src/generators/application/application.spec.ts: -------------------------------------------------------------------------------- 1 | import { readJson, readProjectConfiguration, Tree } from '@nx/devkit'; 2 | import { createTreeWithEmptyWorkspace } from '@nx/devkit/testing'; 3 | import { applicationGenerator } from './application'; 4 | import { angularVersion, nsAngularVersion, rxjsVersion, zonejsVersion } from '../../utils/versions'; 5 | 6 | describe('app', () => { 7 | let tree: Tree; 8 | 9 | beforeEach(() => { 10 | tree = createTreeWithEmptyWorkspace({ layout: 'apps-libs' }); 11 | }); 12 | 13 | it('should update project.json', async () => { 14 | await applicationGenerator(tree, { directory: 'apps/my-app' }); 15 | const config = readProjectConfiguration(tree, 'nativescript-my-app'); 16 | 17 | expect(config.root).toEqual('apps/nativescript-my-app'); 18 | }); 19 | 20 | it('should generate eslint config file', async () => { 21 | await applicationGenerator(tree, { directory: 'apps/my-app', linter: 'eslint' }); 22 | const config = readProjectConfiguration(tree, 'nativescript-my-app'); 23 | 24 | expect(tree.exists(`${config.root}/.eslintrc.json`)).toBeTruthy(); 25 | expect(tree.exists(`${config.root}/eslint.config.js`)).toBeFalsy(); 26 | }); 27 | 28 | it('should generate eslint config file for the flat config', async () => { 29 | process.env.ESLINT_USE_FLAT_CONFIG = 'true'; 30 | 31 | await applicationGenerator(tree, { directory: 'apps/my-app', linter: 'eslint' }); 32 | const config = readProjectConfiguration(tree, 'nativescript-my-app'); 33 | 34 | expect(tree.exists(`${config.root}/.eslintrc.json`)).toBeFalsy(); 35 | expect(tree.exists(`${config.root}/eslint.config.js`)).toBeTruthy(); 36 | 37 | delete process.env.ESLINT_USE_FLAT_CONFIG; 38 | }); 39 | 40 | it('should generate files', async () => { 41 | await applicationGenerator(tree, { directory: 'apps/my-app', framework: 'vanilla' }); 42 | 43 | expect(tree.exists(`apps/nativescript-my-app/src/app-root.xml`)).toBeTruthy(); 44 | expect(tree.exists(`apps/nativescript-my-app/src/main-page.ts`)).toBeTruthy(); 45 | checkFiles(tree, 'apps/nativescript-my-app'); 46 | }); 47 | 48 | it('nested in directory: should generate files', async () => { 49 | await applicationGenerator(tree, { directory: 'apps/mobile/my-app', framework: 'vanilla' }); 50 | 51 | expect(tree.exists(`apps/mobile/nativescript-my-app/src/app-root.xml`)).toBeTruthy(); 52 | expect(tree.exists(`apps/mobile/nativescript-my-app/src/main-page.ts`)).toBeTruthy(); 53 | checkFiles(tree, 'apps/mobile/nativescript-my-app', '../../../'); 54 | }); 55 | 56 | it('Angular with Routing: should generate files', async () => { 57 | await applicationGenerator(tree, { directory: 'apps/my-app', framework: 'angular', routing: true }); 58 | const packageJson = readJson(tree, `package.json`); 59 | 60 | checkAngularFiles(tree, 'apps/nativescript-my-app'); 61 | expect(tree.exists(`apps/nativescript-my-app/src/app.routing.ts`)).toBeTruthy(); 62 | expect(tree.exists(`apps/nativescript-my-app/src/features/home/home.module.ts`)).toBeTruthy(); 63 | // should also save framework as default in plugin settings 64 | expect(packageJson['nativescript-nx'].framework).toEqual('angular'); 65 | checkFiles(tree, 'apps/nativescript-my-app'); 66 | }); 67 | 68 | it('Angular without Routing: should generate files', async () => { 69 | await applicationGenerator(tree, { directory: 'apps/my-app', framework: 'angular', routing: false }); 70 | 71 | checkAngularFiles(tree, 'apps/nativescript-my-app'); 72 | expect(tree.exists(`apps/nativescript-my-app/src/app.routing.ts`)).toBeFalsy(); 73 | expect(tree.exists(`apps/nativescript-my-app/src/features/home/home.module.ts`)).toBeFalsy(); 74 | checkFiles(tree, 'apps/nativescript-my-app'); 75 | }); 76 | 77 | it('Angular nested in directory: should generate files', async () => { 78 | await applicationGenerator(tree, { directory: 'apps/mobile/my-app', framework: 'angular', routing: true }); 79 | 80 | checkAngularFiles(tree, 'apps/mobile/nativescript-my-app'); 81 | expect(tree.exists(`apps/mobile/nativescript-my-app/src/app.routing.ts`)).toBeTruthy(); 82 | expect(tree.exists(`apps/mobile/nativescript-my-app/src/features/home/home.module.ts`)).toBeTruthy(); 83 | checkFiles(tree, 'apps/mobile/nativescript-my-app', '../../../'); 84 | }); 85 | 86 | it('should add angular dependencies when framework is angular', async () => { 87 | await applicationGenerator(tree, { directory: 'apps/my-app', framework: 'angular' }); 88 | const packageJson = readJson(tree, `package.json`); 89 | 90 | expect(packageJson['dependencies']['@angular/animations']).toEqual(angularVersion); 91 | expect(packageJson['dependencies']['@angular/common']).toEqual(angularVersion); 92 | expect(packageJson['dependencies']['@angular/compiler']).toEqual(angularVersion); 93 | expect(packageJson['dependencies']['@angular/core']).toEqual(angularVersion); 94 | expect(packageJson['dependencies']['@angular/forms']).toEqual(angularVersion); 95 | expect(packageJson['dependencies']['@angular/platform-browser']).toEqual(angularVersion); 96 | expect(packageJson['dependencies']['@angular/platform-browser-dynamic']).toEqual(angularVersion); 97 | expect(packageJson['dependencies']['@angular/router']).toEqual(angularVersion); 98 | expect(packageJson['dependencies']['rxjs']).toEqual(rxjsVersion); 99 | expect(packageJson['dependencies']['zone.js']).toEqual(zonejsVersion); 100 | expect(packageJson['dependencies']['@nativescript/angular']).toEqual(nsAngularVersion); 101 | }); 102 | 103 | it('should not add angular dependencies when framework is not angular', async () => { 104 | await applicationGenerator(tree, { directory: 'apps/my-app', framework: void 0 }); 105 | const packageJson = readJson(tree, `package.json`); 106 | 107 | expect(packageJson['dependencies']['@angular/animations']).toBeFalsy(); 108 | expect(packageJson['dependencies']['@angular/common']).toBeFalsy(); 109 | expect(packageJson['dependencies']['@angular/compiler']).toBeFalsy(); 110 | expect(packageJson['dependencies']['@angular/core']).toBeFalsy(); 111 | expect(packageJson['dependencies']['@angular/forms']).toBeFalsy(); 112 | expect(packageJson['dependencies']['@angular/platform-browser']).toBeFalsy(); 113 | expect(packageJson['dependencies']['@angular/platform-browser-dynamic']).toBeFalsy(); 114 | expect(packageJson['dependencies']['@angular/router']).toBeFalsy(); 115 | expect(packageJson['dependencies']['rxjs']).toBeFalsy(); 116 | expect(packageJson['dependencies']['zone.js']).toBeFalsy(); 117 | expect(packageJson['dependencies']['@nativescript/angular']).toBeFalsy(); 118 | }); 119 | }); 120 | 121 | const checkFiles = (tree: Tree, appPath: string, relativeToRootPath = '../../') => { 122 | expect(tree.exists(`${appPath}/App_Resources/Android/app.gradle`)).toBeTruthy(); 123 | expect(tree.exists(`${appPath}/App_Resources/iOS/Info.plist`)).toBeTruthy(); 124 | 125 | const tsconfig = readJson(tree, `${appPath}/tsconfig.json`); 126 | expect(tsconfig.extends).toEqual(`${relativeToRootPath}tsconfig.base.json`); 127 | }; 128 | 129 | const checkAngularFiles = (tree: Tree, appPath: string) => { 130 | expect(tree.exists(`${appPath}/src/app.component.ts`)).toBeTruthy(); 131 | expect(tree.exists(`${appPath}/src/app.module.ts`)).toBeTruthy(); 132 | expect(tree.exists(`${appPath}/src/environments/environment.ts`)).toBeTruthy(); 133 | expect(tree.exists(`${appPath}/src/features/shared/shared.module.ts`)).toBeTruthy(); 134 | }; 135 | -------------------------------------------------------------------------------- /packages/nx/src/generators/application/application.ts: -------------------------------------------------------------------------------- 1 | import { Tree, addProjectConfiguration, runTasksInSerial, GeneratorCallback, formatFiles } from '@nx/devkit'; 2 | import { initGenerator as jsInitGenerator } from '@nx/js'; 3 | import { getAppNamingConvention, missingArgument, preRun, updatePluginDependencies, updatePluginSettings } from '../../utils'; 4 | import { appResources } from '../app-resources/app-resources'; 5 | import { assertNotUsingTsSolutionSetup } from '@nx/js/src/utils/typescript/ts-solution-setup'; 6 | import { normalizeOptions } from './lib/normalize-options'; 7 | import { addBuildTargetDefaults } from '@nx/devkit/src/generators/target-defaults-utils'; 8 | import { logShowProjectCommand } from '@nx/devkit/src/utils/log-show-project-command'; 9 | import { ApplicationSchema } from './schema'; 10 | import { createFiles } from './lib/create-files'; 11 | import { getProjectConfiguration } from './lib/project-json'; 12 | import { addLinting } from './lib/add-linting'; 13 | 14 | export async function applicationGenerator(tree: Tree, schema: ApplicationSchema) { 15 | assertNotUsingTsSolutionSetup(tree, 'nativescript', 'application'); 16 | 17 | if (!schema.directory) { 18 | throw new Error(missingArgument('name', 'Provide a directory for your NativeScript app.', 'nx g @nativescript/nx:app ')); 19 | } 20 | const commonOptions = preRun(tree, schema, true); 21 | schema = { ...schema, ...getAppNamingConvention(schema, 'nativescript') }; 22 | 23 | const options = await normalizeOptions(tree, schema); 24 | 25 | const tasks: GeneratorCallback[] = []; 26 | 27 | tasks.push( 28 | await jsInitGenerator(tree, { 29 | ...options, 30 | skipFormat: true, 31 | }) 32 | ); 33 | 34 | addBuildTargetDefaults(tree, options.buildExecutor); 35 | addProjectConfiguration(tree, options.name, getProjectConfiguration(options)); 36 | 37 | createFiles(tree, options); 38 | // add extra files per options 39 | // if (options.routing && ['angular'].includes(options.framework)) { 40 | // createFiles(tree, options, 'routing'); 41 | // } 42 | // add app resources 43 | appResources(tree, { 44 | path: options.projectRoot, 45 | }); 46 | 47 | tasks.push(await addLinting(tree, options)); 48 | 49 | updatePluginSettings(tree, options); 50 | tasks.push(updatePluginDependencies(tree, options)); 51 | 52 | if (!options.skipFormat) { 53 | await formatFiles(tree); 54 | } 55 | 56 | tasks.push(() => logShowProjectCommand(options.name)); 57 | 58 | return runTasksInSerial(...tasks); 59 | } 60 | 61 | export default applicationGenerator; 62 | -------------------------------------------------------------------------------- /packages/nx/src/generators/application/compat.ts: -------------------------------------------------------------------------------- 1 | import { convertNxGenerator } from '@nx/devkit'; 2 | 3 | import { applicationGenerator } from './application'; 4 | 5 | export default convertNxGenerator(applicationGenerator); 6 | -------------------------------------------------------------------------------- /packages/nx/src/generators/application/files_angular/__dot__gitignore: -------------------------------------------------------------------------------- 1 | # NativeScript 2 | hooks/ 3 | node_modules/ 4 | platforms/ 5 | 6 | # NativeScript Template 7 | *.js.map 8 | *.js 9 | !eslint.config.js 10 | !ngcc.config.js 11 | !webpack.config.js 12 | !tailwind.config.js 13 | !jest.config.js 14 | *.css 15 | 16 | # Logs 17 | logs 18 | *.log 19 | npm-debug.log* 20 | yarn-debug.log* 21 | yarn-error.log* 22 | 23 | # General 24 | .DS_Store 25 | .AppleDouble 26 | .LSOverride 27 | .idea 28 | .cloud 29 | .project 30 | tmp/ 31 | typings/ 32 | 33 | # misc 34 | npm-debug.log 35 | 36 | # app 37 | !*.d.ts 38 | /report/ 39 | .nsbuildinfo 40 | /temp/ 41 | 42 | package-lock.json 43 | !tools/** 44 | -------------------------------------------------------------------------------- /packages/nx/src/generators/application/files_angular/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | preset: '<%= projectRootOffset %>jest.preset.js', 3 | setupFilesAfterEnv: ['/src/test-setup.ts'], 4 | transform: { 5 | '^.+\\.[tj]s$': [ 6 | 'ts-jest', 7 | { 8 | stringifyContentPathRegex: '\\.(html|svg)$', 9 | astTransformers: ['jest-preset-angular/build/InlineFilesTransformer', 'jest-preset-angular/build/StripStylesTransformer'], 10 | tsconfig: '/tsconfig.spec.json', 11 | }, 12 | ], 13 | }, 14 | 15 | coverageDirectory: '<%= projectRootOffset %>coverage/<%= projectRoot %>', 16 | 17 | displayName: 'nativescript-safety', 18 | snapshotSerializers: [ 19 | 'jest-preset-angular/build/serializers/no-ng-attributes', 20 | 'jest-preset-angular/build/serializers/ng-snapshot', 21 | 'jest-preset-angular/build/serializers/html-comment', 22 | ], 23 | }; 24 | -------------------------------------------------------------------------------- /packages/nx/src/generators/application/files_angular/nativescript.config.ts__tmpl__: -------------------------------------------------------------------------------- 1 | import { NativeScriptConfig } from '@nativescript/core'; 2 | 3 | export default { 4 | id: 'org.nativescript.<%= utils.sanitize(baseName) %>', 5 | appResourcesPath: 'App_Resources', 6 | android: { 7 | v8Flags: '--expose_gc', 8 | markingMode: 'none', 9 | codeCache: true, 10 | suppressCallJSMethodExceptions: false 11 | }, 12 | ios: { 13 | discardUncaughtJsExceptions: false 14 | }, 15 | appPath: 'src', 16 | } as NativeScriptConfig; 17 | -------------------------------------------------------------------------------- /packages/nx/src/generators/application/files_angular/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "<%= utils.sanitize(baseName) %>", 3 | "main": "./src/main.ts", 4 | "license": "SEE LICENSE IN ", 5 | "version": "0.0.0", 6 | "dependencies": { 7 | "@nativescript/core": "*" 8 | }, 9 | "devDependencies": { 10 | "@nativescript/android": "<%= nsAndroidRuntimeVersion %>", 11 | "@nativescript/ios": "<%= nsIOSRuntimeVersion %>", 12 | "@nativescript/tailwind": "<%= nsTailwindVersion %>" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/nx/src/generators/application/files_angular/references.d.ts__tmpl__: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | -------------------------------------------------------------------------------- /packages/nx/src/generators/application/files_angular/src/app.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/nx/src/generators/application/files_angular/src/app.component.ts__tmpl__: -------------------------------------------------------------------------------- 1 | import { Component, NO_ERRORS_SCHEMA } from '@angular/core'; 2 | import { PageRouterOutlet } from '@nativescript/angular'; 3 | 4 | @Component({ 5 | selector: 'ns-app', 6 | templateUrl: './app.component.html', 7 | imports: [PageRouterOutlet], 8 | schemas: [NO_ERRORS_SCHEMA], 9 | }) 10 | export class AppComponent {} 11 | -------------------------------------------------------------------------------- /packages/nx/src/generators/application/files_angular/src/app.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; -------------------------------------------------------------------------------- /packages/nx/src/generators/application/files_angular/src/app.routes.ts__tmpl__: -------------------------------------------------------------------------------- 1 | import { Routes } from '@angular/router'; 2 | import { HomeComponent } from './features/home/home.component'; 3 | import { DetailComponent } from './features/detail/detail.component'; 4 | 5 | export const routes: Routes = [ 6 | { path: '', redirectTo: '/home', pathMatch: 'full' }, 7 | { path: 'home', component: HomeComponent }, 8 | { path: 'item/:id', component: DetailComponent }, 9 | ]; 10 | -------------------------------------------------------------------------------- /packages/nx/src/generators/application/files_angular/src/assets/images/nx-nativescript.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nx/282cd9ad800ef371caa76ef2839cf7a5cdd0b791/packages/nx/src/generators/application/files_angular/src/assets/images/nx-nativescript.png -------------------------------------------------------------------------------- /packages/nx/src/generators/application/files_angular/src/core/services/item.service.ts__tmpl__: -------------------------------------------------------------------------------- 1 | import { Injectable, signal } from '@angular/core' 2 | 3 | export interface Item { 4 | id: number 5 | name: string 6 | role: string 7 | } 8 | 9 | @Injectable({ 10 | providedIn: 'root', 11 | }) 12 | export class ItemService { 13 | items = signal([ 14 | { id: 1, name: 'NativeScript', role: 'Technology' }, 15 | { id: 2, name: 'Ter Stegen', role: 'Goalkeeper' }, 16 | { id: 3, name: 'Piqué', role: 'Defender' }, 17 | { id: 4, name: 'I. Rakitic', role: 'Midfielder' }, 18 | { id: 5, name: 'Sergio', role: 'Midfielder' }, 19 | { id: 6, name: 'Denis Suárez', role: 'Midfielder' }, 20 | { id: 7, name: 'Arda', role: 'Midfielder' }, 21 | { id: 8, name: 'A. Iniesta', role: 'Midfielder' }, 22 | { id: 9, name: 'Suárez', role: 'Forward' }, 23 | { id: 10, name: 'Messi', role: 'Forward' }, 24 | { id: 11, name: 'Neymar', role: 'Forward' }, 25 | { id: 12, name: 'Rafinha', role: 'Midfielder' }, 26 | { id: 13, name: 'Cillessen', role: 'Goalkeeper' }, 27 | { id: 14, name: 'Mascherano', role: 'Defender' }, 28 | { id: 17, name: 'Paco Alcácer', role: 'Forward' }, 29 | { id: 18, name: 'Jordi Alba', role: 'Defender' }, 30 | { id: 19, name: 'Digne', role: 'Defender' }, 31 | { id: 20, name: 'Sergi Roberto', role: 'Midfielder' }, 32 | { id: 21, name: 'André Gomes', role: 'Midfielder' }, 33 | { id: 22, name: 'Aleix Vidal', role: 'Midfielder' }, 34 | { id: 23, name: 'Umtiti', role: 'Defender' }, 35 | { id: 24, name: 'Mathieu', role: 'Defender' }, 36 | { id: 25, name: 'Masip', role: 'Goalkeeper' } 37 | ]); 38 | 39 | getItem(id: number): Item { 40 | return this.items().find((item) => item.id === id) 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /packages/nx/src/generators/application/files_angular/src/environments/environment.prod.ts__tmpl__: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /packages/nx/src/generators/application/files_angular/src/environments/environment.ts__tmpl__: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: false 3 | }; 4 | -------------------------------------------------------------------------------- /packages/nx/src/generators/application/files_angular/src/features/detail/detail.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /packages/nx/src/generators/application/files_angular/src/features/detail/detail.component.ts__tmpl__: -------------------------------------------------------------------------------- 1 | import { Component, NO_ERRORS_SCHEMA, OnInit, inject, signal } from '@angular/core'; 2 | import { ActivatedRoute } from '@angular/router'; 3 | import { NativeScriptCommonModule } from '@nativescript/angular'; 4 | import { ItemService, Item } from '../../core/services/item.service'; 5 | 6 | @Component({ 7 | selector: 'ns-detail', 8 | templateUrl: './detail.component.html', 9 | imports: [NativeScriptCommonModule], 10 | schemas: [NO_ERRORS_SCHEMA], 11 | }) 12 | export class DetailComponent implements OnInit { 13 | itemService = inject(ItemService); 14 | route = inject(ActivatedRoute); 15 | item = signal(null); 16 | 17 | ngOnInit(): void { 18 | const id = +this.route.snapshot.params.id; 19 | this.item.set(this.itemService.getItem(id)); 20 | 21 | // log the item to the console 22 | console.log(this.item()); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /packages/nx/src/generators/application/files_angular/src/features/home/home.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /packages/nx/src/generators/application/files_angular/src/features/home/home.component.ts__tmpl__: -------------------------------------------------------------------------------- 1 | import { Component, NO_ERRORS_SCHEMA, inject } from '@angular/core'; 2 | import { NativeScriptCommonModule, NativeScriptRouterModule } from '@nativescript/angular'; 3 | import { Page } from '@nativescript/core'; 4 | import { ItemService, Item } from '../../core/services/item.service'; 5 | 6 | @Component({ 7 | selector: 'ns-home', 8 | templateUrl: './home.component.html', 9 | imports: [NativeScriptCommonModule, NativeScriptRouterModule], 10 | schemas: [NO_ERRORS_SCHEMA], 11 | }) 12 | export class HomeComponent { 13 | itemService = inject(ItemService); 14 | page = inject(Page); 15 | 16 | constructor() { 17 | // Setup large titles on iOS 18 | this.page.on('loaded', (args) => { 19 | if (__IOS__) { 20 | const navigationController: UINavigationController = 21 | this.page.frame.ios.controller; 22 | navigationController.navigationBar.prefersLargeTitles = true; 23 | } 24 | }); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /packages/nx/src/generators/application/files_angular/src/fonts/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nx/282cd9ad800ef371caa76ef2839cf7a5cdd0b791/packages/nx/src/generators/application/files_angular/src/fonts/.gitkeep -------------------------------------------------------------------------------- /packages/nx/src/generators/application/files_angular/src/main.ts__tmpl__: -------------------------------------------------------------------------------- 1 | import { 2 | bootstrapApplication, 3 | provideNativeScriptHttpClient, 4 | provideNativeScriptNgZone, 5 | provideNativeScriptRouter, 6 | runNativeScriptAngularApp, 7 | } from '@nativescript/angular'; 8 | import { provideExperimentalZonelessChangeDetection } from '@angular/core'; 9 | import { withInterceptorsFromDi } from '@angular/common/http'; 10 | import { routes } from './app.routes'; 11 | import { AppComponent } from './app.component'; 12 | 13 | /** 14 | * Disable zone by setting this to true 15 | * Then also adjust polyfills.ts (see note there) 16 | */ 17 | const EXPERIMENTAL_ZONELESS = false; 18 | 19 | runNativeScriptAngularApp({ 20 | appModuleBootstrap: () => { 21 | return bootstrapApplication(AppComponent, { 22 | providers: [ 23 | provideNativeScriptHttpClient(withInterceptorsFromDi()), 24 | provideNativeScriptRouter(routes), 25 | EXPERIMENTAL_ZONELESS 26 | ? provideExperimentalZonelessChangeDetection() 27 | : provideNativeScriptNgZone(), 28 | ], 29 | }); 30 | }, 31 | }); 32 | -------------------------------------------------------------------------------- /packages/nx/src/generators/application/files_angular/src/polyfills.ts__tmpl__: -------------------------------------------------------------------------------- 1 | /** 2 | * NativeScript Polyfills 3 | */ 4 | 5 | // Install @nativescript/core polyfills (XHR, setTimeout, requestAnimationFrame) 6 | import '@nativescript/core/globals'; 7 | // Install @nativescript/angular specific polyfills 8 | import '@nativescript/angular/polyfills'; 9 | 10 | /** 11 | * Disable zone completely by removing the following 3 imports 12 | * alongside also adjusting main.ts to boot zoneless 13 | */ 14 | 15 | /** 16 | * Zone.js and patches 17 | */ 18 | // Add pre-zone.js patches needed for the NativeScript platform 19 | import '@nativescript/zone-js/dist/pre-zone-polyfills'; 20 | 21 | // Zone JS is required by default for Angular itself 22 | import 'zone.js'; 23 | 24 | // Add NativeScript specific Zone JS patches 25 | import '@nativescript/zone-js'; 26 | -------------------------------------------------------------------------------- /packages/nx/src/generators/application/files_angular/src/test-setup.ts__tmpl__: -------------------------------------------------------------------------------- 1 | import 'jest-preset-angular'; 2 | -------------------------------------------------------------------------------- /packages/nx/src/generators/application/files_angular/src/utils/index.ts__tmpl__: -------------------------------------------------------------------------------- 1 | export * from './status-bar'; -------------------------------------------------------------------------------- /packages/nx/src/generators/application/files_angular/src/utils/status-bar.ts__tmpl__: -------------------------------------------------------------------------------- 1 | import { Application, Color, Device, isIOS } from '@nativescript/core'; 2 | 3 | export function setStatusBarColor(color: 'light' | 'dark', tintColor?: string /* android only */) { 4 | if (isIOS) { 5 | // ios status-bar background color is set via the .action-bar class 6 | UIApplication.sharedApplication.setStatusBarStyleAnimated(color === 'light' ? UIStatusBarStyle.LightContent : UIStatusBarStyle.DarkContent, false); 7 | } else { 8 | const sdkVersion = parseInt(Device.sdkVersion); 9 | if (sdkVersion >= 21) { 10 | // android status-bar background color is set via additional programmatic api access 11 | // api level 21+ can programmatically change the status bar 12 | const activity: android.app.Activity = Application.android.foregroundActivity || Application.android.startActivity; 13 | activity.getWindow().clearFlags(android.view.WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); 14 | activity.getWindow().addFlags(android.view.WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); 15 | activity.getWindow().setStatusBarColor(new Color(tintColor).android); 16 | if (sdkVersion >= 23) { 17 | // api level 23+ can programmatically change the text color of the status bar 18 | // see here: https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_LIGHT_STATUS_BAR 19 | activity.getWindow().getDecorView().setSystemUiVisibility((android.view.View).SYSTEM_UI_FLAG_LIGHT_STATUS_BAR); 20 | } 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /packages/nx/src/generators/application/files_angular/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | content: ['./src/**/*.{css,xml,html,vue,svelte,ts,tsx}'], 4 | // use the .ns-dark class to control dark mode (applied by NativeScript) - since 'media' (default) is not supported. 5 | darkMode: ['class', '.ns-dark'], 6 | theme: { 7 | extend: {}, 8 | }, 9 | plugins: [], 10 | corePlugins: { 11 | preflight: false, // disables browser-specific resets 12 | }, 13 | }; 14 | -------------------------------------------------------------------------------- /packages/nx/src/generators/application/files_angular/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "<%= projectRootOffset %>dist/out-tsc", 5 | "types": [] 6 | }, 7 | "include": ["./src/environments/environment.*.ts"], 8 | "files": ["./references.d.ts", "./src/main.ts", "./src/polyfills.ts"] 9 | } 10 | -------------------------------------------------------------------------------- /packages/nx/src/generators/application/files_angular/tsconfig.editor.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "include": ["**/*.ts"], 4 | "compilerOptions": { 5 | "types": ["jest", "node"] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/nx/src/generators/application/files_angular/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "<%= projectRootOffset %>tsconfig.base.json", 3 | "files": [], 4 | "include": [], 5 | "references": [ 6 | { 7 | "path": "./tsconfig.app.json" 8 | }, 9 | { 10 | "path": "./tsconfig.spec.json" 11 | }, 12 | { 13 | "path": "./tsconfig.editor.json" 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /packages/nx/src/generators/application/files_angular/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "<%= projectRootOffset %>dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "files": ["src/test-setup.ts"], 9 | "include": ["**/*.spec.ts", "**/*.d.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /packages/nx/src/generators/application/files_angular/webpack.config.js: -------------------------------------------------------------------------------- 1 | const webpack = require('@nativescript/webpack'); 2 | 3 | module.exports = (env) => { 4 | webpack.init(env); 5 | webpack.useConfig('angular'); 6 | 7 | return webpack.resolveConfig(); 8 | }; 9 | -------------------------------------------------------------------------------- /packages/nx/src/generators/application/files_vanilla/__dot__gitignore: -------------------------------------------------------------------------------- 1 | # NativeScript 2 | hooks/ 3 | node_modules/ 4 | platforms/ 5 | 6 | # NativeScript Template 7 | *.js.map 8 | *.js 9 | !eslint.config.js 10 | !webpack.config.js 11 | !tailwind.config.js 12 | 13 | # Logs 14 | logs 15 | *.log 16 | npm-debug.log* 17 | yarn-debug.log* 18 | yarn-error.log* 19 | 20 | # General 21 | .DS_Store 22 | .AppleDouble 23 | .LSOverride 24 | .idea 25 | .cloud 26 | .project 27 | tmp/ 28 | typings/ 29 | 30 | # misc 31 | npm-debug.log 32 | 33 | # app 34 | !*.d.ts 35 | !src/assets/fontawesome.min.css 36 | !eslint.config.js 37 | !webpack.config.js 38 | /report/ 39 | .nsbuildinfo 40 | /temp/ 41 | /src/tns_modules/ 42 | 43 | # app uses platform specific scss which can inadvertently get renamed which will cause problems 44 | app/app.scss 45 | 46 | package-lock.json 47 | !tools/** 48 | -------------------------------------------------------------------------------- /packages/nx/src/generators/application/files_vanilla/nativescript.config.ts__tmpl__: -------------------------------------------------------------------------------- 1 | import { NativeScriptConfig } from '@nativescript/core'; 2 | 3 | export default { 4 | id: 'org.nativescript.<%= utils.sanitize(baseName) %>', 5 | appResourcesPath: 'App_Resources', 6 | android: { 7 | v8Flags: '--expose_gc', 8 | markingMode: 'none', 9 | codeCache: true, 10 | suppressCallJSMethodExceptions: false 11 | }, 12 | ios: { 13 | discardUncaughtJsExceptions: false 14 | }, 15 | appPath: 'src', 16 | } as NativeScriptConfig; 17 | -------------------------------------------------------------------------------- /packages/nx/src/generators/application/files_vanilla/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "main": "./src/app.ts", 3 | "description": "NativeScript Application", 4 | "license": "SEE LICENSE IN ", 5 | "repository": "", 6 | "dependencies": { 7 | "@nativescript/core": "*" 8 | }, 9 | "devDependencies": { 10 | "@nativescript/android": "<%= nsAndroidRuntimeVersion %>", 11 | "@nativescript/ios": "<%= nsIOSRuntimeVersion %>", 12 | "@nativescript/tailwind": "<%= nsTailwindVersion %>" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/nx/src/generators/application/files_vanilla/references.d.ts__tmpl__: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | -------------------------------------------------------------------------------- /packages/nx/src/generators/application/files_vanilla/src/app-root.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /packages/nx/src/generators/application/files_vanilla/src/app.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; -------------------------------------------------------------------------------- /packages/nx/src/generators/application/files_vanilla/src/app.ts__tmpl__: -------------------------------------------------------------------------------- 1 | import { Application } from "@nativescript/core"; 2 | 3 | Application.run({ moduleName: "app-root" }); -------------------------------------------------------------------------------- /packages/nx/src/generators/application/files_vanilla/src/environments/environment.prod.ts__tmpl__: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /packages/nx/src/generators/application/files_vanilla/src/environments/environment.ts__tmpl__: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: false 3 | }; 4 | -------------------------------------------------------------------------------- /packages/nx/src/generators/application/files_vanilla/src/main-page.ts__tmpl__: -------------------------------------------------------------------------------- 1 | import { EventData, Page } from '@nativescript/core'; 2 | import { HelloWorldModel } from "./main-view-model"; 3 | 4 | export function navigatingTo(args: EventData) { 5 | const page = args.object; 6 | page.bindingContext = new HelloWorldModel(); 7 | } 8 | -------------------------------------------------------------------------------- /packages/nx/src/generators/application/files_vanilla/src/main-page.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |