| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [View Raw Code] [Original HTTPS Page] |
The repository contains several packages and apps:
Working with the repo is organized with npm scripts, go and read through the scripts section in the package.json.
Managing dependencies:
Clone (or fork/clone) the repo and run setup script:
git clone https://github.com/NativeScript/NativeScript.git
cd NativeScript
npm run setupAfter the initial setup you can run the tests with:
cd tests
tns run android | iosYou can do changes in the test app and nativescript-core and rely on HMR to re-run tests.
There are couple of application used for development and testing. The ui-test-app is the more frequently used for development and validation. It is an ordinary NativeScript app that logs the test results on the go.
After the initial setup run the e2e apps with:
cd e2e/<app-name>
# Run the Android app
tns platform add android@next
tns run android
# Run the iOS app
tns platform add ios@next
tns run iosNote: NOTE: do not commit changes in the runtime versions to e2e/<app-name>/package.json
Link both the nativescript-core folders and the generated compatibility package (dist\tns-core-modules):
npm i <path-to-nativescript-repo>/nativescript-core --save
npm i <path-to-nativescript-repo>/dist/tns-core-modules --saveYou can do changes in the app code and nativescript-core and rely on HMR to refresh the app.
Use the same steps as with TS application. However, the configuration of JS application does not include loading and transpiling TS code. You need to transpile the TS code in nativescript-core yourself. The following npm script will run tsc in watch mode in nativescript-core (run it in a separate terminal so that you can do tns run in parallel):
npm run tsc-core-watch Linking tns-core-modules and @nativescript/core in Angular applications does not work at the moment. Check #7905 for more details on the issue.
You can the following npm script to build and link the tns-core-modules-widgets package.
npm run setup-widgetsThis script will build the tns-core-modules-widgets package and link it inside the nativescript-core so it will be used for running the tests and e2e apps.
Note: NOTE: do not commit changes in the tns-core-modules-widgets dependency in the nativescript-core/package.json
Run node unit tests with:
npm run unit-test
or run tests in watch mode:
npm run unit-test-watch
To update the platform declarations (the ios.d.ts-es) you can run:
npm install npm run dev-declarations
This script will update the iOS declarations. Android tools are not integrated yet. The declarations are generated from the test app and will include the native code from tns-core-modules-widgets.
The following will build the API reference pages in bin/dist/apiref:
npm run typedoc
If you want to improve on the documentation you can also build and start up dev web server:
npm run dev-typedoc
The terminal will point the address you can open in your web browser.
| Back | FazBrowse Home | New Git URL |