Skip to content

Sgyubastiller/ivy-testing-in-nativescript

Repository files navigation

Repo build step

Execute:

  • npm run prepare-repo

Test with local packages:

  • Start ngcc with npm run start-ngcc
  • Observe the output of the compilation and hope for no errors :)

Test with latest online packages:

  • Update the deps of the test project by executing npm run use-latest-deps
  • Start ngcc with npm run start-ngcc
  • Observe the output of the compilation and hope for no errors :)

To reset the project and start from scratch simply execute npm run cleanup (this removed the node_modules of the test project, make sure to call npm run install-test-proj-deps after it)

Notes/questions

The only package we are planning to update for the moment and make compatible with Ivy is nativescript-anguar because it is the main package that contains Angular related code. In the future we want all plugins that contains Angular directives to be Ivy compatible in the same way (example nativescript-picker https://github.com/NativeScript/nativescript-picker/tree/master/src/angular) We are aiming to use the “CommonJS” path of Ivy support using ngcc

Current issues:

“Expected array when reading the NgModule.declarations of NativeScriptCommonModule”

Current testing environment:

NativeScript-like app with Angular (package.json containing the deps of a real {N} + Angular app) created from template (tns create test-ivy —ng) with removed {N} related files/folders (not important for ngcc) and updated to the following dependencies: Dependencies:

"dependencies": {
  "@angular/animations": "8.1.0",
  "@angular/common": "8.1.0",
  "@angular/compiler": "8.1.0",
  "@angular/core": "8.1.0",
  "@angular/forms": "8.1.0",
  "@angular/http": "8.0.0-beta.10",
  "@angular/platform-browser": "8.1.0",
  "@angular/platform-browser-dynamic": "8.1.0",
  "@angular/router": "8.1.0",
  "nativescript-angular": "file:../dist/nativescript-angular-8.2.0.tgz",
  "nativescript-theme-core": "1.0.4",
  "reflect-metadata": "0.1.12",
  "rxjs": "6.5.0",
  "tns-core-modules": "file:../dist/tns-core-modules-6.1.0.tgz",
  "zone.js": "0.9.1"
},
"devDependencies": {
  "@angular/compiler-cli": "8.1.0",
  "@ngtools/webpack": "8.1.0",
  "nativescript-dev-webpack": "1.0.0",
  "typescript": "3.4.5"
}

ngcc-config.js:

module.exports = {
    entryPoints: {
        '.':
        {
            override:
            {
                main: "./index.js",
                typings: "./index.d.ts"
            }
        }
    }
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published