├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md └── PULL_REQUEST_TEMPLATE.md ├── .gitignore ├── .npmignore ├── .nycrc ├── .vscode ├── launch.json └── tasks.json ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── PULL_REQUEST_TESTS.md ├── README.md ├── android-app-components-loader.js ├── androidProjectHelpers.js ├── apply-css-loader.js ├── bin ├── generate-android-snapshot ├── generate-android-snapshot.cmd ├── install-ns-webpack ├── install-ns-webpack.cmd ├── ns-bundle ├── ns-bundle.cmd ├── ns-verify-bundle ├── ns-verify-bundle.cmd ├── ns-webpack-update.cmd ├── remove-ns-webpack ├── remove-ns-webpack.cmd └── update-ns-webpack ├── build └── prepublish.js ├── bundle-config-loader.spec.ts ├── bundle-config-loader.ts ├── css2json-loader.spec.ts ├── css2json-loader.ts ├── demo ├── .gitignore ├── AngularApp │ ├── .gitignore │ ├── .vscode │ │ └── launch.json │ ├── app │ │ ├── App_Resources │ │ │ ├── Android │ │ │ │ ├── app.gradle │ │ │ │ └── src │ │ │ │ │ └── main │ │ │ │ │ ├── AndroidManifest.xml │ │ │ │ │ └── res │ │ │ │ │ ├── drawable-hdpi │ │ │ │ │ ├── background.png │ │ │ │ │ ├── icon.png │ │ │ │ │ └── logo.png │ │ │ │ │ ├── drawable-ldpi │ │ │ │ │ ├── background.png │ │ │ │ │ ├── icon.png │ │ │ │ │ └── logo.png │ │ │ │ │ ├── drawable-mdpi │ │ │ │ │ ├── background.png │ │ │ │ │ ├── icon.png │ │ │ │ │ └── logo.png │ │ │ │ │ ├── drawable-nodpi │ │ │ │ │ └── splash_screen.xml │ │ │ │ │ ├── drawable-xhdpi │ │ │ │ │ ├── background.png │ │ │ │ │ ├── icon.png │ │ │ │ │ └── logo.png │ │ │ │ │ ├── drawable-xxhdpi │ │ │ │ │ ├── background.png │ │ │ │ │ ├── icon.png │ │ │ │ │ └── logo.png │ │ │ │ │ ├── drawable-xxxhdpi │ │ │ │ │ ├── background.png │ │ │ │ │ ├── icon.png │ │ │ │ │ └── logo.png │ │ │ │ │ ├── values-v21 │ │ │ │ │ ├── colors.xml │ │ │ │ │ └── styles.xml │ │ │ │ │ └── values │ │ │ │ │ ├── colors.xml │ │ │ │ │ └── styles.xml │ │ │ └── iOS │ │ │ │ ├── Assets.xcassets │ │ │ │ ├── AppIcon.appiconset │ │ │ │ │ ├── Contents.json │ │ │ │ │ ├── icon-1024.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 │ │ │ │ ├── LaunchImage.launchimage │ │ │ │ │ ├── Contents.json │ │ │ │ │ ├── Default-568h@2x.png │ │ │ │ │ ├── Default-667h@2x.png │ │ │ │ │ ├── Default-736h@3x.png │ │ │ │ │ ├── Default-Landscape.png │ │ │ │ │ ├── Default-Landscape@2x.png │ │ │ │ │ ├── Default-Landscape@3x.png │ │ │ │ │ ├── Default-Portrait.png │ │ │ │ │ ├── Default-Portrait@2x.png │ │ │ │ │ ├── Default.png │ │ │ │ │ └── Default@2x.png │ │ │ │ ├── LaunchScreen.AspectFill.imageset │ │ │ │ │ ├── Contents.json │ │ │ │ │ ├── LaunchScreen-AspectFill.png │ │ │ │ │ └── LaunchScreen-AspectFill@2x.png │ │ │ │ └── LaunchScreen.Center.imageset │ │ │ │ │ ├── Contents.json │ │ │ │ │ ├── LaunchScreen-Center.png │ │ │ │ │ └── LaunchScreen-Center@2x.png │ │ │ │ ├── Info.plist │ │ │ │ ├── LaunchScreen.storyboard │ │ │ │ └── build.xcconfig │ │ ├── README.md │ │ ├── activity.android.ts │ │ ├── app.android.css │ │ ├── app.component.html │ │ ├── app.component.ts │ │ ├── app.ios.css │ │ ├── app.module.ngfactory.d.ts │ │ ├── app.module.ts │ │ ├── app.routing.ts │ │ ├── application.android.ts │ │ ├── application.d.ts │ │ ├── directive │ │ │ ├── PlayfulSpirit.android.ts │ │ │ ├── PlayfulSpirit.d.ts │ │ │ ├── PlayfulSpirit.ios.ts │ │ │ └── package.json │ │ ├── item │ │ │ ├── item-detail.component.html │ │ │ ├── item-detail.component.ts │ │ │ ├── item.service.ts │ │ │ ├── item.ts │ │ │ ├── items.component.android.html │ │ │ ├── items.component.android.scss │ │ │ ├── items.component.ios.html │ │ │ ├── items.component.ios.scss │ │ │ └── items.component.ts │ │ ├── main.aot.ts │ │ ├── main.ts │ │ ├── ninjas │ │ │ ├── details │ │ │ │ ├── ninja.component.ts │ │ │ │ ├── ninja.module.ts │ │ │ │ └── ninja.routes.ts │ │ │ ├── ninjas.component.ts │ │ │ ├── ninjas.module.ts │ │ │ └── ninjas.routes.ts │ │ └── package.json │ ├── custom-application-activity.webpack.config.js │ ├── e2e │ │ ├── resources │ │ │ └── images │ │ │ │ └── AngularApp │ │ │ │ ├── android │ │ │ │ └── style.png │ │ │ │ └── ios │ │ │ │ └── style.png │ │ ├── setup.ts │ │ ├── tests.e2e-spec.ts │ │ └── tsconfig.json │ ├── nsconfig.json │ ├── package.json │ ├── tsconfig.json │ └── tsconfig.tns.json ├── JavaScriptApp │ ├── .gitignore │ ├── app │ │ ├── App_Resources │ │ │ ├── Android │ │ │ │ ├── app.gradle │ │ │ │ └── src │ │ │ │ │ └── main │ │ │ │ │ ├── AndroidManifest.xml │ │ │ │ │ └── res │ │ │ │ │ ├── drawable-hdpi │ │ │ │ │ ├── background.png │ │ │ │ │ ├── icon.png │ │ │ │ │ └── logo.png │ │ │ │ │ ├── drawable-ldpi │ │ │ │ │ ├── background.png │ │ │ │ │ ├── icon.png │ │ │ │ │ └── logo.png │ │ │ │ │ ├── drawable-mdpi │ │ │ │ │ ├── background.png │ │ │ │ │ ├── icon.png │ │ │ │ │ └── logo.png │ │ │ │ │ ├── drawable-nodpi │ │ │ │ │ └── splash_screen.xml │ │ │ │ │ ├── drawable-xhdpi │ │ │ │ │ ├── background.png │ │ │ │ │ ├── icon.png │ │ │ │ │ └── logo.png │ │ │ │ │ ├── drawable-xxhdpi │ │ │ │ │ ├── background.png │ │ │ │ │ ├── icon.png │ │ │ │ │ └── logo.png │ │ │ │ │ ├── drawable-xxxhdpi │ │ │ │ │ ├── background.png │ │ │ │ │ ├── icon.png │ │ │ │ │ └── logo.png │ │ │ │ │ ├── values-v21 │ │ │ │ │ ├── colors.xml │ │ │ │ │ └── styles.xml │ │ │ │ │ └── values │ │ │ │ │ ├── colors.xml │ │ │ │ │ └── styles.xml │ │ │ └── iOS │ │ │ │ ├── Assets.xcassets │ │ │ │ ├── AppIcon.appiconset │ │ │ │ │ ├── Contents.json │ │ │ │ │ ├── icon-1024.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 │ │ │ │ ├── LaunchImage.launchimage │ │ │ │ │ ├── Contents.json │ │ │ │ │ ├── Default-568h@2x.png │ │ │ │ │ ├── Default-667h@2x.png │ │ │ │ │ ├── Default-736h@3x.png │ │ │ │ │ ├── Default-Landscape.png │ │ │ │ │ ├── Default-Landscape@2x.png │ │ │ │ │ ├── Default-Landscape@3x.png │ │ │ │ │ ├── Default-Portrait.png │ │ │ │ │ ├── Default-Portrait@2x.png │ │ │ │ │ ├── Default.png │ │ │ │ │ └── Default@2x.png │ │ │ │ ├── LaunchScreen.AspectFill.imageset │ │ │ │ │ ├── Contents.json │ │ │ │ │ ├── LaunchScreen-AspectFill.png │ │ │ │ │ └── LaunchScreen-AspectFill@2x.png │ │ │ │ └── LaunchScreen.Center.imageset │ │ │ │ │ ├── Contents.json │ │ │ │ │ ├── LaunchScreen-Center.png │ │ │ │ │ └── LaunchScreen-Center@2x.png │ │ │ │ ├── Info.plist │ │ │ │ ├── LaunchScreen.storyboard │ │ │ │ └── build.xcconfig │ │ ├── activity.android.js │ │ ├── app-root.xml │ │ ├── app.android.css │ │ ├── app.common.css │ │ ├── app.ios.css │ │ ├── app.js │ │ ├── application.android.js │ │ ├── main-page.android.js │ │ ├── main-page.android.scss │ │ ├── main-page.android.xml │ │ ├── main-page.ios.js │ │ ├── main-page.ios.scss │ │ ├── main-page.ios.xml │ │ ├── main-view-model.js │ │ ├── package.json │ │ ├── references.d.ts │ │ └── views │ │ │ ├── second-page.css │ │ │ ├── second-page.js │ │ │ └── second-page.xml │ ├── custom-application-activity.webpack.config.js │ ├── e2e │ │ ├── resources │ │ │ └── images │ │ │ │ └── JavaScriptApp │ │ │ │ ├── android │ │ │ │ └── style.png │ │ │ │ └── ios │ │ │ │ └── style.png │ │ ├── setup.js │ │ └── tests.e2e-spec.js │ ├── nsconfig.json │ └── package.json ├── TypeScriptApp │ ├── .gitignore │ ├── .vscode │ │ └── launch.json │ ├── app │ │ ├── App_Resources │ │ │ ├── Android │ │ │ │ ├── app.gradle │ │ │ │ └── src │ │ │ │ │ └── main │ │ │ │ │ ├── AndroidManifest.xml │ │ │ │ │ └── res │ │ │ │ │ ├── drawable-hdpi │ │ │ │ │ ├── background.png │ │ │ │ │ ├── icon.png │ │ │ │ │ └── logo.png │ │ │ │ │ ├── drawable-ldpi │ │ │ │ │ ├── background.png │ │ │ │ │ ├── icon.png │ │ │ │ │ └── logo.png │ │ │ │ │ ├── drawable-mdpi │ │ │ │ │ ├── background.png │ │ │ │ │ ├── icon.png │ │ │ │ │ └── logo.png │ │ │ │ │ ├── drawable-nodpi │ │ │ │ │ └── splash_screen.xml │ │ │ │ │ ├── drawable-xhdpi │ │ │ │ │ ├── background.png │ │ │ │ │ ├── icon.png │ │ │ │ │ └── logo.png │ │ │ │ │ ├── drawable-xxhdpi │ │ │ │ │ ├── background.png │ │ │ │ │ ├── icon.png │ │ │ │ │ └── logo.png │ │ │ │ │ ├── drawable-xxxhdpi │ │ │ │ │ ├── background.png │ │ │ │ │ ├── icon.png │ │ │ │ │ └── logo.png │ │ │ │ │ ├── values-v21 │ │ │ │ │ ├── colors.xml │ │ │ │ │ └── styles.xml │ │ │ │ │ └── values │ │ │ │ │ ├── colors.xml │ │ │ │ │ └── styles.xml │ │ │ └── iOS │ │ │ │ ├── Assets.xcassets │ │ │ │ ├── AppIcon.appiconset │ │ │ │ │ ├── Contents.json │ │ │ │ │ ├── icon-1024.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 │ │ │ │ ├── LaunchImage.launchimage │ │ │ │ │ ├── Contents.json │ │ │ │ │ ├── Default-568h@2x.png │ │ │ │ │ ├── Default-667h@2x.png │ │ │ │ │ ├── Default-736h@3x.png │ │ │ │ │ ├── Default-Landscape.png │ │ │ │ │ ├── Default-Landscape@2x.png │ │ │ │ │ ├── Default-Landscape@3x.png │ │ │ │ │ ├── Default-Portrait.png │ │ │ │ │ ├── Default-Portrait@2x.png │ │ │ │ │ ├── Default.png │ │ │ │ │ └── Default@2x.png │ │ │ │ ├── LaunchScreen.AspectFill.imageset │ │ │ │ │ ├── Contents.json │ │ │ │ │ ├── LaunchScreen-AspectFill.png │ │ │ │ │ └── LaunchScreen-AspectFill@2x.png │ │ │ │ └── LaunchScreen.Center.imageset │ │ │ │ │ ├── Contents.json │ │ │ │ │ ├── LaunchScreen-Center.png │ │ │ │ │ └── LaunchScreen-Center@2x.png │ │ │ │ ├── Info.plist │ │ │ │ ├── LaunchScreen.storyboard │ │ │ │ └── build.xcconfig │ │ ├── README.md │ │ ├── activity.android.ts │ │ ├── app-root.xml │ │ ├── app.android.scss │ │ ├── app.ios.scss │ │ ├── app.ts │ │ ├── application.android.ts │ │ ├── application.d.ts │ │ ├── main-page.android.scss │ │ ├── main-page.android.ts │ │ ├── main-page.android.xml │ │ ├── main-page.ios.scss │ │ ├── main-page.ios.ts │ │ ├── main-page.ios.xml │ │ ├── main-view-model.ts │ │ ├── package.json │ │ └── views │ │ │ ├── second-page.css │ │ │ ├── second-page.ts │ │ │ └── second-page.xml │ ├── custom-application-activity.webpack.config.js │ ├── e2e │ │ ├── resources │ │ │ └── images │ │ │ │ └── TypeScriptApp │ │ │ │ ├── android │ │ │ │ └── style.png │ │ │ │ └── ios │ │ │ │ └── style.png │ │ ├── setup.ts │ │ ├── tests.e2e-spec.ts │ │ └── tsconfig.json │ ├── nsconfig.json │ ├── package.json │ ├── tsconfig.json │ └── tsconfig.tns.json └── config │ ├── appium.capabilities.json │ └── mocha.opts ├── dependencyManager.js ├── hmr ├── hmr-update.ts ├── hot-loader.ts └── index.ts ├── host └── resolver.ts ├── hot-loader-helper.js ├── hot.js ├── index.js ├── index.spec.ts ├── installer.js ├── jasmine-config ├── jasmine.json └── reporter.ts ├── lazy-ngmodule-hot-loader.js ├── lib ├── after-prepare.js ├── before-checkForChanges.js └── utils.js ├── load-application-css-angular.js ├── load-application-css-regular.js ├── load-application-css.js ├── markup-hot-loader.js ├── merge-guidance-schema.png ├── moduleid-compat-loader.js ├── nativescript-target ├── NsJsonpChunkTemplatePlugin.js ├── NsJsonpMainTemplate.runtime.js ├── NsJsonpMainTemplatePlugin.js ├── NsJsonpTemplatePlugin.js └── index.js ├── package.json ├── plugins ├── GenerateBundleStarterPlugin.js ├── GenerateNativeScriptEntryPointsPlugin.js ├── NativeScriptAngularCompilerPlugin.ts ├── NativeScriptSnapshotPlugin │ ├── index.js │ └── options.json ├── PlatformFSPlugin.ts ├── PlatformSuffixPlugin.js ├── WatchStateLoggerPlugin.ts └── index.js ├── postinstall.js ├── preuninstall.js ├── projectFilesManager.js ├── projectHelpers.js ├── projectHelpers.spec.js ├── release-contribution-guide-schema-webpack.png ├── script-hot-loader.js ├── snapshot └── android │ ├── project-snapshot-generator-cli-ags-parser.js │ ├── project-snapshot-generator.js │ ├── snapshot-generator-tools │ ├── bundle-ending.js │ ├── bundle-preamble.js │ ├── include.gradle │ └── ndk-build │ │ ├── .gitignore │ │ └── jni │ │ └── Android.mk │ ├── snapshot-generator.js │ └── utils.js ├── style-hot-loader.js ├── templates ├── tsconfig.tns.json ├── webpack.angular.js ├── webpack.config.spec.ts ├── webpack.javascript.js ├── webpack.typescript.js └── webpack.vue.js ├── transformers ├── ns-replace-bootstrap.spec.ts ├── ns-replace-bootstrap.ts ├── ns-replace-lazy-loader.spec.ts ├── ns-replace-lazy-loader.ts ├── ns-support-hmr-ng.spec.ts └── ns-support-hmr-ng.ts ├── tsconfig.json ├── unit-testing-config-loader.js ├── utils ├── ast-utils.ts ├── transformers-utils.ts └── tsconfig-utils.ts ├── verify └── update.js ├── xml-namespace-loader.spec.ts └── xml-namespace-loader.ts /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: 'We really appreciate your effort to provide feedback. Before opening a new 4 | issue, please make sure that this case is not already reported in GitHub as an 5 | issue or in StackOverflow as a question.' 6 | 7 | --- 8 | 9 | **Environment** 10 | Provide version numbers for the following components (information can be retrieved by running `tns info` in your project folder or by inspecting the `package.json` of the project): 11 | - CLI: 12 | - Cross-platform modules: 13 | - Android Runtime: 14 | - iOS Runtime: 15 | - Plugin(s): 16 | - Node.js: 17 | 18 | - [ ] Please, attach your package.json and webpack.config.js as these configurations are usually critical for investigating issues with webpack 19 | 20 | 21 | **Describe the bug** 22 | 23 | 24 | **To Reproduce** 25 | 26 | 27 | **Expected behavior** 28 | 29 | **Sample project** 30 | 31 | 32 | **Additional context** 33 | 34 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | 5 | --- 6 | 7 | **Is your feature request related to a problem? Please describe.** 8 | 9 | 10 | **Describe the solution you'd like** 11 | 12 | 13 | **Describe alternatives you've considered** 14 | 15 | 16 | **Additional context** 17 | 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | node_modules 3 | *.tgz 4 | package-lock.json 5 | *.js.map 6 | 7 | plugins/NativeScriptAngularCompilerPlugin.d.ts 8 | plugins/NativeScriptAngularCompilerPlugin.js 9 | 10 | transformers/*.d.ts 11 | transformers/*.js 12 | 13 | utils/*.d.ts 14 | utils/*.js 15 | 16 | hmr/*.d.ts 17 | hmr/*.js 18 | 19 | plugins/PlatformFSPlugin.d.ts 20 | plugins/PlatformFSPlugin.js 21 | 22 | plugins/WatchStateLoggerPlugin.d.ts 23 | plugins/WatchStateLoggerPlugin.js 24 | 25 | host/resolver.d.ts 26 | host/resolver.js 27 | 28 | jasmine-config/reporter.d.ts 29 | jasmine-config/reporter.js 30 | 31 | bundle-config-loader.d.ts 32 | bundle-config-loader.js 33 | 34 | xml-namespace-loader.d.ts 35 | xml-namespace-loader.js 36 | 37 | css2json-loader.d.ts 38 | css2json-loader.js 39 | 40 | **/*.spec.js* 41 | **/*.spec.d.ts* 42 | 43 | hooks 44 | .DS_Store 45 | .nyc_output 46 | coverage 47 | !projectHelpers.spec.js 48 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | build 2 | demo 3 | 4 | *.ts 5 | !*.d.ts 6 | 7 | *.spec.* 8 | .vscode/ 9 | .github/ 10 | .nyc_output 11 | coverage/ 12 | jasmine-config/ 13 | CONTRIBUTING.md 14 | CODE_OF_CONDUCT.md 15 | PULL_REQUEST_TESTS.md 16 | 17 | *.tgz 18 | -------------------------------------------------------------------------------- /.nycrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@istanbuljs/nyc-config-typescript", 3 | "exclude": ["/demo/**"], 4 | "reporter": ["text", "lcov"] 5 | } -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "type": "node", 6 | "request": "launch", 7 | "name": "Test", 8 | "program": "${workspaceFolder}/node_modules/jasmine/bin/jasmine.js", 9 | "args": [ 10 | "--config=jasmine-config/jasmine.json" 11 | ], 12 | "preLaunchTask": "npm:tsc" 13 | }, 14 | { 15 | "type": "node", 16 | "request": "launch", 17 | "name": "AngularApp Webpack", 18 | "cwd": "${workspaceFolder}/demo/AngularApp", 19 | "program": "${workspaceFolder}/demo/AngularApp/node_modules/.bin/webpack", 20 | "args": [ "--env.android", "--env.aot" ], 21 | "runtimeArgs": [ "--preserve-symlinks" ], 22 | "stopOnEntry": true, 23 | }, 24 | { 25 | "type": "node", 26 | "request": "launch", 27 | "name": "TypeScriptApp Webpack", 28 | "cwd": "${workspaceFolder}/demo/TypeScriptApp", 29 | "program": "${workspaceFolder}/demo/TypeScriptApp/node_modules/.bin/webpack", 30 | "args": [ "--env.android" ], 31 | "stopOnEntry": true, 32 | "preLaunchTask": "npm:tsc" 33 | } 34 | ] 35 | } -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the tasks.json format 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "label":"npm:tsc", 8 | "type": "npm", 9 | "script": "tsc", 10 | "problemMatcher": [] 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /PULL_REQUEST_TESTS.md: -------------------------------------------------------------------------------- 1 | This document describes comment messages available to execute tests on pull request. 2 | 3 | |Comment |Commit Status Context|Description| 4 | |:----------------------:|:-------------------:|:---------:| 5 | |`run ci` | |Run all below.| 6 | |`js`|ci/jenkins/webpack-js|Pack the *nativescript-dev-webpack* plugin and bundle the [template-hello-world](https://github.com/NativeScript/template-hello-world) template app. | 7 | |`ts`|ci/jenkins/webpack-ts|Pack the *nativescript-dev-webpack* plugin and bundle the [template-hello-world-ts](https://github.com/NativeScript/template-hello-world-ts) template app.| 8 | |`ng`|ci/jenkins/webpack-ng|Pack the *nativescript-dev-webpack* plugin and bundle the [template-hello-world-ng](https://github.com/NativeScript/template-hello-world-ng) template app.| 9 | |`groceries`|ci/jenkins/webpack-groceries|Pack the *nativescript-dev-webpack* plugin and bundle the [Groceries](https://github.com/NativeScript/sample-Groceries) app. | 10 | |`sdk`|ci/jenkins/webpack-sdk|Pack the *nativescript-dev-webpack* plugin and bundle the [SDK](https://github.com/NativeScript/nativescript-sdk-examples-ng) app. | 11 | |`testsappng`|ci/jenkins/webpack-testsappng|Pack the *nativescript-dev-webpack* plugin and bundle the [tests-app-ng](https://github.com/NativeScript/tests-app-ng) app. | 12 | -------------------------------------------------------------------------------- /android-app-components-loader.js: -------------------------------------------------------------------------------- 1 | const { convertSlashesInPath } = require("./projectHelpers"); 2 | 3 | module.exports = function (source, map) { 4 | this.cacheable(); 5 | const { modules } = this.query; 6 | const imports = modules.map(convertSlashesInPath) 7 | .map(m => `require("${m}");`).join("\n"); 8 | const augmentedSource = ` 9 | let applicationCheckPlatform = require("tns-core-modules/application"); 10 | if (applicationCheckPlatform.android && !global["__snapshot"]) { 11 | ${imports} 12 | } 13 | 14 | ${source} 15 | `; 16 | 17 | this.callback(null, augmentedSource, map); 18 | }; 19 | -------------------------------------------------------------------------------- /apply-css-loader.js: -------------------------------------------------------------------------------- 1 | const cssLoaderWarning = "The apply-css-loader expects the file to be pre-processed by css-loader. It might not work properly. Please check your webpack configuration"; 2 | 3 | function checkForCssLoader(loaders, loaderIndex) { 4 | if (!loaders) { 5 | return false; 6 | } 7 | 8 | for (var i = loaderIndex + 1; i < loaders.length; i++) { 9 | const loader = loaders[i]; 10 | if (loader.path && loader.path.indexOf("css-loader") > 0) { 11 | return true; 12 | } 13 | } 14 | 15 | return false; 16 | } 17 | 18 | module.exports = function (content, map) { 19 | if (this.request.match(/\/app\.(css|scss|less|sass)$/)) { 20 | return content; 21 | } 22 | 23 | // Emit a warning if the file was not processed by the css-loader. 24 | if (!checkForCssLoader(this.loaders, this.loaderIndex)) { 25 | this.emitWarning(new Error(cssLoaderWarning)); 26 | } 27 | 28 | content += ` 29 | const application = require("tns-core-modules/application"); 30 | require("tns-core-modules/ui/styling/style-scope"); 31 | 32 | if (typeof exports.forEach === "function") { 33 | exports.forEach(cssExport => { 34 | if (cssExport.length > 1 && cssExport[1]) { 35 | // applying the second item of the export as it contains the css contents 36 | application.addCss(cssExport[1]); 37 | } 38 | }); 39 | } 40 | `; 41 | 42 | this.callback(null, content, map); 43 | } 44 | -------------------------------------------------------------------------------- /bin/generate-android-snapshot: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | const ProjectSnapshotGenerator = require("../snapshot/android/project-snapshot-generator"); 3 | const args = require("../snapshot/android/project-snapshot-generator-cli-ags-parser")(); 4 | 5 | const generator = new ProjectSnapshotGenerator(args); 6 | generator.generate(args); 7 | -------------------------------------------------------------------------------- /bin/generate-android-snapshot.cmd: -------------------------------------------------------------------------------- 1 | @node %~dp0\generate-android-snapshot %* 2 | -------------------------------------------------------------------------------- /bin/install-ns-webpack: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | const installer = require("../installer"); 3 | installer.install(); 4 | -------------------------------------------------------------------------------- /bin/install-ns-webpack.cmd: -------------------------------------------------------------------------------- 1 | @node %~dp0\install-ns-webpack %* 2 | -------------------------------------------------------------------------------- /bin/ns-bundle: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | console.error("Using npm run scripts is no longer supported. Use CLI commands instead.\nExample:\ntns build android") 4 | process.exit(1); -------------------------------------------------------------------------------- /bin/ns-bundle.cmd: -------------------------------------------------------------------------------- 1 | @node %~dp0\ns-bundle %* 2 | -------------------------------------------------------------------------------- /bin/ns-verify-bundle.cmd: -------------------------------------------------------------------------------- 1 | @node %~dp0\ns-verify-bundle %* 2 | -------------------------------------------------------------------------------- /bin/ns-webpack-update.cmd: -------------------------------------------------------------------------------- 1 | @node %~dp0\ns-webpack-update %* 2 | -------------------------------------------------------------------------------- /bin/remove-ns-webpack: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | const installer = require("../installer"); 3 | installer.uninstall(); 4 | -------------------------------------------------------------------------------- /bin/remove-ns-webpack.cmd: -------------------------------------------------------------------------------- 1 | @node %~dp0\remove-ns-webpack %* 2 | -------------------------------------------------------------------------------- /bin/update-ns-webpack: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | const update = require("../verify/update"); 4 | 5 | const { original: npmArgs = [] } = JSON.parse(process.env.npm_config_argv || "{}"); 6 | const [, , ...processArgs ] = process.argv; 7 | 8 | const flags = [ ...npmArgs, ...processArgs ] 9 | .filter(f => f.startsWith("--")) 10 | .map(f => f.substring(2)); 11 | 12 | function addOption(all, current) { 13 | all[current] = true; 14 | return all; 15 | } 16 | 17 | const options = flags.reduce(addOption, {}); 18 | 19 | update(options); 20 | 21 | -------------------------------------------------------------------------------- /build/prepublish.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | const { dirname: pathDirname } = require("path"); 4 | const { getPackageJson, writePackageJson } = require("../projectHelpers"); 5 | 6 | let processArgs = process.argv; 7 | const distTag = processArgs.includes("--distTag") ? processArgs[processArgs.indexOf("--distTag") + 1] : undefined; 8 | 9 | const tag = distTag || process.env["distTag"] || "next"; 10 | 11 | const projectDir = pathDirname(__dirname); 12 | const packageJson = getPackageJson(projectDir); 13 | 14 | if (distTag) { 15 | processArgs = processArgs.splice(processArgs.indexOf("--distTag"), 2); 16 | } 17 | const [, , packageVersion = new Date()] = processArgs; 18 | 19 | packageJson.publishConfig = Object.assign( 20 | packageJson.publishConfig || {}, 21 | { tag } 22 | ); 23 | 24 | delete packageJson.private; 25 | 26 | const currentVersion = packageJson.version; 27 | const nextVersion = `${currentVersion}-${packageVersion}`; 28 | const newPackageJson = Object.assign(packageJson, { version: nextVersion }); 29 | 30 | writePackageJson(newPackageJson, projectDir); 31 | -------------------------------------------------------------------------------- /css2json-loader.ts: -------------------------------------------------------------------------------- 1 | import { parse, Import, Stylesheet } from "css"; 2 | import { loader } from "webpack"; 3 | import { getOptions, urlToRequest } from "loader-utils"; 4 | 5 | const betweenQuotesPattern = /('|")(.*?)\1/; 6 | const unpackUrlPattern = /url\(([^\)]+)\)/; 7 | const inlineLoader = "!nativescript-dev-webpack/css2json-loader?useForImports!" 8 | 9 | const loader: loader.Loader = function (content: string, map) { 10 | const options = getOptions(this) || {}; 11 | const inline = !!options.useForImports; 12 | const requirePrefix = inline ? inlineLoader : ""; 13 | 14 | const ast = parse(content, undefined); 15 | 16 | let dependencies = []; 17 | getImportRules(ast) 18 | .map(extractUrlFromRule) 19 | .map(createRequireUri) 20 | .forEach(({ uri, requireURI }) => { 21 | dependencies.push(`global.registerModule("${uri}", () => require("${requirePrefix}${requireURI}"));`); 22 | 23 | // Call registerModule with requireURI to handle cases like @import "~@nativescript/theme/css/blue.css"; 24 | if (uri !== requireURI) { 25 | dependencies.push(`global.registerModule("${requireURI}", () => require("${requirePrefix}${requireURI}"));`); 26 | } 27 | }); 28 | const str = JSON.stringify(ast, (k, v) => k === "position" ? undefined : v); 29 | this.callback(null, `${dependencies.join("\n")}module.exports = ${str};`, map); 30 | } 31 | 32 | function getImportRules(ast: Stylesheet): Import[] { 33 | if (!ast || (ast).type !== "stylesheet" || !ast.stylesheet) { 34 | return []; 35 | } 36 | return ast.stylesheet.rules 37 | .filter(rule => rule.type === "import" && (rule).import) 38 | } 39 | 40 | /** 41 | * Extracts the url from import rule (ex. `url("./platform.css")`) 42 | */ 43 | function extractUrlFromRule(importRule: Import): string { 44 | const urlValue = importRule.import; 45 | 46 | const unpackedUrlMatch = urlValue.match(unpackUrlPattern); 47 | const unpackedValue = unpackedUrlMatch ? unpackedUrlMatch[1] : urlValue 48 | 49 | const quotesMatch = unpackedValue.match(betweenQuotesPattern); 50 | return quotesMatch ? quotesMatch[2] : unpackedValue; 51 | }; 52 | 53 | function createRequireUri(uri): { uri: string, requireURI: string } { 54 | return { 55 | uri: uri, 56 | requireURI: urlToRequest(uri) 57 | }; 58 | } 59 | 60 | 61 | 62 | export default loader; -------------------------------------------------------------------------------- /demo/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | platforms 3 | testapp 4 | *-report.* 5 | 6 | hooks 7 | report 8 | 9 | **/*.map 10 | 11 | reports/ 12 | test-results.xml 13 | 14 | tsconfig.aot.json 15 | 16 | vendor.js 17 | vendor.ts 18 | 19 | tsconfig.esm.json 20 | mochawesome-report 21 | webpack.config.js -------------------------------------------------------------------------------- /demo/AngularApp/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | platforms 3 | hooks 4 | 5 | app/**/*.js 6 | e2e/**/*.js 7 | e2e/**/*.map 8 | e2e/reports/ 9 | test-results.xml 10 | 11 | app/item/items.component.android.css 12 | app/item/items.component.ios.css 13 | mochawesome-report -------------------------------------------------------------------------------- /demo/AngularApp/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "type": "node", 9 | "request": "launch", 10 | "name": "Debug", 11 | "program": "${workspaceFolder}/node_modules/mocha/bin/_mocha", 12 | "args": [ 13 | "-u", 14 | "tdd", 15 | "--timeout", 16 | "999999", 17 | "--colors", 18 | "--opts", 19 | "../config/mocha.opts", 20 | "android" 21 | ], 22 | "internalConsoleOptions": "openOnSessionStart" 23 | }, 24 | { 25 | "type": "node", 26 | "request": "launch", 27 | "name": "Launch Program", 28 | "program": "${file}" 29 | } 30 | ] 31 | } 32 | -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/Android/app.gradle: -------------------------------------------------------------------------------- 1 | // Add your native dependencies here: 2 | 3 | // Uncomment to add recyclerview-v7 dependency 4 | //dependencies { 5 | // compile 'com.android.support:recyclerview-v7:+' 6 | //} 7 | 8 | android { 9 | defaultConfig { 10 | generatedDensities = [] 11 | } 12 | aaptOptions { 13 | additionalParameters "--no-version-vectors" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/Android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | 21 | 27 | 28 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/Android/src/main/res/drawable-hdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/AngularApp/app/App_Resources/Android/src/main/res/drawable-hdpi/background.png -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/Android/src/main/res/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/AngularApp/app/App_Resources/Android/src/main/res/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/Android/src/main/res/drawable-hdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/AngularApp/app/App_Resources/Android/src/main/res/drawable-hdpi/logo.png -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/Android/src/main/res/drawable-ldpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/AngularApp/app/App_Resources/Android/src/main/res/drawable-ldpi/background.png -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/Android/src/main/res/drawable-ldpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/AngularApp/app/App_Resources/Android/src/main/res/drawable-ldpi/icon.png -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/Android/src/main/res/drawable-ldpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/AngularApp/app/App_Resources/Android/src/main/res/drawable-ldpi/logo.png -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/Android/src/main/res/drawable-mdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/AngularApp/app/App_Resources/Android/src/main/res/drawable-mdpi/background.png -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/Android/src/main/res/drawable-mdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/AngularApp/app/App_Resources/Android/src/main/res/drawable-mdpi/icon.png -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/Android/src/main/res/drawable-mdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/AngularApp/app/App_Resources/Android/src/main/res/drawable-mdpi/logo.png -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/Android/src/main/res/drawable-nodpi/splash_screen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/Android/src/main/res/drawable-xhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/AngularApp/app/App_Resources/Android/src/main/res/drawable-xhdpi/background.png -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/AngularApp/app/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/AngularApp/app/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/AngularApp/app/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/AngularApp/app/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/AngularApp/app/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/AngularApp/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/AngularApp/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/AngularApp/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/Android/src/main/res/values-v21/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3d5afe 4 | -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/Android/src/main/res/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 11 | 14 | 15 | 16 | 19 | 20 | 23 | -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/Android/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #F5F5F5 4 | #757575 5 | #33B5E5 6 | #272734 7 | -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/Android/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 18 | 19 | 21 | 22 | 23 | 31 | 32 | 34 | 35 | 36 | 42 | 43 | 45 | 46 | -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "29x29", 5 | "idiom" : "iphone", 6 | "filename" : "icon-29.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "29x29", 11 | "idiom" : "iphone", 12 | "filename" : "icon-29@2x.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "icon-29@3x.png", 19 | "scale" : "3x" 20 | }, 21 | { 22 | "size" : "40x40", 23 | "idiom" : "iphone", 24 | "filename" : "icon-40@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "40x40", 29 | "idiom" : "iphone", 30 | "filename" : "icon-40@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "60x60", 35 | "idiom" : "iphone", 36 | "filename" : "icon-60@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "60x60", 41 | "idiom" : "iphone", 42 | "filename" : "icon-60@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "29x29", 47 | "idiom" : "ipad", 48 | "filename" : "icon-29.png", 49 | "scale" : "1x" 50 | }, 51 | { 52 | "size" : "29x29", 53 | "idiom" : "ipad", 54 | "filename" : "icon-29@2x.png", 55 | "scale" : "2x" 56 | }, 57 | { 58 | "size" : "40x40", 59 | "idiom" : "ipad", 60 | "filename" : "icon-40.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "40x40", 65 | "idiom" : "ipad", 66 | "filename" : "icon-40@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "76x76", 71 | "idiom" : "ipad", 72 | "filename" : "icon-76.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "76x76", 77 | "idiom" : "ipad", 78 | "filename" : "icon-76@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "83.5x83.5", 83 | "idiom" : "ipad", 84 | "filename" : "icon-83.5@2x.png", 85 | "scale" : "2x" 86 | }, 87 | { 88 | "size" : "1024x1024", 89 | "idiom" : "ios-marketing", 90 | "filename" : "icon-1024.png", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/AngularApp/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/AngularApp/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/AngularApp/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/AngularApp/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/AngularApp/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/AngularApp/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/AngularApp/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/AngularApp/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/AngularApp/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/AngularApp/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/AngularApp/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/AngularApp/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/iOS/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/AngularApp/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/AngularApp/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/AngularApp/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/AngularApp/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/AngularApp/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/AngularApp/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/AngularApp/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/AngularApp/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/AngularApp/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/AngularApp/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/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 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/AngularApp/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/AngularApp/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/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 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/AngularApp/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/AngularApp/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/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 | 47 | 48 | -------------------------------------------------------------------------------- /demo/AngularApp/app/App_Resources/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 8 you need to specify your development team. More info: https://developer.apple.com/library/prerelease/content/releasenotes/DeveloperTools/RN-Xcode/Introduction.html 5 | // DEVELOPMENT_TEAM = YOUR_TEAM_ID; 6 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 7 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 8 | -------------------------------------------------------------------------------- /demo/AngularApp/app/README.md: -------------------------------------------------------------------------------- 1 | # NativeScript Angular Template 2 | 3 | This template creates a "Hello, world" NativeScript app using TypeScript and Angular. 4 | 5 | You can create a new app that uses this template with either the `--template` option. 6 | 7 | ``` 8 | tns create my-app-name --template tns-template-hello-world-ng 9 | ``` 10 | 11 | Or the `--ng` shorthand. 12 | 13 | ``` 14 | tns create my-app-name --ng 15 | ``` 16 | 17 | > Note: Both commands will create a new NativeScript app that uses the latest version of this template published to [npm] (https://www.npmjs.com/package/tns-template-hello-world-ng). 18 | 19 | If you want to create a new app that uses the source of the template from the `master` branch, you can execute the following: 20 | 21 | ``` 22 | tns create my-app-name --template https://github.com/NativeScript/template-hello-world-ng.git#master 23 | ``` 24 | 25 | **NB:** Please, have in mind that the master branch may refer to dependencies that are not on NPM yet! 26 | -------------------------------------------------------------------------------- /demo/AngularApp/app/activity.android.ts: -------------------------------------------------------------------------------- 1 | import { setActivityCallbacks, AndroidActivityCallbacks } from "tns-core-modules/ui/frame"; 2 | 3 | @JavaProxy("org.myApp.MainActivity") 4 | class Activity extends androidx.appcompat.app.AppCompatActivity { 5 | public isNativeScriptActivity: boolean; 6 | private _callbacks: AndroidActivityCallbacks; 7 | 8 | protected onCreate(savedInstanceState: any): void { // android.os.Bundle 9 | // Set isNativeScriptActivity in onCreate (as done in the original NativeScript activity code). 10 | // The JS constructor might not be called because the activity is created from Android. 11 | this.isNativeScriptActivity = true; 12 | 13 | if (!this._callbacks) { 14 | setActivityCallbacks(this); 15 | } 16 | 17 | this._callbacks.onCreate(this, savedInstanceState, this.getIntent(), super.onCreate); 18 | } 19 | 20 | protected onSaveInstanceState(outState: any): void { // android.os.Bundle 21 | this._callbacks.onSaveInstanceState(this, outState, super.onSaveInstanceState); 22 | } 23 | 24 | protected onStart(): void { 25 | this._callbacks.onStart(this, super.onStart); 26 | } 27 | 28 | protected onStop(): void { 29 | this._callbacks.onStop(this, super.onStop); 30 | } 31 | 32 | protected onDestroy(): void { 33 | this._callbacks.onDestroy(this, super.onDestroy); 34 | } 35 | 36 | public onBackPressed(): void { 37 | this._callbacks.onBackPressed(this, super.onBackPressed); 38 | } 39 | 40 | public onRequestPermissionsResult(requestCode: number, permissions: Array, grantResults: Array): void { 41 | this._callbacks.onRequestPermissionsResult(this, requestCode, permissions, grantResults, undefined /*TODO: Enable if needed*/); 42 | } 43 | 44 | protected onActivityResult(requestCode: number, resultCode: number, data: any): void { // android.content.Intent 45 | this._callbacks.onActivityResult(this, requestCode, resultCode, data, super.onActivityResult); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /demo/AngularApp/app/app.android.css: -------------------------------------------------------------------------------- 1 | @import '~nativescript-theme-core/css/core.light.css'; 2 | 3 | ActionBar { 4 | background-color: #7F9; 5 | } 6 | 7 | .app-class { 8 | background-color:#7f9 9 | } 10 | -------------------------------------------------------------------------------- /demo/AngularApp/app/app.component.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /demo/AngularApp/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from "@angular/core"; 2 | 3 | @Component({ 4 | selector: "ns-app", 5 | templateUrl: "app.component.html", 6 | }) 7 | 8 | export class AppComponent { } 9 | -------------------------------------------------------------------------------- /demo/AngularApp/app/app.ios.css: -------------------------------------------------------------------------------- 1 | @import '~nativescript-theme-core/css/core.light.css'; 2 | 3 | ActionBar { 4 | background-color: #999; 5 | } 6 | 7 | .app-class{ 8 | background-color:#999 9 | } 10 | -------------------------------------------------------------------------------- /demo/AngularApp/app/app.module.ngfactory.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * A dynamically generated module when compiled with AoT. 3 | */ 4 | export const AppModuleNgFactory: any; -------------------------------------------------------------------------------- /demo/AngularApp/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule, NO_ERRORS_SCHEMA } from "@angular/core"; 2 | import { NativeScriptModule } from "nativescript-angular/nativescript.module"; 3 | import { AppRoutingModule } from "./app.routing"; 4 | import { AppComponent } from "./app.component"; 5 | 6 | import { ItemService } from "./item/item.service"; 7 | import { ItemsComponent } from "./item/items.component"; 8 | import { ItemDetailComponent } from "./item/item-detail.component"; 9 | 10 | // import { PlayfulSpirit } from "./directive"; 11 | 12 | // Uncomment and add to NgModule imports if you need to use two-way binding 13 | // import { NativeScriptFormsModule } from "nativescript-angular/forms"; 14 | 15 | // Uncomment and add to NgModule imports if you need to use the HTTP wrapper 16 | // import { NativeScriptHttpModule } from "nativescript-angular/http"; 17 | 18 | @NgModule({ 19 | bootstrap: [ 20 | AppComponent 21 | ], 22 | imports: [ 23 | NativeScriptModule, 24 | AppRoutingModule 25 | ], 26 | declarations: [ 27 | AppComponent, 28 | ItemsComponent, 29 | ItemDetailComponent, 30 | // https://github.com/NativeScript/nativescript-dev-webpack/issues/332 31 | // We would really want this to work but currently it fails with AoT: 32 | // PlayfulSpirit 33 | ], 34 | providers: [ 35 | ItemService 36 | ], 37 | schemas: [ 38 | NO_ERRORS_SCHEMA 39 | ] 40 | }) 41 | /* 42 | Pass your application module to the bootstrapModule function located in main.ts to start your app 43 | */ 44 | export class AppModule { } 45 | -------------------------------------------------------------------------------- /demo/AngularApp/app/app.routing.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from "@angular/core"; 2 | import { NativeScriptRouterModule } from "nativescript-angular/router"; 3 | import { Routes } from "@angular/router"; 4 | 5 | import { ItemsComponent } from "./item/items.component"; 6 | import { ItemDetailComponent } from "./item/item-detail.component"; 7 | 8 | const routes: Routes = [ 9 | { path: "", redirectTo: "/items", pathMatch: "full" }, 10 | { path: "items", component: ItemsComponent }, 11 | { path: "item/:id", component: ItemDetailComponent }, 12 | { 13 | path: "ninjas", 14 | loadChildren: "./ninjas/ninjas.module#NinjasModule", 15 | }, 16 | 17 | ]; 18 | 19 | @NgModule({ 20 | imports: [NativeScriptRouterModule.forRoot(routes)], 21 | exports: [NativeScriptRouterModule] 22 | }) 23 | export class AppRoutingModule { } 24 | -------------------------------------------------------------------------------- /demo/AngularApp/app/application.android.ts: -------------------------------------------------------------------------------- 1 | @JavaProxy("org.myApp.Application") 2 | class Application extends android.app.Application { 3 | onCreate(): void { 4 | super.onCreate(); 5 | } 6 | 7 | protected attachBaseContext(baseContext: any) { // android.content.Context 8 | super.attachBaseContext(baseContext); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /demo/AngularApp/app/application.d.ts: -------------------------------------------------------------------------------- 1 | declare const android: any; 2 | declare const androidx: any; 3 | -------------------------------------------------------------------------------- /demo/AngularApp/app/directive/PlayfulSpirit.android.ts: -------------------------------------------------------------------------------- 1 | import { Directive } from "@angular/core"; 2 | 3 | // @Directive({ 4 | // selector: "[playful-spirit]", 5 | // host: { 6 | // "backgroundColor": "#7F9" 7 | // } 8 | // }) 9 | // export class PlayfulSpirit { 10 | // } -------------------------------------------------------------------------------- /demo/AngularApp/app/directive/PlayfulSpirit.d.ts: -------------------------------------------------------------------------------- 1 | // import { Directive } from "@angular/core"; 2 | 3 | // @Directive({ 4 | // selector: "[playful]" 5 | // }) 6 | // export class PlayfulSpirit { 7 | // } -------------------------------------------------------------------------------- /demo/AngularApp/app/directive/PlayfulSpirit.ios.ts: -------------------------------------------------------------------------------- 1 | import { Directive } from "@angular/core"; 2 | 3 | // @Directive({ 4 | // selector: "[playful-spirit]", 5 | // host: { 6 | // "backgroundColor": "#999" 7 | // } 8 | // }) 9 | // export class PlayfulSpirit { 10 | // } -------------------------------------------------------------------------------- /demo/AngularApp/app/directive/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "main": "PlayfulSpirit", 3 | "types": "PlayfulSpirit.d.ts" 4 | } -------------------------------------------------------------------------------- /demo/AngularApp/app/item/item-detail.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /demo/AngularApp/app/item/item-detail.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from "@angular/core"; 2 | import { ActivatedRoute } from "@angular/router"; 3 | 4 | import { Item } from "./item"; 5 | import { ItemService } from "./item.service"; 6 | 7 | @Component({ 8 | selector: "ns-details", 9 | moduleId: module.id, 10 | templateUrl: "./item-detail.component.html", 11 | }) 12 | export class ItemDetailComponent implements OnInit { 13 | item: Item; 14 | 15 | constructor( 16 | private itemService: ItemService, 17 | private route: ActivatedRoute 18 | ) { } 19 | 20 | ngOnInit(): void { 21 | const id = +this.route.snapshot.params["id"]; 22 | this.item = this.itemService.getItem(id); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /demo/AngularApp/app/item/item.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from "@angular/core"; 2 | 3 | import { Item } from "./item"; 4 | 5 | @Injectable() 6 | export class ItemService { 7 | private items = new Array( 8 | { id: 1, name: "Ter Stegen", role: "Goalkeeper" }, 9 | { id: 3, name: "Piqué", role: "Defender" }, 10 | { id: 4, name: "I. Rakitic", role: "Midfielder" }, 11 | { id: 5, name: "Sergio", role: "Midfielder" }, 12 | { id: 6, name: "Denis Suárez", role: "Midfielder" }, 13 | { id: 7, name: "Arda", role: "Midfielder" }, 14 | { id: 8, name: "A. Iniesta", role: "Midfielder" }, 15 | { id: 9, name: "Suárez", role: "Forward" }, 16 | { id: 10, name: "Messi", role: "Forward" }, 17 | { id: 11, name: "Neymar", role: "Forward" }, 18 | { id: 12, name: "Rafinha", role: "Midfielder" }, 19 | { id: 13, name: "Cillessen", role: "Goalkeeper" }, 20 | { id: 14, name: "Mascherano", role: "Defender" }, 21 | { id: 17, name: "Paco Alcácer", role: "Forward" }, 22 | { id: 18, name: "Jordi Alba", role: "Defender" }, 23 | { id: 19, name: "Digne", role: "Defender" }, 24 | { id: 20, name: "Sergi Roberto", role: "Midfielder" }, 25 | { id: 21, name: "André Gomes", role: "Midfielder" }, 26 | { id: 22, name: "Aleix Vidal", role: "Midfielder" }, 27 | { id: 23, name: "Umtiti", role: "Defender" }, 28 | { id: 24, name: "Mathieu", role: "Defender" }, 29 | { id: 25, name: "Masip", role: "Goalkeeper" }, 30 | ); 31 | 32 | getItems(): Item[] { 33 | return this.items; 34 | } 35 | 36 | getItem(id: number): Item { 37 | return this.items.filter(item => item.id === id)[0]; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /demo/AngularApp/app/item/item.ts: -------------------------------------------------------------------------------- 1 | export class Item { 2 | id: number; 3 | name: string; 4 | role: string; 5 | } 6 | -------------------------------------------------------------------------------- /demo/AngularApp/app/item/items.component.android.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /demo/AngularApp/app/item/items.component.android.scss: -------------------------------------------------------------------------------- 1 | ListView { 2 | GridLayout { 3 | background-color: #7F9; 4 | } 5 | } 6 | 7 | .page-class { 8 | background-color: #7F9; 9 | } -------------------------------------------------------------------------------- /demo/AngularApp/app/item/items.component.ios.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /demo/AngularApp/app/item/items.component.ios.scss: -------------------------------------------------------------------------------- 1 | ListView { 2 | GridLayout { 3 | background-color: #999; 4 | } 5 | } 6 | 7 | .page-class { 8 | background-color: #999; 9 | } -------------------------------------------------------------------------------- /demo/AngularApp/app/item/items.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from "@angular/core"; 2 | 3 | import { Item } from "./item"; 4 | import { ItemService } from "./item.service"; 5 | 6 | @Component({ 7 | selector: "ns-items", 8 | moduleId: module.id, 9 | styleUrls: ["./items.component.scss"], 10 | templateUrl: "./items.component.html", 11 | }) 12 | export class ItemsComponent implements OnInit { 13 | items: Item[]; 14 | 15 | // This pattern makes use of Angular’s dependency injection implementation to inject an instance of the ItemService service into this class. 16 | // Angular knows about this service because it is included in your app’s main NgModule, defined in app.module.ts. 17 | constructor(private itemService: ItemService) { } 18 | 19 | ngOnInit(): void { 20 | this.items = this.itemService.getItems(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /demo/AngularApp/app/main.aot.ts: -------------------------------------------------------------------------------- 1 | // this import should be first in order to load some required settings (like globals and reflect-metadata) 2 | import { platformNativeScript } from "nativescript-angular/platform-static"; 3 | 4 | // "./app.module.ngfactory" is a dynamically generated module when compiled with AoT. 5 | import { AppModuleNgFactory } from "./app.module.ngfactory"; 6 | 7 | platformNativeScript().bootstrapModuleFactory(AppModuleNgFactory); 8 | -------------------------------------------------------------------------------- /demo/AngularApp/app/main.ts: -------------------------------------------------------------------------------- 1 | // this import should be first in order to load some required settings (like globals and reflect-metadata) 2 | import { platformNativeScriptDynamic } from "nativescript-angular/platform"; 3 | import { AppModule } from "./app.module"; 4 | 5 | platformNativeScriptDynamic().bootstrapModule(AppModule); 6 | -------------------------------------------------------------------------------- /demo/AngularApp/app/ninjas/details/ninja.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from "@angular/core"; 2 | import { ActivatedRoute } from "@angular/router"; 3 | 4 | @Component({ 5 | template: ` 6 | 7 | 8 | 10 | 11 | ` 12 | }) 13 | export class NinjaComponent implements OnInit { 14 | name: String; 15 | 16 | constructor( private route: ActivatedRoute) { } 17 | 18 | ngOnInit(): void { 19 | this.name = this.route.snapshot.params["name"]; 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /demo/AngularApp/app/ninjas/details/ninja.module.ts: -------------------------------------------------------------------------------- 1 | import { NativeScriptCommonModule } from "nativescript-angular/common"; 2 | import { NgModule, NO_ERRORS_SCHEMA } from "@angular/core"; 3 | import { NativeScriptRouterModule } from "nativescript-angular/router"; 4 | 5 | import { NinjaComponent } from "./ninja.component"; 6 | import { routes } from "./ninja.routes"; 7 | 8 | @NgModule({ 9 | schemas: [NO_ERRORS_SCHEMA], 10 | imports: [ 11 | NativeScriptRouterModule, 12 | NativeScriptRouterModule.forChild(routes), 13 | NativeScriptCommonModule, 14 | ], 15 | declarations: [NinjaComponent] 16 | }) 17 | export class NinjaModule { } 18 | -------------------------------------------------------------------------------- /demo/AngularApp/app/ninjas/details/ninja.routes.ts: -------------------------------------------------------------------------------- 1 | import { NinjaComponent } from "./ninja.component"; 2 | 3 | export const routes = [ 4 | { 5 | path: ":name", 6 | component: NinjaComponent 7 | } 8 | ]; 9 | -------------------------------------------------------------------------------- /demo/AngularApp/app/ninjas/ninjas.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from "@angular/core"; 2 | 3 | @Component({ 4 | template: ` 5 | 6 | 7 | 8 | 9 | 10 | 16 | 17 | 18 | 19 | 21 | 22 | ` 23 | }) 24 | export class NinjasComponent { 25 | ninjas = [ 26 | { name: "Michaelangelo", color: "orange" }, 27 | { name: "Leonardo", color: "blue" }, 28 | { name: "Raphaelo", color: "red" }, 29 | { name: "Donatello", color: "purple" } 30 | ]; 31 | } 32 | -------------------------------------------------------------------------------- /demo/AngularApp/app/ninjas/ninjas.module.ts: -------------------------------------------------------------------------------- 1 | import { NativeScriptCommonModule } from "nativescript-angular/common"; 2 | import { NgModule, NO_ERRORS_SCHEMA } from "@angular/core"; 3 | import { NativeScriptRouterModule } from "nativescript-angular/router"; 4 | 5 | import { NinjasComponent } from "./ninjas.component"; 6 | import { routes } from "./ninjas.routes"; 7 | 8 | @NgModule({ 9 | schemas: [NO_ERRORS_SCHEMA], 10 | imports: [ 11 | NativeScriptRouterModule, 12 | NativeScriptRouterModule.forChild(routes), 13 | NativeScriptCommonModule, 14 | ], 15 | declarations: [NinjasComponent] 16 | }) 17 | export class NinjasModule { } 18 | -------------------------------------------------------------------------------- /demo/AngularApp/app/ninjas/ninjas.routes.ts: -------------------------------------------------------------------------------- 1 | import { NinjasComponent } from "./ninjas.component"; 2 | 3 | export const routes = [ 4 | { 5 | path: "", 6 | component: NinjasComponent 7 | }, 8 | { 9 | path: "details", 10 | loadChildren: "~/ninjas/details/ninja.module#NinjaModule", 11 | }, 12 | ]; 13 | -------------------------------------------------------------------------------- /demo/AngularApp/app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "android": { 3 | "v8Flags": "--expose_gc", 4 | "markingMode": "none" 5 | }, 6 | "main": "main.js", 7 | "name": "tns-template-hello-world-ng", 8 | "version": "3.3.0" 9 | } 10 | -------------------------------------------------------------------------------- /demo/AngularApp/custom-application-activity.webpack.config.js: -------------------------------------------------------------------------------- 1 | const webpackConfig = require("./webpack.config"); 2 | const path = require("path"); 3 | 4 | module.exports = env => { 5 | env = env || {}; 6 | env.appComponents = env.appComponents || []; 7 | env.appComponents.push(path.resolve(__dirname, "app/activity.android.ts")); 8 | 9 | env.entries = env.entries || {}; 10 | env.entries.application = "./application.android"; 11 | const config = webpackConfig(env); 12 | return config; 13 | }; -------------------------------------------------------------------------------- /demo/AngularApp/e2e/resources/images/AngularApp/android/style.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/AngularApp/e2e/resources/images/AngularApp/android/style.png -------------------------------------------------------------------------------- /demo/AngularApp/e2e/resources/images/AngularApp/ios/style.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/AngularApp/e2e/resources/images/AngularApp/ios/style.png -------------------------------------------------------------------------------- /demo/AngularApp/e2e/setup.ts: -------------------------------------------------------------------------------- 1 | import { startServer, stopServer, ITestReporter, nsCapabilities, LogImageType } from "nativescript-dev-appium"; 2 | const addContext = require('mochawesome/addContext'); 3 | 4 | const testReporterContext = {}; 5 | testReporterContext.name = "mochawesome"; 6 | testReporterContext.reportDir = "mochawesome-report"; 7 | testReporterContext.log = addContext; 8 | testReporterContext.logImageTypes = [LogImageType.screenshots]; 9 | nsCapabilities.testReporter = testReporterContext; 10 | 11 | before("start server", async function () { 12 | nsCapabilities.testReporter.context = this; 13 | await startServer(); 14 | }); 15 | 16 | after("stop server", async function () { 17 | await stopServer(); 18 | }); 19 | -------------------------------------------------------------------------------- /demo/AngularApp/e2e/tests.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | import { AppiumDriver, createDriver, nsCapabilities } from "nativescript-dev-appium"; 2 | import { assert } from "chai"; 3 | 4 | describe("sample scenario", async function () { 5 | let driver: AppiumDriver; 6 | 7 | before(async function () { 8 | nsCapabilities.testReporter.context = this; 9 | driver = await createDriver(); 10 | }); 11 | 12 | afterEach(async function () { 13 | if (this.currentTest.state === "failed") { 14 | await driver.logTestArtifacts(this.currentTest.title); 15 | } 16 | }); 17 | 18 | after(async function () { 19 | await driver.quit(); 20 | console.log("Quit driver!"); 21 | }); 22 | 23 | it("should navigate to a ninja", async function () { 24 | const btnNinjas = await driver.waitForElement("Ninjas"); 25 | await btnNinjas.click(); 26 | 27 | const itemMichaelangelo = await driver.findElementByText("Michaelangelo"); 28 | await itemMichaelangelo.click(); 29 | 30 | const lblMichaelangelo = await driver.findElementByText("Ninja Michaelangelo!"); 31 | await lblMichaelangelo.isDisplayed(); 32 | 33 | const btnBackToNinjas = await driver.findElementByText("Back to ninjas"); 34 | await btnBackToNinjas.click(); 35 | 36 | const btnGoBackHome = await driver.findElementByText("Go back home"); 37 | await btnGoBackHome.click(); 38 | }); 39 | 40 | const styleTypes = { 41 | "inline": "styleInline", 42 | "page": "stylePage", 43 | "app": "styleApp" 44 | }; 45 | 46 | for (let styleType in styleTypes) { 47 | it(`should find an element with ${styleType} style applied`, async function () { 48 | const element = await driver.findElementByText(styleTypes[styleType]); 49 | driver.imageHelper.options.keepOriginalImageSize = false; 50 | driver.imageHelper.options.isDeviceSpecific = false; 51 | const result = await driver.compareElement(element, "style"); 52 | assert.isTrue(result); 53 | }); 54 | } 55 | }); 56 | -------------------------------------------------------------------------------- /demo/AngularApp/e2e/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "target": "es6", 5 | "experimentalDecorators": true, 6 | "emitDecoratorMetadata": true, 7 | "importHelpers": false, 8 | "sourceMap": true, 9 | "types": [ 10 | "mocha", 11 | "chai", 12 | "node" 13 | ], 14 | "lib": [ 15 | "es2015", 16 | "dom" 17 | ], 18 | "baseUrl": "." 19 | } 20 | } -------------------------------------------------------------------------------- /demo/AngularApp/nsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "webpackConfigPath": "custom-application-activity.webpack.config.js" 3 | } -------------------------------------------------------------------------------- /demo/AngularApp/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "NativeScript Application", 3 | "license": "SEE LICENSE IN ", 4 | "readme": "NativeScript Application", 5 | "repository": "", 6 | "nativescript": { 7 | "id": "org.nativescript.AngularApp", 8 | "tns-android": { 9 | "version": "next" 10 | }, 11 | "tns-ios": { 12 | "version": "next" 13 | } 14 | }, 15 | "dependencies": { 16 | "@angular/common": "8.2.0", 17 | "@angular/compiler": "8.2.0", 18 | "@angular/core": "8.2.0", 19 | "@angular/forms": "8.2.0", 20 | "@angular/platform-browser": "8.2.0", 21 | "@angular/platform-browser-dynamic": "8.2.0", 22 | "@angular/router": "8.2.0", 23 | "nativescript-angular": "next", 24 | "nativescript-theme-core": "~1.0.2", 25 | "reflect-metadata": "~0.1.8", 26 | "rxjs": "^6.3.3", 27 | "tns-core-modules": "next", 28 | "zone.js": "^0.9.1" 29 | }, 30 | "devDependencies": { 31 | "@angular/compiler-cli": "8.2.0", 32 | "@ngtools/webpack": "8.2.0", 33 | "@types/chai": "~4.1.7", 34 | "@types/mocha": "~5.2.5", 35 | "@types/node": "~10.12.18", 36 | "babel-traverse": "6.26.0", 37 | "babel-types": "6.26.0", 38 | "babylon": "6.18.0", 39 | "chai-as-promised": "~7.1.1", 40 | "lazy": "1.0.11", 41 | "mocha": "~5.2.0", 42 | "chai": "4.2.0", 43 | "mochawesome": "~3.1.2", 44 | "nativescript-dev-appium": "next", 45 | "nativescript-dev-webpack": "next", 46 | "node-sass": "^4.12.0", 47 | "typescript": "~3.5.3" 48 | }, 49 | "scripts": { 50 | "setup": "npm pack ../../ && npm i -D nativescript-dev-webpack*.tgz", 51 | "e2e": "tsc -p e2e && mocha --opts ../config/mocha.opts --recursive e2e --appiumCapsLocation ../config/appium.capabilities.json", 52 | "compile-tests": "tsc -p e2e --watch" 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /demo/AngularApp/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "target": "es5", 5 | "experimentalDecorators": true, 6 | "emitDecoratorMetadata": true, 7 | "noEmitHelpers": true, 8 | "noEmitOnError": true, 9 | "lib": [ 10 | "es6", 11 | "dom", 12 | "es2015.iterable" 13 | ], 14 | "baseUrl": ".", 15 | "paths": { 16 | "~/*": [ 17 | "app/*" 18 | ], 19 | "*": [ 20 | "./node_modules/tns-core-modules/*", 21 | "./node_modules/*" 22 | ] 23 | } 24 | }, 25 | "exclude": [ 26 | "e2e", 27 | "node_modules", 28 | "platforms" 29 | ] 30 | } -------------------------------------------------------------------------------- /demo/AngularApp/tsconfig.tns.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig", 3 | "compilerOptions": { 4 | "module": "esNext", 5 | "moduleResolution": "node" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /demo/JavaScriptApp/.gitignore: -------------------------------------------------------------------------------- 1 | app/main-page.android.css 2 | app/main-page.ios.css 3 | mochawesome-report -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/Android/app.gradle: -------------------------------------------------------------------------------- 1 | // Add your native dependencies here: 2 | 3 | // Uncomment to add recyclerview-v7 dependency 4 | //dependencies { 5 | // compile 'com.android.support:recyclerview-v7:+' 6 | //} 7 | 8 | android { 9 | defaultConfig { 10 | generatedDensities = [] 11 | applicationId = "org.nativescript.JavaScriptApp" 12 | 13 | //override supported platforms 14 | // ndk { 15 | // abiFilters.clear() 16 | // abiFilters "armeabi-v7a" 17 | // } 18 | 19 | } 20 | aaptOptions { 21 | additionalParameters "--no-version-vectors" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/Android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | 21 | 27 | 28 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/Android/src/main/res/drawable-hdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/JavaScriptApp/app/App_Resources/Android/src/main/res/drawable-hdpi/background.png -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/Android/src/main/res/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/JavaScriptApp/app/App_Resources/Android/src/main/res/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/Android/src/main/res/drawable-hdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/JavaScriptApp/app/App_Resources/Android/src/main/res/drawable-hdpi/logo.png -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/Android/src/main/res/drawable-ldpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/JavaScriptApp/app/App_Resources/Android/src/main/res/drawable-ldpi/background.png -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/Android/src/main/res/drawable-ldpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/JavaScriptApp/app/App_Resources/Android/src/main/res/drawable-ldpi/icon.png -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/Android/src/main/res/drawable-ldpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/JavaScriptApp/app/App_Resources/Android/src/main/res/drawable-ldpi/logo.png -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/Android/src/main/res/drawable-mdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/JavaScriptApp/app/App_Resources/Android/src/main/res/drawable-mdpi/background.png -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/Android/src/main/res/drawable-mdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/JavaScriptApp/app/App_Resources/Android/src/main/res/drawable-mdpi/icon.png -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/Android/src/main/res/drawable-mdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/JavaScriptApp/app/App_Resources/Android/src/main/res/drawable-mdpi/logo.png -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/Android/src/main/res/drawable-nodpi/splash_screen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/Android/src/main/res/drawable-xhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/JavaScriptApp/app/App_Resources/Android/src/main/res/drawable-xhdpi/background.png -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/JavaScriptApp/app/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/JavaScriptApp/app/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/JavaScriptApp/app/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/JavaScriptApp/app/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/JavaScriptApp/app/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/JavaScriptApp/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/JavaScriptApp/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/JavaScriptApp/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/Android/src/main/res/values-v21/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3d5afe 4 | -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/Android/src/main/res/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 11 | 14 | 15 | 16 | 19 | 20 | 23 | -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/Android/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #F5F5F5 4 | #757575 5 | #33B5E5 6 | #272734 7 | -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/Android/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 18 | 19 | 21 | 22 | 23 | 31 | 32 | 34 | 35 | 36 | 42 | 43 | 45 | 46 | -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "29x29", 5 | "idiom" : "iphone", 6 | "filename" : "icon-29.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "29x29", 11 | "idiom" : "iphone", 12 | "filename" : "icon-29@2x.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "icon-29@3x.png", 19 | "scale" : "3x" 20 | }, 21 | { 22 | "size" : "40x40", 23 | "idiom" : "iphone", 24 | "filename" : "icon-40@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "40x40", 29 | "idiom" : "iphone", 30 | "filename" : "icon-40@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "60x60", 35 | "idiom" : "iphone", 36 | "filename" : "icon-60@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "60x60", 41 | "idiom" : "iphone", 42 | "filename" : "icon-60@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "29x29", 47 | "idiom" : "ipad", 48 | "filename" : "icon-29.png", 49 | "scale" : "1x" 50 | }, 51 | { 52 | "size" : "29x29", 53 | "idiom" : "ipad", 54 | "filename" : "icon-29@2x.png", 55 | "scale" : "2x" 56 | }, 57 | { 58 | "size" : "40x40", 59 | "idiom" : "ipad", 60 | "filename" : "icon-40.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "40x40", 65 | "idiom" : "ipad", 66 | "filename" : "icon-40@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "76x76", 71 | "idiom" : "ipad", 72 | "filename" : "icon-76.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "76x76", 77 | "idiom" : "ipad", 78 | "filename" : "icon-76@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "83.5x83.5", 83 | "idiom" : "ipad", 84 | "filename" : "icon-83.5@2x.png", 85 | "scale" : "2x" 86 | }, 87 | { 88 | "size" : "1024x1024", 89 | "idiom" : "ios-marketing", 90 | "filename" : "icon-1024.png", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/JavaScriptApp/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/JavaScriptApp/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/JavaScriptApp/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/JavaScriptApp/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/JavaScriptApp/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/JavaScriptApp/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/JavaScriptApp/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/JavaScriptApp/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/JavaScriptApp/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/JavaScriptApp/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/JavaScriptApp/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/JavaScriptApp/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/iOS/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/JavaScriptApp/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/JavaScriptApp/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/JavaScriptApp/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/JavaScriptApp/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/JavaScriptApp/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/JavaScriptApp/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/JavaScriptApp/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/JavaScriptApp/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/JavaScriptApp/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/JavaScriptApp/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/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 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/JavaScriptApp/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/JavaScriptApp/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/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 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/JavaScriptApp/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/JavaScriptApp/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/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 | 47 | 48 | -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/App_Resources/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 8 you need to specify your development team. More info: https://developer.apple.com/library/prerelease/content/releasenotes/DeveloperTools/RN-Xcode/Introduction.html 5 | // DEVELOPMENT_TEAM = YOUR_TEAM_ID; 6 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 7 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 8 | -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/activity.android.js: -------------------------------------------------------------------------------- 1 | const frame = require("tns-core-modules/ui/frame"); 2 | 3 | const superProto = androidx.appcompat.app.AppCompatActivity.prototype; 4 | androidx.appcompat.app.AppCompatActivity.extend("org.myApp.MainActivity", { 5 | onCreate: function(savedInstanceState) { 6 | // Set isNativeScriptActivity in onCreate. 7 | // The JS constructor might not be called because the activity is created from Android. 8 | this.isNativeScriptActivity = true; 9 | 10 | if(!this._callbacks) { 11 | frame.setActivityCallbacks(this); 12 | } 13 | this._callbacks.onCreate(this, savedInstanceState, this.getIntent(), superProto.onCreate); 14 | }, 15 | onSaveInstanceState: function(outState) { 16 | this._callbacks.onSaveInstanceState(this, outState, superProto.onSaveInstanceState); 17 | }, 18 | onStart: function() { 19 | this._callbacks.onStart(this, superProto.onStart); 20 | }, 21 | onStop: function() { 22 | this._callbacks.onStop(this, superProto.onStop); 23 | }, 24 | onDestroy: function() { 25 | this._callbacks.onDestroy(this, superProto.onDestroy); 26 | }, 27 | onBackPressed: function() { 28 | this._callbacks.onBackPressed(this, superProto.onBackPressed); 29 | }, 30 | onRequestPermissionsResult: function (requestCode, permissions, grantResults) { 31 | this._callbacks.onRequestPermissionsResult(this, requestCode, permissions, grantResults, undefined); 32 | }, 33 | onActivityResult: function (requestCode, resultCode, data) { 34 | this._callbacks.onActivityResult(this, requestCode, resultCode, data, _super.prototype.onActivityResult); 35 | } 36 | }); 37 | -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/app-root.xml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/app.android.css: -------------------------------------------------------------------------------- 1 | /* 2 | In NativeScript, the app.css file is where you place CSS rules that 3 | you would like to apply to your entire application. Check out 4 | http://docs.nativescript.org/ui/styling for a full list of the CSS 5 | selectors and properties you can use to style UI components. 6 | 7 | /* 8 | In many cases you may want to use the NativeScript core theme instead 9 | of writing your own CSS rules. For a full list of class names in the theme 10 | refer to http://docs.nativescript.org/ui/theme. 11 | */ 12 | @import '~nativescript-theme-core/css/core.light.css'; 13 | @import 'app.common.css'; 14 | 15 | ActionBar { 16 | background-color: #7F9; 17 | } 18 | 19 | .app-class { 20 | background-color: #7F9; 21 | } -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/app.common.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NativeScript/nativescript-dev-webpack/6fe8e32f893b0081cf3307cb8a664198966ce29e/demo/JavaScriptApp/app/app.common.css -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/app.ios.css: -------------------------------------------------------------------------------- 1 | /* 2 | In NativeScript, the app.css file is where you place CSS rules that 3 | you would like to apply to your entire application. Check out 4 | http://docs.nativescript.org/ui/styling for a full list of the CSS 5 | selectors and properties you can use to style UI components. 6 | 7 | /* 8 | In many cases you may want to use the NativeScript core theme instead 9 | of writing your own CSS rules. For a full list of class names in the theme 10 | refer to http://docs.nativescript.org/ui/theme. 11 | */ 12 | @import '~nativescript-theme-core/css/core.light.css'; 13 | @import 'app.common.css'; 14 | 15 | ActionBar { 16 | background-color: #999; 17 | } 18 | 19 | .app-class { 20 | background-color: #999; 21 | } -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/app.js: -------------------------------------------------------------------------------- 1 | /* 2 | In NativeScript, the app.js file is the entry point to your application. 3 | You can use this file to perform app-level initialization, but the primary 4 | purpose of the file is to pass control to the app’s first module. 5 | */ 6 | 7 | var application = require("tns-core-modules/application"); 8 | 9 | application.run({ moduleName: "app-root" }); 10 | 11 | /* 12 | Do not place any code after the application has been started as it will not 13 | be executed on iOS. 14 | */ 15 | -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/application.android.js: -------------------------------------------------------------------------------- 1 | const superProto = android.app.Application.prototype; 2 | android.app.Application.extend("org.myApp.Application", { 3 | onCreate: function() { 4 | superProto.onCreate.call(this); 5 | }, 6 | attachBaseContext: function(base) { 7 | superProto.attachBaseContext.call(this, base); 8 | } 9 | }); 10 | -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/main-page.android.js: -------------------------------------------------------------------------------- 1 | var frameModule = require("tns-core-modules/ui/frame"); 2 | var createViewModel = require("./main-view-model").createViewModel; 3 | 4 | function onNavigatingTo(args) { 5 | /* 6 | This gets a reference this page’s UI component. You can 7 | view the API reference of the Page to see what’s available at 8 | https://docs.nativescript.org/api-reference/classes/_ui_page_.page.html 9 | */ 10 | var page = args.object; 11 | 12 | /* 13 | A page’s bindingContext is an object that should be used to perform 14 | data binding between XML markup and JavaScript code. Properties 15 | on the bindingContext can be accessed using the {{ }} syntax in XML. 16 | In this example, the {{ message }} and {{ onTap }} bindings are resolved 17 | against the object returned by createViewModel(). 18 | 19 | You can learn more about data binding in NativeScript at 20 | https://docs.nativescript.org/core-concepts/data-binding. 21 | */ 22 | page.bindingContext = createViewModel(); 23 | 24 | page.getViewById("platform").text = "android"; 25 | } 26 | 27 | /* 28 | Exporting a function in a NativeScript code-behind file makes it accessible 29 | to the file’s corresponding XML file. In this case, exporting the onNavigatingTo 30 | function here makes the navigatingTo="onNavigatingTo" binding in this page’s XML 31 | file work. 32 | */ 33 | exports.onNavigatingTo = onNavigatingTo; 34 | 35 | function goToSecondPage(args) { 36 | var topmost = frameModule.topmost(); 37 | topmost.navigate("views/second-page"); 38 | } 39 | exports.goToSecondPage = goToSecondPage; 40 | -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/main-page.android.scss: -------------------------------------------------------------------------------- 1 | StackLayout { 2 | Button { 3 | background-color: #7F9; 4 | } 5 | } 6 | 7 | .page-class { 8 | background-color: #7F9; 9 | } -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/main-page.ios.js: -------------------------------------------------------------------------------- 1 | var frameModule = require("tns-core-modules/ui/frame"); 2 | var createViewModel = require("./main-view-model").createViewModel; 3 | 4 | function onNavigatingTo(args) { 5 | /* 6 | This gets a reference this page’s UI component. You can 7 | view the API reference of the Page to see what’s available at 8 | https://docs.nativescript.org/api-reference/classes/_ui_page_.page.html 9 | */ 10 | var page = args.object; 11 | 12 | /* 13 | A page’s bindingContext is an object that should be used to perform 14 | data binding between XML markup and JavaScript code. Properties 15 | on the bindingContext can be accessed using the {{ }} syntax in XML. 16 | In this example, the {{ message }} and {{ onTap }} bindings are resolved 17 | against the object returned by createViewModel(). 18 | 19 | You can learn more about data binding in NativeScript at 20 | https://docs.nativescript.org/core-concepts/data-binding. 21 | */ 22 | page.bindingContext = createViewModel(); 23 | 24 | page.getViewById("platform").text = "ios"; 25 | } 26 | 27 | /* 28 | Exporting a function in a NativeScript code-behind file makes it accessible 29 | to the file’s corresponding XML file. In this case, exporting the onNavigatingTo 30 | function here makes the navigatingTo="onNavigatingTo" binding in this page’s XML 31 | file work. 32 | */ 33 | exports.onNavigatingTo = onNavigatingTo; 34 | 35 | function goToSecondPage(args) { 36 | var topmost = frameModule.topmost(); 37 | topmost.navigate("views/second-page"); 38 | } 39 | exports.goToSecondPage = goToSecondPage; 40 | -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/main-page.ios.scss: -------------------------------------------------------------------------------- 1 | StackLayout { 2 | Button { 3 | background-color: #999; 4 | } 5 | } 6 | 7 | .page-class { 8 | background-color: #999; 9 | } -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/main-view-model.js: -------------------------------------------------------------------------------- 1 | var Observable = require("tns-core-modules/data/observable").Observable; 2 | 3 | function getMessage(counter) { 4 | if (counter <= 0) { 5 | return "Hoorraaay! You unlocked the NativeScript clicker achievement!"; 6 | } else { 7 | return counter + " taps left"; 8 | } 9 | } 10 | 11 | function createViewModel() { 12 | var viewModel = new Observable(); 13 | viewModel.counter = 42; 14 | viewModel.message = getMessage(viewModel.counter); 15 | 16 | viewModel.onTap = function() { 17 | this.counter--; 18 | this.set("message", getMessage(this.counter)); 19 | } 20 | 21 | return viewModel; 22 | } 23 | 24 | exports.createViewModel = createViewModel; -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "android": { 3 | "v8Flags": "--expose_gc", 4 | "markingMode": "none" 5 | }, 6 | "main": "app.js", 7 | "name": "tns-template-hello-world", 8 | "version": "3.3.0" 9 | } 10 | -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/references.d.ts: -------------------------------------------------------------------------------- 1 | /// Enable smart suggestions and completions in Visual Studio Code JavaScript projects. 2 | -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/views/second-page.css: -------------------------------------------------------------------------------- 1 | Button { 2 | width: 110; 3 | height: 110; 4 | border-width: 1; 5 | border-color: darkgray; 6 | background-color: lightgray; 7 | border-radius: 55; 8 | } 9 | -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/views/second-page.js: -------------------------------------------------------------------------------- 1 | exports.secondPageTap = function(args) { 2 | args.object.text = parseInt(args.object.text) + 1; 3 | } -------------------------------------------------------------------------------- /demo/JavaScriptApp/app/views/second-page.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |