Skip to content

fix: launchView handling #40

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,28 @@
# @nativescript/angular 12
# @nativescript/angular 12+

For usage with NativeScript for Angular 12+ projects.

Clean and setup workspace:

```
yarn clean.all
```

Build angular package:
## Build packages:

```
nx run angular:build
yarn build
```

Run angular demo:
## Run demo:

```
nx run nativescript-demo-ng:ios
```

## Unit tests for iOS and Android:

```
yarn test.android
yarn test.ios
```
3 changes: 3 additions & 0 deletions apps/nativescript-demo-ng/nativescript.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,7 @@ export default {
discardUncaughtJsExceptions: true,
},
appPath: 'src',
cli: {
packageManager: 'npm',
},
} as NativeScriptConfig;
6 changes: 3 additions & 3 deletions apps/nativescript-demo-ng/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
},
"dependencies": {
"@nativescript/angular": "file:../../packages/angular",
"@nativescript/core": "~8.1.0"
"@nativescript/core": "file:../../node_modules/@nativescript/core"
},
"devDependencies": {
"@nativescript/android": "8.0.0",
"@nativescript/ios": "8.1.0",
"@nativescript/android": "~8.1.1",
"@nativescript/ios": "~8.1.0",
"@nativescript/unit-test-runner": "^2.0.5"
}
}
82 changes: 82 additions & 0 deletions apps/nativescript-demo-ng/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
{
"root": "apps/nativescript-demo-ng/",
"sourceRoot": "apps/nativescript-demo-ng/src",
"projectType": "application",
"prefix": "nativescript",
"generators": {
"@schematics/angular:component": {
"styleext": "scss"
}
},
"targets": {
"build": {
"executor": "@nativescript/nx:build",
"options": {
"noHmr": true,
"production": true,
"uglify": true,
"release": true,
"forDevice": true
},
"configurations": {
"prod": {
"fileReplacements": [
{
"replace": "./src/environments/environment.ts",
"with": "./src/environments/environment.prod.ts"
}
]
}
}
},
"ios": {
"executor": "@nativescript/nx:build",
"options": {
"platform": "ios"
},
"configurations": {
"build": {
"copyTo": "./dist/build.ipa"
},
"prod": {
"combineWithConfig": "build:prod"
}
}
},
"android": {
"executor": "@nativescript/nx:build",
"options": {
"platform": "android"
},
"configurations": {
"build": {
"copyTo": "./dist/build.apk"
},
"prod": {
"combineWithConfig": "build:prod"
}
}
},
"clean": {
"executor": "@nativescript/nx:build",
"options": {
"clean": true
}
},
"lint": {
"executor": "@nrwl/linter:eslint",
"options": {
"lintFilePatterns": ["apps/nativescript-demo-ng/**/*.ts", "apps/nativescript-demo-ng/src/**/*.html"]
}
},
"test": {
"executor": "@nrwl/workspace:run-commands",
"options": {
"commands": ["ns test {args.platform}"],
"cwd": "apps/nativescript-demo-ng",
"parallel": false
}
}
},
"tags": []
}
2 changes: 1 addition & 1 deletion apps/nativescript-demo-ng/src/test-setup.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import 'jest-preset-angular';
import 'jest-preset-angular/setup-jest';
12 changes: 6 additions & 6 deletions apps/nativescript-demo-ng/tools/xplat-postinstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@ const childProcess = require('child_process');
// Copy potential hooks from root dependencies to app
const hooksSrc = '../../hooks';
const hooksDest = 'hooks';
console.info('Copying ' + hooksSrc + ' -> ' + hooksDest);
try {
fs.copySync(hooksSrc, hooksDest);
} catch (err) {
// ignore
}

// Helpful to trigger ngcc after an install to ensure all has processed properly
const ngccPath = path.join('..', '..', 'node_modules', '.bin', 'ngcc');
const ngccPath = require.resolve('@angular/compiler-cli/ngcc/main-ngcc.js');
const child = childProcess.spawn(ngccPath, ['--tsconfig', 'tsconfig.app.json', '--properties', 'es2015', 'module', 'main', '--first-only'], {
cwd: process.cwd(),
stdio: 'inherit',
shell: process.platform == 'win32'
shell: process.platform == 'win32',
});
child.on('close', (code) => {

child.stdout.setEncoding('utf8');
child.stdout.on('data', function (data) {
console.log(data);
});

Loading