├── .gitignore ├── src ├── assets │ └── images │ │ ├── icon_lock.png │ │ ├── icon_user.png │ │ ├── nsvue_logo.png │ │ ├── icon_lock@2x.png │ │ ├── icon_lock@3x.png │ │ ├── icon_user@2x.png │ │ ├── icon_user@3x.png │ │ ├── nsvue_logo@2x.png │ │ ├── nsvue_logo@3x.png │ │ └── NativeScript-Vue.png ├── store │ ├── index.js │ └── modules │ │ └── counter.js ├── components │ ├── ImagePage.vue │ ├── Home.vue │ ├── HelloWorld.vue │ ├── Counter.vue │ ├── Reddit.vue │ ├── Plugins.vue │ ├── Login.vue │ └── Refresh.vue ├── main.js ├── styles.scss └── router │ └── index.js ├── .babelrc ├── template ├── app │ ├── App_Resources │ │ ├── iOS │ │ │ ├── Assets.xcassets │ │ │ │ ├── Contents.json │ │ │ │ ├── AppIcon.appiconset │ │ │ │ │ ├── icon-29.png │ │ │ │ │ ├── icon-40.png │ │ │ │ │ ├── icon-76.png │ │ │ │ │ ├── icon-1024.png │ │ │ │ │ ├── icon-29@2x.png │ │ │ │ │ ├── icon-29@3x.png │ │ │ │ │ ├── icon-40@2x.png │ │ │ │ │ ├── icon-40@3x.png │ │ │ │ │ ├── icon-60@2x.png │ │ │ │ │ ├── icon-60@3x.png │ │ │ │ │ ├── icon-76@2x.png │ │ │ │ │ ├── icon-83.5@2x.png │ │ │ │ │ └── Contents.json │ │ │ │ ├── LaunchImage.launchimage │ │ │ │ │ ├── Default.png │ │ │ │ │ ├── Default@2x.png │ │ │ │ │ ├── Default-1125h.png │ │ │ │ │ ├── Default-568h@2x.png │ │ │ │ │ ├── Default-667h@2x.png │ │ │ │ │ ├── Default-736h@3x.png │ │ │ │ │ ├── Default-Portrait.png │ │ │ │ │ ├── Default-Landscape.png │ │ │ │ │ ├── Default-Landscape-X.png │ │ │ │ │ ├── Default-Landscape@2x.png │ │ │ │ │ ├── Default-Landscape@3x.png │ │ │ │ │ ├── Default-Portrait@2x.png │ │ │ │ │ └── Contents.json │ │ │ │ ├── LaunchScreen.Center.imageset │ │ │ │ │ ├── LaunchScreen-Center.png │ │ │ │ │ ├── LaunchScreen-Center@2x.png │ │ │ │ │ └── Contents.json │ │ │ │ └── LaunchScreen.AspectFill.imageset │ │ │ │ │ ├── LaunchScreen-AspectFill.png │ │ │ │ │ ├── LaunchScreen-AspectFill@2x.png │ │ │ │ │ └── Contents.json │ │ │ ├── build.xcconfig │ │ │ ├── Info.plist │ │ │ └── LaunchScreen.storyboard │ │ └── Android │ │ │ ├── values-v21 │ │ │ ├── colors.xml │ │ │ ├── strings.xml │ │ │ └── styles.xml │ │ │ ├── drawable-hdpi │ │ │ ├── icon.png │ │ │ ├── logo.png │ │ │ └── background.png │ │ │ ├── drawable-ldpi │ │ │ ├── icon.png │ │ │ ├── logo.png │ │ │ └── background.png │ │ │ ├── drawable-mdpi │ │ │ ├── icon.png │ │ │ ├── logo.png │ │ │ └── background.png │ │ │ ├── drawable-xhdpi │ │ │ ├── icon.png │ │ │ ├── logo.png │ │ │ └── background.png │ │ │ ├── drawable-xxhdpi │ │ │ ├── icon.png │ │ │ ├── logo.png │ │ │ └── background.png │ │ │ ├── drawable-xxxhdpi │ │ │ ├── icon.png │ │ │ ├── logo.png │ │ │ └── background.png │ │ │ ├── values │ │ │ ├── strings.xml │ │ │ ├── colors.xml │ │ │ └── styles.xml │ │ │ ├── app.gradle │ │ │ ├── drawable-nodpi │ │ │ └── splash_screen.xml │ │ │ └── AndroidManifest.xml │ └── package.json └── package.json ├── README.md ├── prepare.js ├── launch.js ├── package.json └── webpack.config.js /.gitignore: -------------------------------------------------------------------------------- 1 | # JetBrains project files 2 | .idea 3 | 4 | # NPM 5 | node_modules 6 | 7 | # NativeScript application 8 | /dist 9 | -------------------------------------------------------------------------------- /src/assets/images/icon_lock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/src/assets/images/icon_lock.png -------------------------------------------------------------------------------- /src/assets/images/icon_user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/src/assets/images/icon_user.png -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["env", { "cacheDirectory": true }] 4 | ], 5 | "plugins": ["transform-object-rest-spread"] 6 | } -------------------------------------------------------------------------------- /src/assets/images/nsvue_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/src/assets/images/nsvue_logo.png -------------------------------------------------------------------------------- /src/assets/images/icon_lock@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/src/assets/images/icon_lock@2x.png -------------------------------------------------------------------------------- /src/assets/images/icon_lock@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/src/assets/images/icon_lock@3x.png -------------------------------------------------------------------------------- /src/assets/images/icon_user@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/src/assets/images/icon_user@2x.png -------------------------------------------------------------------------------- /src/assets/images/icon_user@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/src/assets/images/icon_user@3x.png -------------------------------------------------------------------------------- /src/assets/images/nsvue_logo@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/src/assets/images/nsvue_logo@2x.png -------------------------------------------------------------------------------- /src/assets/images/nsvue_logo@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/src/assets/images/nsvue_logo@3x.png -------------------------------------------------------------------------------- /template/app/App_Resources/iOS/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /src/assets/images/NativeScript-Vue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/src/assets/images/NativeScript-Vue.png -------------------------------------------------------------------------------- /template/app/App_Resources/Android/values-v21/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3d5afe 4 | -------------------------------------------------------------------------------- /template/app/App_Resources/Android/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/template/app/App_Resources/Android/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /template/app/App_Resources/Android/drawable-hdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/template/app/App_Resources/Android/drawable-hdpi/logo.png -------------------------------------------------------------------------------- /template/app/App_Resources/Android/drawable-ldpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/template/app/App_Resources/Android/drawable-ldpi/icon.png -------------------------------------------------------------------------------- /template/app/App_Resources/Android/drawable-ldpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/template/app/App_Resources/Android/drawable-ldpi/logo.png -------------------------------------------------------------------------------- /template/app/App_Resources/Android/drawable-mdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/template/app/App_Resources/Android/drawable-mdpi/icon.png -------------------------------------------------------------------------------- /template/app/App_Resources/Android/drawable-mdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/template/app/App_Resources/Android/drawable-mdpi/logo.png -------------------------------------------------------------------------------- /template/app/App_Resources/Android/drawable-xhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/template/app/App_Resources/Android/drawable-xhdpi/icon.png -------------------------------------------------------------------------------- /template/app/App_Resources/Android/drawable-xhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/template/app/App_Resources/Android/drawable-xhdpi/logo.png -------------------------------------------------------------------------------- /template/app/App_Resources/Android/drawable-xxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/template/app/App_Resources/Android/drawable-xxhdpi/icon.png -------------------------------------------------------------------------------- /template/app/App_Resources/Android/drawable-xxhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/template/app/App_Resources/Android/drawable-xxhdpi/logo.png -------------------------------------------------------------------------------- /template/app/App_Resources/Android/drawable-xxxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/template/app/App_Resources/Android/drawable-xxxhdpi/icon.png -------------------------------------------------------------------------------- /template/app/App_Resources/Android/drawable-xxxhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/template/app/App_Resources/Android/drawable-xxxhdpi/logo.png -------------------------------------------------------------------------------- /template/app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "android": { 3 | "v8Flags": "--expose_gc" 4 | }, 5 | "main": "app.js", 6 | "name": "nativescript-vue-example", 7 | "version": "1.0.0" 8 | } 9 | -------------------------------------------------------------------------------- /template/app/App_Resources/Android/drawable-hdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/template/app/App_Resources/Android/drawable-hdpi/background.png -------------------------------------------------------------------------------- /template/app/App_Resources/Android/drawable-ldpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/template/app/App_Resources/Android/drawable-ldpi/background.png -------------------------------------------------------------------------------- /template/app/App_Resources/Android/drawable-mdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/template/app/App_Resources/Android/drawable-mdpi/background.png -------------------------------------------------------------------------------- /template/app/App_Resources/Android/drawable-xhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/template/app/App_Resources/Android/drawable-xhdpi/background.png -------------------------------------------------------------------------------- /template/app/App_Resources/Android/drawable-xxhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/template/app/App_Resources/Android/drawable-xxhdpi/background.png -------------------------------------------------------------------------------- /template/app/App_Resources/Android/drawable-xxxhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/template/app/App_Resources/Android/drawable-xxxhdpi/background.png -------------------------------------------------------------------------------- /template/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/template/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png -------------------------------------------------------------------------------- /template/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/template/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png -------------------------------------------------------------------------------- /template/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/template/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png -------------------------------------------------------------------------------- /template/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/template/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png -------------------------------------------------------------------------------- /template/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/template/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png -------------------------------------------------------------------------------- /template/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/template/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png -------------------------------------------------------------------------------- /template/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/template/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png -------------------------------------------------------------------------------- /template/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/template/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png -------------------------------------------------------------------------------- /template/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/template/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png -------------------------------------------------------------------------------- /template/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/template/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png -------------------------------------------------------------------------------- /template/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/template/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png -------------------------------------------------------------------------------- /template/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/template/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png -------------------------------------------------------------------------------- /template/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/template/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png -------------------------------------------------------------------------------- /template/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/template/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png -------------------------------------------------------------------------------- /template/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-1125h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/template/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-1125h.png -------------------------------------------------------------------------------- /template/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/template/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png -------------------------------------------------------------------------------- /template/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/template/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png -------------------------------------------------------------------------------- /template/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/template/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png -------------------------------------------------------------------------------- /template/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/template/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png -------------------------------------------------------------------------------- /template/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/template/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png -------------------------------------------------------------------------------- /template/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-X.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/template/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-X.png -------------------------------------------------------------------------------- /template/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/template/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png -------------------------------------------------------------------------------- /template/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/template/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png -------------------------------------------------------------------------------- /template/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/template/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png -------------------------------------------------------------------------------- /template/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/template/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png -------------------------------------------------------------------------------- /template/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/template/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png -------------------------------------------------------------------------------- /template/app/App_Resources/Android/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | NativeScript-Vue Application 4 | NativeScript-Vue Application 5 | 6 | -------------------------------------------------------------------------------- /template/app/App_Resources/Android/values-v21/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | NativeScript-Vue Application 4 | NativeScript-Vue Application 5 | 6 | -------------------------------------------------------------------------------- /template/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/template/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png -------------------------------------------------------------------------------- /template/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drehimself/nativescript-vue-example/HEAD/template/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png -------------------------------------------------------------------------------- /template/app/App_Resources/Android/app.gradle: -------------------------------------------------------------------------------- 1 | // Add your native dependencies here: 2 | 3 | android { 4 | defaultConfig { 5 | generatedDensities = [] 6 | applicationId = "__PACKAGE__" 7 | } 8 | aaptOptions { 9 | additionalParameters "--no-version-vectors" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /template/app/App_Resources/Android/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #F5F5F5 4 | #757575 5 | #33B5E5 6 | #272734 7 | -------------------------------------------------------------------------------- /template/app/App_Resources/Android/drawable-nodpi/splash_screen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/store/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'nativescript-vue'; 2 | import Vuex from 'vuex'; 3 | 4 | import counter from './modules/counter'; 5 | 6 | Vue.use(Vuex); 7 | 8 | const debug = process.env.NODE_ENV !== 'production'; 9 | 10 | const store = new Vuex.Store({ 11 | modules: { 12 | counter, 13 | }, 14 | strict: debug, 15 | }); 16 | 17 | Vue.prototype.$store = store; 18 | 19 | module.exports = store; -------------------------------------------------------------------------------- /src/store/modules/counter.js: -------------------------------------------------------------------------------- 1 | const state = { 2 | count: 0, 3 | }; 4 | 5 | const mutations = { 6 | decrement (state) { 7 | state.count--; 8 | }, 9 | increment (state) { 10 | state.count++; 11 | }, 12 | }; 13 | 14 | const actions = { 15 | increment: ({commit}) => commit('increment'), 16 | decrement: ({commit}) => commit('decrement'), 17 | }; 18 | 19 | export default { 20 | state, 21 | mutations, 22 | actions, 23 | }; 24 | -------------------------------------------------------------------------------- /template/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 | } -------------------------------------------------------------------------------- /template/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 | } -------------------------------------------------------------------------------- /template/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 | -------------------------------------------------------------------------------- /src/components/ImagePage.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 28 | 29 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'nativescript-vue'; 2 | 3 | import router from './router'; 4 | 5 | import store from './store'; 6 | 7 | import './styles.scss'; 8 | 9 | Vue.registerElement('CardView', () => require('nativescript-cardview').CardView) 10 | Vue.registerElement("PullToRefresh", () => require("nativescript-pulltorefresh").PullToRefresh) 11 | Vue.registerElement("Gradient", () => require("nativescript-gradient").Gradient); 12 | 13 | var Toast = require("nativescript-toast"); 14 | 15 | // Uncommment the following to see NativeScript-Vue output logs 16 | Vue.config.silent = false; 17 | 18 | new Vue({ 19 | 20 | router, 21 | 22 | store, 23 | 24 | }).$start(); 25 | -------------------------------------------------------------------------------- /src/components/Home.vue: -------------------------------------------------------------------------------- 1 | 16 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # NativeScript-Vue Application 2 | 3 | > A native application built with NativeScript-Vue 4 | 5 | ## Usage 6 | 7 | ``` bash 8 | # Install dependencies 9 | npm install 10 | 11 | # Build for production 12 | npm run build 13 | npm run build: 14 | 15 | # Build, watch for changes and debug the application 16 | npm run debug 17 | npm run debug: 18 | 19 | # Build, watch for changes and run the application 20 | npm run watch 21 | npm run watch: 22 | 23 | # Clean the NativeScript application instance (i.e. rm -rf dist) 24 | npm run clean 25 | ``` 26 | 27 | > When invoking the various npm scripts, omitting the platform will attempt to launch `tns` for both platforms, which will only work in a properly configured OSX environment. 28 | 29 | For detailed instructions, see https://github.com/nativescript-vue/vue-cli-template -------------------------------------------------------------------------------- /template/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nativescript-vue-example", 3 | "description": "A native application built with NativeScript-Vue", 4 | "license": "MIT", 5 | "readme": "NativeScript-Vue Application", 6 | "nativescript": { 7 | "id": "org.nativescript.application" 8 | }, 9 | "dependencies": { 10 | "nativescript-theme-core": "^1.0.4", 11 | "nativescript-vue": "^1.3.1", 12 | "tns-core-modules": "~3.4.1", 13 | "nativescript-cardview": "^3.1.0", 14 | "nativescript-fancyalert": "^1.2.0", 15 | "nativescript-feedback": "^1.2.0", 16 | "nativescript-pulltorefresh": "^2.1.1", 17 | "nativescript-toast": "^1.4.6", 18 | "nativescript-gradient": "^2.0.1" 19 | }, 20 | "devDependencies": { 21 | "babel-traverse": "6.26.0", 22 | "babel-types": "6.26.0", 23 | "babylon": "6.18.0", 24 | "lazy": "1.0.11" 25 | } 26 | } -------------------------------------------------------------------------------- /src/components/HelloWorld.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 27 | 28 | 37 | -------------------------------------------------------------------------------- /template/app/App_Resources/Android/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 11 | 14 | 15 | 16 | 19 | 20 | 23 | -------------------------------------------------------------------------------- /src/components/Counter.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 37 | -------------------------------------------------------------------------------- /src/styles.scss: -------------------------------------------------------------------------------- 1 | // NativeScript core theme 2 | // @see https://docs.nativescript.org/ui/theme 3 | @import '~nativescript-theme-core/scss/skins/light/index'; 4 | @import '~nativescript-theme-core/scss/index'; 5 | 6 | // Global SCSS styling 7 | // @see https://docs.nativescript.org/ui/styling 8 | 9 | .info { 10 | font-size: 20; 11 | margin: 4; 12 | } 13 | 14 | .size16 { 15 | font-size: 16; 16 | margin: 2; 17 | } 18 | 19 | .clear-btn { 20 | background-color: white; 21 | padding: 5px; 22 | } 23 | 24 | .blue { 25 | color: #6a78c5; 26 | } 27 | 28 | .gray { 29 | color: #666; 30 | } 31 | 32 | .white { 33 | color: #fff; 34 | } 35 | 36 | .avatar-circle { 37 | font-size: 35; 38 | height: 50; 39 | width: 50; 40 | color: #fff; 41 | background-color: #ff4081; 42 | border-radius: 25; 43 | margin-left: 16; 44 | margin-top: 5; 45 | horizontal-align: center; 46 | vertical-align: center; 47 | text-align: center; 48 | } 49 | 50 | .blackCard { 51 | background-color: #333; 52 | color: white; 53 | } 54 | 55 | .blueCard { 56 | background-color: #3489db; 57 | color: white; 58 | } 59 | 60 | .jokerCard { 61 | background-color: yellow; 62 | } 63 | 64 | .whiteCard { 65 | background-color: #fff; 66 | } 67 | -------------------------------------------------------------------------------- /prepare.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs-extra'); 2 | const path = require('path'); 3 | const {execSync} = require('child_process'); 4 | const winston = require('winston-color'); 5 | 6 | const distPath = path.resolve(__dirname, './dist'); 7 | const tplPath = path.resolve(__dirname, './template'); 8 | 9 | const appPackage = require('./package.json'); 10 | const tplPackage = require('./template/package.json'); 11 | 12 | function copyNativeScriptPlugins () { 13 | winston.info('Copying NativeScript plugins to template dependencies...'); 14 | const plugins = Object.keys(appPackage.dependencies) 15 | .filter(key => key.indexOf('nativescript-') !== -1) 16 | .reduce((obj, key) => { 17 | obj[key] = appPackage.dependencies[key]; 18 | return obj; 19 | }, {}); 20 | Object.assign(tplPackage.dependencies, plugins); 21 | fs.writeFileSync(tplPath + '/package.json', JSON.stringify(tplPackage, null, 2)); 22 | } 23 | 24 | function updateDistFromTemplate () { 25 | winston.info('Preparing NativeScript application from template...'); 26 | fs.ensureDirSync(distPath); 27 | fs.copySync(tplPath, distPath, {overwrite: false}); 28 | execSync('npm i', {cwd: 'dist'}); 29 | } 30 | 31 | module.exports = () => { 32 | copyNativeScriptPlugins(); 33 | updateDistFromTemplate(); 34 | }; 35 | -------------------------------------------------------------------------------- /template/app/App_Resources/Android/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /launch.js: -------------------------------------------------------------------------------- 1 | const {exec} = require('child_process'); 2 | const winston = require('winston-color'); 3 | 4 | const action = process.argv[2]; 5 | let platform = process.argv[3]; 6 | 7 | // Validate action 8 | if (['build', 'debug', 'run'].indexOf(action) === -1) { 9 | winston.error('Invalid action'); 10 | process.exit(1); 11 | } 12 | 13 | // Validation platform 14 | if ([undefined, 'android', 'ios'].indexOf(platform) === -1) { 15 | winston.error('Invalid platform'); 16 | process.exit(1); 17 | } 18 | 19 | switch (action) { 20 | case 'build': 21 | winston.info('Building NativeScript application...'); 22 | break; 23 | 24 | case 'debug': 25 | winston.info('Debugging NativeScript application...'); 26 | break; 27 | 28 | case 'run': 29 | winston.info('Running NativeScript application...'); 30 | break; 31 | } 32 | 33 | if (action !== 'run' && !platform) { 34 | let tnsAndroidProcess = exec(`tns --path dist ${action} android`); 35 | let tnsiOSProcess = exec(`tns --path dist ${action} ios`); 36 | tnsAndroidProcess.stdout.pipe(process.stdout); 37 | tnsAndroidProcess.on('exit', function (code) { 38 | if(code != 0) process.exit(code) 39 | }); 40 | tnsiOSProcess.stdout.pipe(process.stdout); 41 | tnsiOSProcess.on('exit', function (code) { 42 | if(code != 0) process.exit(code) 43 | }); 44 | } 45 | else { 46 | let tnsProcess = exec(`tns --path dist ${action} ${platform || ''}`); 47 | tnsProcess.stdout.pipe(process.stdout); 48 | tnsProcess.on('exit', function (code) { 49 | if(code != 0) process.exit(code) 50 | }); 51 | } 52 | -------------------------------------------------------------------------------- /src/router/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'nativescript-vue'; 2 | import VueRouter from 'vue-router'; 3 | 4 | Vue.use(VueRouter); 5 | 6 | import Home from '../components/Home'; 7 | import HelloWorld from '../components/HelloWorld'; 8 | import Counter from '../components/Counter'; 9 | import Reddit from '../components/Reddit'; 10 | import Plugins from '../components/Plugins'; 11 | import Refresh from '../components/Refresh'; 12 | import Login from '../components/Login'; 13 | 14 | const router = new VueRouter({ 15 | pageRouting: true, 16 | routes: [ 17 | { 18 | path: '/home', 19 | component: Home, 20 | meta: { 21 | title: 'Home', 22 | }, 23 | }, 24 | { 25 | path: '/hello', 26 | component: HelloWorld, 27 | meta: { 28 | title: 'Hello World', 29 | }, 30 | }, 31 | { 32 | path: '/counter', 33 | component: Counter, 34 | meta: { 35 | title: 'Counter', 36 | }, 37 | }, 38 | { 39 | path: '/reddit', 40 | component: Reddit, 41 | meta: { 42 | title: 'Reddit', 43 | }, 44 | }, 45 | { 46 | path: '/plugins', 47 | component: Plugins, 48 | meta: { 49 | title: 'Plugins', 50 | }, 51 | }, 52 | { 53 | path: '/refresh', 54 | component: Refresh, 55 | meta: { 56 | title: 'Refresh', 57 | }, 58 | }, 59 | { 60 | path: '/login', 61 | component: Login, 62 | meta: { 63 | title: 'Login', 64 | }, 65 | }, 66 | {path: '*', redirect: '/home'}, 67 | ], 68 | }); 69 | 70 | router.replace('/home'); 71 | 72 | module.exports = router; 73 | -------------------------------------------------------------------------------- /template/app/App_Resources/iOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | NativeScript-Vue Application 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0.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 | -------------------------------------------------------------------------------- /src/components/Reddit.vue: -------------------------------------------------------------------------------- 1 | 19 | 20 | 59 | -------------------------------------------------------------------------------- /src/components/Plugins.vue: -------------------------------------------------------------------------------- 1 | 22 | 23 | 51 | -------------------------------------------------------------------------------- /template/app/App_Resources/Android/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 17 | 18 | 20 | 21 | 22 | 29 | 30 | 32 | 33 | 34 | 39 | 40 | 42 | 43 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nativescript-vue-example", 3 | "version": "1.0.0", 4 | "description": "A native application built with NativeScript-Vue", 5 | "author": "Andre Madarang ", 6 | "license": "MIT", 7 | "scripts": { 8 | "build": "webpack --env.tnsAction build", 9 | "build:android": "npm run build -- --env.android", 10 | "build:ios": "npm run build -- --env.ios", 11 | "debug": "webpack --watch --env.tnsAction debug", 12 | "debug:android": "npm run debug -- --env.android", 13 | "debug:ios": "npm run debug -- --env.ios", 14 | "watch": "webpack --watch --env.tnsAction run", 15 | "watch:android": "npm run watch -- --env.android", 16 | "watch:ios": "npm run watch -- --env.ios", 17 | "clean": "rimraf dist" 18 | }, 19 | "dependencies": { 20 | "axios": "^0.18.0", 21 | "nativescript-cardview": "^3.1.0", 22 | "nativescript-fancyalert": "^1.2.0", 23 | "nativescript-feedback": "^1.2.0", 24 | "nativescript-gradient": "^2.0.1", 25 | "nativescript-pulltorefresh": "^2.1.1", 26 | "nativescript-theme-core": "^1.0.4", 27 | "nativescript-toast": "^1.4.6", 28 | "nativescript-vue": "^1.3.1", 29 | "tns-core-modules": "~3.4.1", 30 | "vue-router": "^3.0.1", 31 | "vuex": "^3.0.1" 32 | }, 33 | "devDependencies": { 34 | "babel-core": "^6.26.0", 35 | "babel-loader": "^7.1.4", 36 | "babel-plugin-transform-object-rest-spread": "^6.26.0", 37 | "babel-preset-env": "^1.6.1", 38 | "copy-webpack-plugin": "^4.5.1", 39 | "css-loader": "^0.28.11", 40 | "extract-text-webpack-plugin": "^3.0.2", 41 | "fs-extra": "^5.0.0", 42 | "nativescript-vue-externals": "^0.2.0", 43 | "nativescript-vue-loader": "^0.1.5", 44 | "nativescript-vue-target": "^0.1.0", 45 | "nativescript-vue-template-compiler": "^1.3.1", 46 | "node-sass": "^4.7.2", 47 | "ns-vue-loader": "^0.1.2", 48 | "optimize-css-assets-webpack-plugin": "^3.2.0", 49 | "rimraf": "^2.6.2", 50 | "sass-loader": "^6.0.7", 51 | "vue-template-compiler": "^2.5.16", 52 | "webpack": "^3.11.0", 53 | "webpack-synchronizable-shell-plugin": "0.0.7", 54 | "winston-color": "^1.0.0" 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /template/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 | } -------------------------------------------------------------------------------- /src/components/Login.vue: -------------------------------------------------------------------------------- 1 | 32 | 33 | 47 | 48 | 97 | 98 | -------------------------------------------------------------------------------- /src/components/Refresh.vue: -------------------------------------------------------------------------------- 1 | 20 | 21 | 58 | -------------------------------------------------------------------------------- /template/app/App_Resources/iOS/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const webpack = require('webpack'); 3 | const winston = require('winston-color'); 4 | const CopyWebpackPlugin = require('copy-webpack-plugin'); 5 | const ExtractTextPlugin = require('extract-text-webpack-plugin'); 6 | const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin'); 7 | const WebpackSynchronizableShellPlugin = require('webpack-synchronizable-shell-plugin'); 8 | const NativeScriptVueExternals = require('nativescript-vue-externals'); 9 | const NativeScriptVueTarget = require('nativescript-vue-target'); 10 | 11 | // Prepare NativeScript application from template (if necessary) 12 | require('./prepare')(); 13 | 14 | // Generate platform-specific webpack configuration 15 | const config = (platform, launchArgs) => { 16 | 17 | winston.info(`Bundling application for ${platform}...`); 18 | 19 | // CSS / SCSS style extraction loaders 20 | const cssLoader = ExtractTextPlugin.extract({ 21 | use: [ 22 | { 23 | loader: 'css-loader', 24 | options: {url: false}, 25 | }, 26 | ], 27 | }); 28 | const scssLoader = ExtractTextPlugin.extract({ 29 | use: [ 30 | { 31 | loader: 'css-loader', 32 | options: { 33 | url: false, 34 | includePaths: [path.resolve(__dirname, 'node_modules')], 35 | }, 36 | }, 37 | 'sass-loader', 38 | ], 39 | }); 40 | 41 | return { 42 | 43 | target: NativeScriptVueTarget, 44 | 45 | entry: path.resolve(__dirname, './src/main.js'), 46 | 47 | output: { 48 | path: path.resolve(__dirname, './dist/app'), 49 | filename: `app.${platform}.js`, 50 | }, 51 | 52 | module: { 53 | rules: [ 54 | { 55 | test: /\.js$/, 56 | exclude: /(node_modules)/, 57 | loader: 'babel-loader', 58 | }, 59 | 60 | { 61 | test: /\.css$/, 62 | use: cssLoader, 63 | }, 64 | { 65 | test: /\.scss$/, 66 | use: scssLoader, 67 | }, 68 | 69 | { 70 | test: /\.vue$/, 71 | loader: 'ns-vue-loader', 72 | options: { 73 | loaders: { 74 | css: cssLoader, 75 | scss: scssLoader, 76 | }, 77 | }, 78 | }, 79 | ], 80 | }, 81 | 82 | resolve: { 83 | modules: [ 84 | 'node_modules/tns-core-modules', 85 | 'node_modules', 86 | ], 87 | extensions: [ 88 | `.${platform}.css`, 89 | '.css', 90 | `.${platform}.scss`, 91 | '.scss', 92 | `.${platform}.js`, 93 | '.js', 94 | `.${platform}.vue`, 95 | '.vue', 96 | ], 97 | }, 98 | 99 | externals: NativeScriptVueExternals, 100 | 101 | plugins: [ 102 | 103 | // Extract CSS to separate file 104 | new ExtractTextPlugin({filename: `app.${platform}.css`}), 105 | 106 | // Optimize CSS output 107 | new OptimizeCssAssetsPlugin({ 108 | cssProcessor: require('cssnano'), 109 | cssProcessorOptions: { 110 | discardComments: { removeAll: true }, 111 | normalizeUrl: false 112 | }, 113 | canPrint: false, 114 | }), 115 | 116 | // Minify JavaScript code 117 | new webpack.optimize.UglifyJsPlugin({ 118 | compress: {warnings: false}, 119 | output: {comments: false}, 120 | }), 121 | 122 | // Copy src/assets/**/* to dist/ 123 | new CopyWebpackPlugin([ 124 | {from: 'assets', context: 'src'}, 125 | ]), 126 | 127 | // Execute post-build scripts with specific arguments 128 | new WebpackSynchronizableShellPlugin({ 129 | onBuildEnd: { 130 | scripts: [ 131 | ... launchArgs ? [`node launch.js ${launchArgs}`] : [], 132 | ], 133 | blocking: false, 134 | }, 135 | }), 136 | 137 | ], 138 | 139 | stats: 'errors-only', 140 | 141 | node: { 142 | 'http': false, 143 | 'timers': false, 144 | 'setImmediate': false, 145 | 'fs': 'empty', 146 | }, 147 | 148 | }; 149 | }; 150 | 151 | // Determine platform(s) and action from webpack env arguments 152 | module.exports = env => { 153 | const action = (!env || !env.tnsAction) ? 'build' : env.tnsAction; 154 | 155 | if (!env || (!env.android && !env.ios)) { 156 | return [config('android'), config('ios', action)]; 157 | } 158 | 159 | return env.android && config('android', `${action} android`) 160 | || env.ios && config('ios', `${action} ios`) 161 | || {}; 162 | }; 163 | -------------------------------------------------------------------------------- /template/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "extent" : "full-screen", 5 | "idiom" : "iphone", 6 | "subtype" : "2436h", 7 | "filename" : "Default-1125h.png", 8 | "minimum-system-version" : "11.0", 9 | "orientation" : "portrait", 10 | "scale" : "3x" 11 | }, 12 | { 13 | "orientation" : "landscape", 14 | "idiom" : "iphone", 15 | "extent" : "full-screen", 16 | "filename" : "Default-Landscape-X.png", 17 | "minimum-system-version" : "11.0", 18 | "subtype" : "2436h", 19 | "scale" : "3x" 20 | }, 21 | { 22 | "extent" : "full-screen", 23 | "idiom" : "iphone", 24 | "subtype" : "736h", 25 | "filename" : "Default-736h@3x.png", 26 | "minimum-system-version" : "8.0", 27 | "orientation" : "portrait", 28 | "scale" : "3x" 29 | }, 30 | { 31 | "extent" : "full-screen", 32 | "idiom" : "iphone", 33 | "subtype" : "736h", 34 | "filename" : "Default-Landscape@3x.png", 35 | "minimum-system-version" : "8.0", 36 | "orientation" : "landscape", 37 | "scale" : "3x" 38 | }, 39 | { 40 | "extent" : "full-screen", 41 | "idiom" : "iphone", 42 | "subtype" : "667h", 43 | "filename" : "Default-667h@2x.png", 44 | "minimum-system-version" : "8.0", 45 | "orientation" : "portrait", 46 | "scale" : "2x" 47 | }, 48 | { 49 | "orientation" : "portrait", 50 | "idiom" : "iphone", 51 | "filename" : "Default@2x.png", 52 | "extent" : "full-screen", 53 | "minimum-system-version" : "7.0", 54 | "scale" : "2x" 55 | }, 56 | { 57 | "extent" : "full-screen", 58 | "idiom" : "iphone", 59 | "subtype" : "retina4", 60 | "filename" : "Default-568h@2x.png", 61 | "minimum-system-version" : "7.0", 62 | "orientation" : "portrait", 63 | "scale" : "2x" 64 | }, 65 | { 66 | "orientation" : "portrait", 67 | "idiom" : "ipad", 68 | "filename" : "Default-Portrait.png", 69 | "extent" : "full-screen", 70 | "minimum-system-version" : "7.0", 71 | "scale" : "1x" 72 | }, 73 | { 74 | "orientation" : "landscape", 75 | "idiom" : "ipad", 76 | "filename" : "Default-Landscape.png", 77 | "extent" : "full-screen", 78 | "minimum-system-version" : "7.0", 79 | "scale" : "1x" 80 | }, 81 | { 82 | "orientation" : "portrait", 83 | "idiom" : "ipad", 84 | "filename" : "Default-Portrait@2x.png", 85 | "extent" : "full-screen", 86 | "minimum-system-version" : "7.0", 87 | "scale" : "2x" 88 | }, 89 | { 90 | "orientation" : "landscape", 91 | "idiom" : "ipad", 92 | "filename" : "Default-Landscape@2x.png", 93 | "extent" : "full-screen", 94 | "minimum-system-version" : "7.0", 95 | "scale" : "2x" 96 | }, 97 | { 98 | "orientation" : "portrait", 99 | "idiom" : "iphone", 100 | "filename" : "Default.png", 101 | "extent" : "full-screen", 102 | "scale" : "1x" 103 | }, 104 | { 105 | "orientation" : "portrait", 106 | "idiom" : "iphone", 107 | "filename" : "Default@2x.png", 108 | "extent" : "full-screen", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "orientation" : "portrait", 113 | "idiom" : "iphone", 114 | "filename" : "Default-568h@2x.png", 115 | "extent" : "full-screen", 116 | "subtype" : "retina4", 117 | "scale" : "2x" 118 | }, 119 | { 120 | "orientation" : "portrait", 121 | "idiom" : "ipad", 122 | "extent" : "to-status-bar", 123 | "scale" : "1x" 124 | }, 125 | { 126 | "orientation" : "portrait", 127 | "idiom" : "ipad", 128 | "filename" : "Default-Portrait.png", 129 | "extent" : "full-screen", 130 | "scale" : "1x" 131 | }, 132 | { 133 | "orientation" : "landscape", 134 | "idiom" : "ipad", 135 | "extent" : "to-status-bar", 136 | "scale" : "1x" 137 | }, 138 | { 139 | "orientation" : "landscape", 140 | "idiom" : "ipad", 141 | "filename" : "Default-Landscape.png", 142 | "extent" : "full-screen", 143 | "scale" : "1x" 144 | }, 145 | { 146 | "orientation" : "portrait", 147 | "idiom" : "ipad", 148 | "extent" : "to-status-bar", 149 | "scale" : "2x" 150 | }, 151 | { 152 | "orientation" : "portrait", 153 | "idiom" : "ipad", 154 | "filename" : "Default-Portrait@2x.png", 155 | "extent" : "full-screen", 156 | "scale" : "2x" 157 | }, 158 | { 159 | "orientation" : "landscape", 160 | "idiom" : "ipad", 161 | "extent" : "to-status-bar", 162 | "scale" : "2x" 163 | }, 164 | { 165 | "orientation" : "landscape", 166 | "idiom" : "ipad", 167 | "filename" : "Default-Landscape@2x.png", 168 | "extent" : "full-screen", 169 | "scale" : "2x" 170 | } 171 | ], 172 | "info" : { 173 | "version" : 1, 174 | "author" : "xcode" 175 | } 176 | } --------------------------------------------------------------------------------