diff --git a/.eslintignore b/.eslintignore
new file mode 100644
index 0000000..6ef5839
--- /dev/null
+++ b/.eslintignore
@@ -0,0 +1,2 @@
+node_modules/
+generator/templates/
\ No newline at end of file
diff --git a/.eslintrc.js b/.eslintrc.js
new file mode 100644
index 0000000..cc7dc36
--- /dev/null
+++ b/.eslintrc.js
@@ -0,0 +1,36 @@
+module.exports = {
+ "root": true,
+ "env": {
+ "node": true
+ },
+ "extends": [
+ "eslint:recommended",
+ "plugin:vue/recommended",
+ "@vue/airbnb",
+ "@vue/prettier"
+ ],
+ "rules": {
+ "import/extensions": 0,
+ "global-require": 0,
+ "eol-last": 0,
+ "no-param-reassign": 0,
+ "object-curly-newline": 0,
+ "no-plusplus": 0,
+ "max-len": [
+ 2,
+ {
+ "code": 160
+ }
+ ],
+ "prefer-destructuring": [
+ 2,
+ {
+ "object": true,
+ "array": false
+ }
+ ]
+ },
+ "parserOptions": {
+ "parser": "babel-eslint"
+ }
+}
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index 40b878d..18566ec 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
-node_modules/
\ No newline at end of file
+node_modules/
+.vscode
\ No newline at end of file
diff --git a/.prettierignore b/.prettierignore
new file mode 100644
index 0000000..95668c3
--- /dev/null
+++ b/.prettierignore
@@ -0,0 +1 @@
+generator/templates/*
\ No newline at end of file
diff --git a/.prettierrc b/.prettierrc
new file mode 100644
index 0000000..f0f8e68
--- /dev/null
+++ b/.prettierrc
@@ -0,0 +1,10 @@
+{
+ "printWidth": 160,
+ "singleQuote": true,
+ "trailingComma": "none",
+ "tabWidth": 2,
+ "semicolons": true,
+ "bracketSpacing": true,
+ "arrowParens": "always",
+ "useTabs": false
+}
\ No newline at end of file
diff --git a/README.md b/README.md
index f80b854..fc853d5 100644
--- a/README.md
+++ b/README.md
@@ -1 +1,245 @@
-# nativescript-vue-cli-plugin
\ No newline at end of file
+# nativescript-vue-cli-plugin
+
+Nativescript-Vue Plugin for [vue-cli@3.0](https://github.com/vuejs/vue-cli)
+
+This plugin will integrate [Nativescript-Vue](https://nativescript-vue.org/) into new and existing Vue projects. Additionally, it will allow for the choice of developing for Native only environments or Native __and__ Web environments under a single project structure. In addition, choosing to integrate [Nativescript-Vue-Web](https://github.com/Nativescript-Vue-Web/Nativescript-Vue-Web), will allow for the development of Web components with a NativeScript-Vue like syntax that has the benefit of allowing for the sharing of components between the Native and Web sides of the project. This helps reduce the amount of code, maintenence needs, and the amount of time needed for development activities.
+
+## Sharing logic in a single Web and Native capable component
+The key feature of this plugin is that it will allow you to compose SFC's that contain both Web and Native structures in them. If your component has exactly the same logic (`
+
+
+```
+
+### Optional Separation of concerns for Web and Native SFC's
+If you want complete seperation of concerns between Web and Native for components, core logic and styling, you can also provide an alternate file naming scheme in your project. The name will dictate which mode (Web or Native) and platform (Android or IOS) the file will be used with. The same overall schema will work for `.vue`, `.js`, `.ts`, `.scss`, `.css`, `.styl`, and `.less` files.
+
+| File Type | Android __and__ IOS | Android only | IOS only | Web only |
+| ---------- | ------------------- | --------------- | --------------- | --------------- |
+| vue | *.native.vue | *.android.vue | *.ios.vue | *.vue |
+| js | *.native.js | *.android.js | *.ios.js | *.js |
+| ts | *.native.ts | *.android.ts | *.ios.ts | *.ts |
+| scss | *.native.scss | *.android.scss | *.ios.scss | *.scss |
+| css | *.native.css | *.android.css | *.ios.css | *.css |
+| stylus | *.native.styl | *.android.styl | *.ios.styl | *.styl |
+| less | *.native.less | *.android.less | *.ios.less | *.less |
+
+Webpack will handle figuring out which files to include based on the `npm run` command syntax you pass in. You can also mix and match this file naming schema with the `web` or `native` tag options mentioned above.
+
+At `serve` or `build` in conjunction with the mode such as `android` or `ios`, Webpack will filter which files are looked at. For instance, if you do `npm run serve:android`, then it will look for `*.native.vue` and `*.android.vue` files and ignore `*.ios.vue` files entirely. Conversely, it will do the same when you are working with `ios` and will ignore `*.android.vue` files.
+
+This will allow you to develop generic native components under the `*.native.vue` file extension, but in special cases, it may require you to do platform specific components, core logic and styling. Use the corrosponding file extension to allow this to happen.
+
+If you are building for web, then just `*.vue` will work and if you are building for a Native __only__ project, then `*.vue` will work as well as the previous options mentioned.
+
+## Sharing components and assets between Native and Web SFC's
+If you want to use common components and assets between `web`, `android` and `ios`, you can do that. For `assets`, place them in `src/assets` and for components, place them in `src/components`. At compile time, assets will be copied to the output directory's `assets` folder and can be universally accessed across environments via something like `~/assets/logo.png`. For components, they can be universally accessed via something similar to `components/HelloWorld`.
+
+## Install
+
+If vue-cli 3 is not yet installed, first follow the instructions here: https://github.com/vuejs/vue-cli
+
+**Tip**: If you don't want to overwrite your current vue-cli 2 setup because you still need `vue init`, [then try this](https://cli.vuejs.org/guide/creating-a-project.html#pulling-2-x-templates-legacy).
+
+Generate a project using vue-cli 3.0
+```bash
+vue create my-app
+```
+
+Before installing the Nativescript-Vue CLI 3 Plugin, make sure to commit or stash changes in case you need to revert.
+
+To install the Nativescript-Vue CLI 3 Plugin...
+```bash
+cd my-app
+vue add vue-cli-plugin-nativescript-vue
+```
+
+## Invocation Prompts
+1. Enter a unique application identifier
+ * Accepting the default is fine for testing
+2. Use HTML5 history mode? (Default: hash mode)
+ * Required parameter for the cli core generator when vue-router is used
+3. Is this a brand new project? (Default: Yes)
+ * By choosing `No`, the plugin will try and be as non-destructive as possible to an existing project. It will do this by adding a folder into root named `ns-example` and add files into there to provide examples of how a project would change.
+ * These changes will factor in answers to the other questions and adjust accordingly. Regardless of the answer, the plugin will install packages and adjust `package.json` as necessary to prep the project.
+4. Dual Native AND Web development experience or a Native only? (Default: Dual)
+ * By default, the plugin will assume you want to develop for the Web and Native environments within the same project. As such, there will be two sides to the project where web environments will be actively developed within `/src` and Native environments will be developed within `/app` unless you choose to integrate `Nativescript-Vue-Web` and all files will be placed in `/src`.
+ * Warning: Choosing to develop for Native only will move the main entry point of the project and development folder to `/app`, it will copy the necessary files and then delete `/src`.
+ * By choosing `Dual`, you will be able to bring your own component framework into the web portion of the project. `NativeScript-Vue` [cannot use vue-router](https://nativescript-vue.org/en/docs/routing/vue-router/) currently, so you will have to provide your own manual routing. The templated options deployed with the plugin will show how to do basic manual routing.
+5. What type of template do you want to start with? (Default: Simple)
+ * Simple is just a simple setup with a header and basic routing.
+ * [Nativescript-Vue-Web](https://github.com/Nativescript-Vue-Web/Nativescript-Vue-Web) - The Simple template, but with NS-Vue like syntax for web components. This option should only appear if you have chosen to develop in the Dual Web and Native environments. This option will effecively integrate a web component framework that will allow you to develop components that can be used in the Web and Native side of the project. It uses `NativeScript-Vue` like syntax on components which will allow for the sharing of components between NativeScript and Web.
+ * Sidebar (currently disabled), will allow you to start with a project that includes a fixed header and pop-out sidebar menu.
+ * We expect to add more templates in the future as use cases come up.
+
+## Running the project
+You will have several options in serving and building the project:
+1. `npm run serve:web`
+2. `npm run serve:android`
+3. `npm run serve:ios`
+4. `npm run build:web`
+5. `npm run build:android`
+6. `npm run build:ios`
+
+
+The basic `serve` and `build` options should be similar to what is in a CLI 3 project except the added options to dictate which kind of environment you are using: `web`, `android` or `ios`. Please note that when building web projects, they will output to `dist` and when building native projects, they will output to `platforms\android` or `platforms\ios` depending on which you are building at the time.
+
+### Debugging your project
+You will have the standard options for debugging available to you as you would with just `tns`. You can do the following to debug Native versions of your app.
+1. `npm run debug:android`
+2. `npm run debug:ios`
+
+You should then be able to attach the Chrome debugger as you normally would via the [NativeScript docs](https://docs.nativescript.org/angular/tooling/debugging/chrome-devtools).
+
+You should also be able to debug directly in VSCode. The [NativeScript VSCode Extension docs](https://docs.nativescript.org/angular/tooling/visual-studio-code-extension) are a good place to start with understanding how to do this. However, you will need to modify your `launch.json` file to force `tns` to work properly with VUE CLI 3.
+
+Your `launch.json` file should look something like below. Notice the different in the `tnsArgs` line that is different than what is in the documentation link above.
+```json
+{
+ "version": "0.2.0",
+ "configurations": [
+ {
+ "name": "Launch on iOS",
+ "type": "nativescript",
+ "request": "launch",
+ "platform": "ios",
+ "appRoot": "${workspaceRoot}",
+ "sourceMaps": true,
+ "watch": true,
+ "tnsArgs":[" --bundle --env.development cross-env-shell VUE_CLI_MODE=development.ios"]
+ },
+ {
+ "name": "Attach on iOS",
+ "type": "nativescript",
+ "request": "attach",
+ "platform": "ios",
+ "appRoot": "${workspaceRoot}",
+ "sourceMaps": true,
+ "watch": false
+ },
+ {
+ "name": "Launch on Android",
+ "type": "nativescript",
+ "request": "launch",
+ "platform": "android",
+ "appRoot": "${workspaceRoot}",
+ "sourceMaps": true,
+ "watch": true,
+ "tnsArgs":[" --bundle --env.development cross-env-shell VUE_CLI_MODE=development.android"]
+ },
+ {
+ "name": "Attach on Android",
+ "type": "nativescript",
+ "request": "attach",
+ "platform": "android",
+ "appRoot": "${workspaceRoot}",
+ "sourceMaps": true,
+ "watch": false
+ },
+ {
+ "type": "chrome",
+ "request": "launch",
+ "name": "web: chrome",
+ "url": "http://localhost:8080",
+ "webRoot": "${workspaceFolder}/src",
+ "breakOnLoad": true,
+ "sourceMapPathOverrides": {
+ "webpack:///src/*": "${webRoot}/*"
+ }
+ },
+ ]
+}
+```
+You will also need to modify your `vue.config.js` file to include a `webpack-chain` statement that will setup your source map. It should look something like this:
+```js
+module.exports = {
+ chainWebpack: config => {
+ config
+ .devtool('inline-source-map')
+ }
+}
+```
+
+### Previewing your Project
+You should be able to use the NativeScript Playground and Preview Apps via the following npm statements:
+1. `npm run preview:android`
+2. `npm run preview:ios`
+
+#### --env & --hmr command line recognition
+Basic support for passing the `env` command line option is in place, but has a slightly different syntax since we're working with the CLI 3 webpack infrastructure. To inject items into `env` at run-time, you will need to add `-- --env.option` Where option is one of the recognized options that Nativescript-Vue and this project supports.
+An example of this would be something like this: `npm run serve:android -- --env.production`. This would allow you to serve up a Production build of your Android app versus just running `npm run serve:android` which would serve a Development version of the same.
+
+HMR will also work by passing in `-- --hmr`. An example of this would be `npm run serve:android -- --hmr`
+
+#### Webpack related information
+The options passed in at `npm run` will dictate what webpack config is provided. The first choice webpack will make is if this is a `web` or `native` environment. Then, if it's a `native` environment, it will determine choices to be made between `ios` and `android`.
+
+Each time the project is built or served, the plugin will copy the latest webpack config from the cli to the root of your project. When you build a project, it will clean-up this file at the end, but just serving the project will not. This is an issue with [nativescript-dev-webpack](https://github.com/NativeScript/nativescript-dev-webpack) and cannot be overcome at this time.
+
+#### Inspecting the Webpack config
+If you'd like to see what the webpack config is doing then you can run one of the following:
+
+1. `vue inspect -- --env.android > out-android.js`
+2. `vue inspect -- --env.ios > out-ios.js`
+3. `vue inspect -- --env.web > out-web.js`
+
+These will default to showing you the Development version of the webpack config. You can pass in the `-- --env.production` option to see the Production version of the config. Subtitute `development.android` or `production.ios`, etc to see the different configs based on the environmental variables.
+
+#### Aliases
+Prebuilt in the webpack config are several aliases that you can use. Here is a table listing out the various alias and the folder they use based on the environment chosen:
+
+| Alias | Native | Web |
+| ---------- | --------------- | --------------- |
+| ~ | /app | /src |
+| @ | /app | /src |
+| src | /src | /src |
+| assets | /src/assets | /src/assets |
+| components | /src/components | /src/components |
+| fonts | /src/fonts | /src/fonts |
+| styles | /src/styles | /src/styles |
+| root | / | / |
+
+
+## For TypeScript enabled projects
+If your CLI 3 project has TypeScript enabled, then the plugin will attempt to give you a very basic TypeScript version of the template you choose. When you invoke the plugin and the template generator makes changes, you will notice the `*.d.ts` files that are usually in `src` will be moved to `/types`. The plugin's webpack integration will ensure these files are referenced correctly at compile and runtimes.
diff --git a/generator/README.md b/generator/README.md
new file mode 100644
index 0000000..3167cfc
--- /dev/null
+++ b/generator/README.md
@@ -0,0 +1,32 @@
+# nativescript-vue-cli-plugin - Generator Readme
+
+Want to submit a PR for a new template? Read below.
+
+It is __highly, highly, highly suggested__ that you copy/paste the `simple` template in its entirety and then rename the copied directory. It will make it much easier for you to get started using the existing logic in the generator. Modifications to the existing generator logic will be considered for PR, but will have to go through rigourous testing to ensure the changes do not break all pre-existing templates.
+
+If you want to add additional templates to the plugin, then here's the information on how to do it:
+
+1. Create a new option to the prompt question #5 concerning which template you'd like to deploy.
+ * The value for the template should be kept simple and easy.
+2. Create a new directory under `/generator/templates`.
+ * The directory name should __exactly match__ the value from #1. For example if the value from #1 is `simple`, then the directory structure would be `/generator/templates/simple`
+3. The new template directory __must__ have a single first-level subdirectory named `src`.
+4. Inside the `src` directory, you should add the following in an effort to give the template feature consistancy to the other templates:
+ * router.js
+ * main.js
+ * main.native.js (the NS-Vue project entry point)
+ * package.json (this is the standard NativeScript-Vue package.json file. Just copy/paste from the simple template)
+ * App.vue
+ * views/About.vue (optional)
+ * views/Home.vue (optional)
+ * components/HelloWorld.vue (optional)
+ * components/HelloWorld.native.vue (optional)
+ * components/HelloWorld.ios.vue (optional)
+ * components/HelloWorld.android.vue (optional)
+ * assets/logo.png (optional, but highly encouraged to prove images are loading)
+
+Within the \*.vue files you will find [ejs](https://github.com/mde/ejs) syntax that will enable you to differentiate between TypeScript and non-TypeScript projects. Any new templates added to the project __must__ demonstrate they work across these options or the PR to add the template will be rejected.
+
+### Word of warning concerning using EJS templates with Prettier
+Prettier does not support EJS templates and if you have Prettier automatically fix all issues in a `*.vue` template file, then you will run the risk of it overwriting sections of the template from one `if` statement to the `else` side of the statement. Pay close attention to this specifically in your `script` tags as it relates to the TypeScript vs. non-TypeScript parts of the template. Whichever one comes first in the `if` statement will overwrite the section after the `else` statement.
+
diff --git a/generator/index.js b/generator/index.js
index f4019c5..9948d31 100644
--- a/generator/index.js
+++ b/generator/index.js
@@ -1,22 +1,40 @@
+/* eslint-disable no-console */
+
const path = require('path');
const fs = require('fs-extra');
const replace = require('replace-in-file');
+const newline = process.platform === 'win32' ? '\r\n' : '\n';
-module.exports = (api, options, rootOptions) => {
+module.exports = async (api, options, rootOptions) => {
+ const genConfig = {
+ // if it is a new project changes will be written as they normally would with any plugin
+ // if it is an existing project, changes will be added to the ./ns-example directory
+ dirPathPrefix: options.isNewProject === true ? './' : './ns-example/',
- console.log('options.isNativeOnly - ', options.isNativeOnly)
- console.log('options.isNVW - ', options.isNVW)
- console.log('options.isNewProject - ', options.isNewProject)
+ // simple typescript detection and then variable is passed to multiple templating functions
+ // to simply change the file's extension
+ jsOrTs: api.hasPlugin('typescript') ? '.ts' : '.js',
- // New Project & Native Only -- should never be able to use Nativescript-Vue-Web
- if(options.isNativeOnly && options.isNVW) {
- throw Error('Invalid options chosen. You cannot have a Native only project and use Nativescript-Vue-Web')
- }
+ // A template type of 'simple' project will have a base template path that equals: ./templates/simple
+ // then we determine if the project is using Nativescript-Vue-Web and we append a subdirectory to the base path
+ templateTypePathModifer: options.templateType,
+
+ // Get the location to the native app directory
+ nativeAppPathModifier: options.isNativeOnly ? 'app/' : 'src/',
+
+ // Determine the path to App_Resources
+ get appResourcesPathModifier() {
+ return this.nativeAppPathModifier + 'App_Resources';
+ },
- if(options.isNativeOnly)
- options.isNVW = false;
-
+ // setup directories to exclude in the tsconfig.json file(s)
+ get tsExclusionArray() {
+ return ['node_modules', 'dist', 'platforms', 'hooks', this.appResourcesPathModifier];
+ }
+ };
+
+ // common render options to be passed to render functions
const commonRenderOptions = {
applicationName: api.generator.pkg.name,
applicationVersion: api.generator.pkg.version,
@@ -24,235 +42,934 @@ module.exports = (api, options, rootOptions) => {
applicationDescription: api.generator.pkg.description || api.generator.pkg.name,
applicationLicense: api.generator.pkg.license || 'MIT',
applicationId: options.applicationId,
- historyMode: options.historyMode || false,
- doesCompile: api.hasPlugin('babel') || api.hasPlugin('typescript'),
- usingBabel: api.hasPlugin('babel'),
- usingTS: api.hasPlugin('typescript')
- }
+ historyMode: options.historyMode,
+ doesCompile: api.hasPlugin('babel') || api.hasPlugin('typescript') ? true : false,
+ usingBabel: api.hasPlugin('babel') ? true : false,
+ usingTS: api.hasPlugin('typescript') ? true : false
+ };
console.log('adding to package.json');
api.extendPackage({
nativescript: {
- 'id': 'org.nativescript.application',
- 'tns-ios': {
- 'version': '4.2.0'
- },
+ id: 'org.nativescript.application',
'tns-android': {
- 'version': '4.2.0'
+ version: '6.3.1'
+ },
+ 'tns-ios': {
+ version: '6.3.0'
}
},
scripts: {
- "setup-webpack-config": "node ./node_modules/vue-cli-plugin-nativescript-vue/lib/scripts/webpack-maintenance pre",
- "remove-webpack-config": "node ./node_modules/vue-cli-plugin-nativescript-vue/lib/scripts/webpack-maintenance post",
- "serve:web": "vue-cli-service serve --mode development.web",
- "serve:android": "npm run setup-webpack-config && cross-env-shell VUE_CLI_MODE=development.android tns run android --bundle && npm run remove-webpack-config",
- "serve:ios": "npm run setup-webpack-config && cross-env-shell VUE_CLI_MODE=development.ios tns run ios --bundle && npm run remove-webpack-config",
- "build:web": "vue-cli-service build --mode production.web",
- "build:android": "npm run setup-webpack-config && cross-env-shell VUE_CLI_MODE=production.android tns run android --bundle && npm run remove-webpack-config",
- "build:ios": "npm run setup-webpack-config && cross-env-shell VUE_CLI_MODE=production.ios tns run ios --bundle && npm run remove-webpack-config",
- },
+ 'build:android': 'npm run setup-webpack-config && tns build android --env.production && npm run remove-webpack-config',
+ 'build:ios': 'npm run setup-webpack-config && tns build ios --env.production && npm run remove-webpack-config',
+ 'remove-webpack-config': 'node ./node_modules/vue-cli-plugin-nativescript-vue/lib/scripts/webpack-maintenance post',
+ 'serve:android': 'npm run setup-webpack-config && tns run android --env.development',
+ 'serve:ios': 'npm run setup-webpack-config && tns run ios --env.development',
+ // 'inspect:android': 'npm run setup-webpack-config && vue inspect -- --env.android > out-android.js',
+ // 'inspect:ios': 'npm run setup-webpack-config && vue inspect -- --env.ios > out-ios.js',
+ 'debug:android': 'npm run setup-webpack-config && tns debug android --env.development',
+ 'debug:ios': 'npm run setup-webpack-config && tns debug ios --env.development',
+ 'preview:android': 'npm run setup-webpack-config && tns preview --env.development --env.android',
+ 'preview:ios': 'npm run setup-webpack-config && tns preview --env.development --env.ios',
+ 'setup-webpack-config': 'node ./node_modules/vue-cli-plugin-nativescript-vue/lib/scripts/webpack-maintenance pre',
+ 'clean:platforms': 'rimraf platforms',
+ 'clean:android': 'rimraf platforms/android',
+ 'clean:ios': 'rimraf platforms/ios'
+ },
dependencies: {
- 'nativescript-vue': '^2.0.2',
- 'tns-core-modules': '^4.2.1',
+ 'nativescript-vue': '^2.5.0-alpha.3',
+ 'tns-core-modules': '^6.3.2'
},
devDependencies: {
- 'clean-webpack-plugin': '^0.1.19',
- 'copy-webpack-plugin': '^4.6.0',
- 'cross-env': '^5.2.0',
- 'nativescript-dev-webpack': '^0.17.0',
- 'nativescript-vue-template-compiler': '^2.0.2',
- 'nativescript-worker-loader': '~0.9.1',
- 'replace-in-file': '^3.4.2',
+ 'nativescript-dev-webpack': '^1.4.0',
+ 'nativescript-vue-template-compiler': '^2.5.0-alpha.3',
+ 'nativescript-worker-loader': '~0.9.5',
+ 'node-sass': '^4.12.0',
+ 'string-replace-loader': '^2.2.0',
+ rimraf: '^2.6.3'
+ // webpack: '4.28.4',
+ // 'webpack-cli': '^3.3.2'
+ }
+ });
+
+ // add scripts when we are also developing for the web
+ if (!options.isNativeOnly) {
+ api.extendPackage({
+ scripts: {
+ 'serve:web': 'vue-cli-service serve --mode development.web',
+ 'build:web': 'vue-cli-service build --mode production.web'
+ //'inspect:web': 'npm run setup-webpack-config && vue inspect -- --env.web > out-web.js'
+ }
+ });
+
+ // if we are using NativeScript-Vue-Web then add the package
+ if (options.templateType == 'nvw') {
+ api.extendPackage({
+ dependencies: {
+ 'nativescript-vue-web': '^0.9.4'
+ }
+ });
}
- })
+ } else {
+ //
+ }
+
+ if (rootOptions.router) {
+ api.extendPackage({
+ dependencies: {
+ 'nativescript-vue-navigator': '^0.2.0'
+ }
+ });
+ }
+
+ if (api.hasPlugin('typescript')) {
+ api.extendPackage({
+ dependencies: {},
+ devDependencies: {
+ 'fork-ts-checker-webpack-plugin': '^1.5.0',
+ 'terser-webpack-plugin': '^2.1.3',
+ 'tns-platform-declarations': '^6.3.2'
+ }
+ });
+
+ // this means it's a typescript project and using babel
+ if (api.hasPlugin('babel')) {
+ api.extendPackage({
+ dependencies: {},
+ devDependencies: {
+ '@babel/types': '^7.4.4'
+ }
+ });
+ }
+ }
// if the project is using babel, then load appropriate packages
- if(api.hasPlugin('babel')) {
+ if (api.hasPlugin('babel')) {
api.extendPackage({
devDependencies: {
- '@babel/core': '^7.1.2',
- '@babel/preset-env': '^7.1.0',
- '@babel/types': '^7.1.3',
- 'babel-loader': '^8.0.4',
- 'babel-traverse': '^6.26.0',
+ '@babel/core': '^7.5.5',
+ '@babel/preset-env': '^7.5.5',
+ 'babel-loader': '^8.0.6',
+ '@babel/traverse': '^7.5.5'
+ }
+ });
+
+ api.render(async () => {
+ fs.ensureFileSync(genConfig.dirPathPrefix + 'babel.config.js');
+ await applyBabelConfig(api, genConfig.dirPathPrefix + 'babel.config.js');
+ });
+ }
+
+ // if the project is using eslint, add some global variables
+ // to the eslintConfig in order to avoid no-def errors
+ if (api.hasPlugin('eslint')) {
+ api.extendPackage({
+ eslintConfig: {
+ globals: {
+ TNS_APP_MODE: true,
+ TNS_APP_PLATFORM: true
+ }
}
- })
+ });
}
console.log('deleting from package.json');
- api.extendPackage(pkg => {
+ api.extendPackage((pkg) => {
// if the project is using babel, then delete babel-core
- if(api.hasPlugin('babel')) {
- delete pkg.devDependencies[
- 'babel-core'
- ]
+ if (api.hasPlugin('babel')) {
+ delete pkg.devDependencies['babel-core'];
}
// we will be replacing these
- delete pkg.scripts['serve'],
- delete pkg.scripts['build']
+ delete pkg.scripts['serve'], delete pkg.scripts['build'];
- if(options.isNativeOnly) {
- delete pkg.dependencies['vue']
- delete pkg.devDependencies['vue-template-compiler']
- delete pkg.browserslist
+ if (options.isNativeOnly) {
+ delete pkg.browserslist;
}
- })
+ if (options.templateType !== 'nvw') {
+ delete pkg.dependencies['nativescript-vue-web'];
+ }
+ });
+ console.log('doing template rendering');
+ // render App_Resources folder
+ api.render(async () => {
+ // eslint-disable-next-line prettier/prettier
+ await renderDirectoryStructure(
+ api,
+ options,
+ rootOptions,
+ '.js',
+ commonRenderOptions,
+ './templates/App_Resources',
+ genConfig.dirPathPrefix + genConfig.appResourcesPathModifier
+ );
+ });
+
+ // If Native only or Dual Native and Web Project.
+ if (!options.isNativeOnly) {
+ api.render(async () => {
+ // render src directory
+ await renderDirectoryStructure(
+ api,
+ options,
+ rootOptions,
+ genConfig.jsOrTs,
+ commonRenderOptions,
+ path.join('templates', genConfig.templateTypePathModifer, 'src'),
+ genConfig.dirPathPrefix + 'src'
+ );
+
+ // add router statements to src/main.*s
+ await vueRouterSetup(api, genConfig.dirPathPrefix, genConfig.jsOrTs);
+
+ // add vuex statements to src/main.*s
+ await vuexSetup(api, options, genConfig.dirPathPrefix, genConfig.jsOrTs, genConfig.nativeAppPathModifier);
+ });
+ } else {
+ // Is Native Only
+ api.render(async () => {
+ // render app directory
+ await renderDirectoryStructure(
+ api,
+ options,
+ rootOptions,
+ genConfig.jsOrTs,
+ commonRenderOptions,
+ path.join('templates', genConfig.templateTypePathModifer, 'src'),
+ genConfig.dirPathPrefix + genConfig.nativeAppPathModifier.slice(0, -1)
+ );
+
+ // add vuex statements to app/main.*s
+ await vuexSetup(api, options, genConfig.dirPathPrefix, genConfig.jsOrTs);
+ });
+ }
- console.log('doing template rendering');
+ api.onCreateComplete(async () => {
+ // make changes to .gitignore
+ gitignoreAdditions(api);
- // use the answer from the invoke prompt and if it's a new project use the new template
- // and if it is an existing project, use the existing template
- if(options.isNewProject) {
-
- // New Project and not using Nativescript-Vue-Web
- if(!options.isNVW && !options.isNativeOnly) {
- api.render('./templates/simple/without-nvw/new', commonRenderOptions)
-
- if(api.hasPlugin('vue-router')){
- api.injectImports('src/main.js', `import router from '~/router'`)
- api.injectRootOptions('src/main.js', `router`)
- }
-
- if(api.hasPlugin('vuex')){
- api.injectImports('src/main.js', `import store from '~/store'`)
- api.injectRootOptions('src/main.js', `store`)
- api.injectImports('app/main.js', `import store from 'src/store'`)
- api.injectRootOptions('app/main.js', `store`)
-
- }
- }
+ // create files in ./ or ./ns-example
+ writeRootFiles(api, options, genConfig.dirPathPrefix);
- // New Project and is using Nativescript-Vue-Web
- if(options.isNVW && !options.isNativeOnly) {
-
- }
+ // create nsconfig.json in ./ or ./ns-example
+ nsconfigSetup(genConfig.dirPathPrefix, api.resolve('nsconfig.json'), genConfig.nativeAppPathModifier, genConfig.appResourcesPathModifier, options);
- // New Project & Native Only -- should never be able to use Nativescript-Vue-Web
- if(!options.isNVW && options.isNativeOnly) {
- api.render('./templates/simple/native-only/new', commonRenderOptions);
+ // copy over .vue with native.vue files
+ if (options.isNativeOnly) {
+ nativeOnlyRenameFiles(genConfig.dirPathPrefix + genConfig.nativeAppPathModifier.slice(0, -1));
}
- if(options.isNativeOnly && options.isNVW) {
- // should never reach this block of code
+ // remove router config for projects that don't use vue-router
+ if (!rootOptions.router) {
+ fs.remove(genConfig.dirPathPrefix + genConfig.nativeAppPathModifier + 'router' + genConfig.jsOrTs, (err) => {
+ if (err) throw err;
+ });
}
-
- } else { // Exising Project
+ if (api.hasPlugin('typescript')) {
+ // we need to edit the tsconfig.json file in /app
+ // for a Native only project to remove references to /src
+ await tsconfigSetup(options, genConfig.dirPathPrefix, genConfig.nativeAppPathModifier);
+
+ if (fs.existsSync(api.resolve('tslint.json'))) {
+ await tslintSetup(genConfig.dirPathPrefix, api.resolve('tslint.json'), genConfig.tsExclusionArray);
+
+ const baseDir = genConfig.nativeAppPathModifier;
+ require('../lib/tslint')(
+ {
+ _: [`${baseDir}**/*.ts`, `${baseDir}**/*.vue`, `${baseDir}**/*.tsx`, 'tests/**/*.ts', 'tests/**/*.tsx']
+ },
+ api,
+ false
+ );
+ }
+ }
- // Existing Project and not using Nativescript-Vue-Web
- if(!options.isNVW && !options.isNativeOnly) {
- api.render('./templates/simple/without-nvw/existing', commonRenderOptions)
- }
+ // the main difference between New and Existing for this section is
+ // that for New projects we are moving files around, but for
+ // existing projects we are copying files into ./ns-example
+ if (options.isNewProject) {
+ // move type files out of src to ./ or ./ns-example
+ if (api.hasPlugin('typescript')) {
+ // Do these synchronously so in the event we delete the ./src directory in a native only
+ // situation below we don't try and move a file that no longer exists
+ try {
+ fs.moveSync('./src/shims-tsx.d.ts', genConfig.dirPathPrefix + 'types/shims-tsx.d.ts', { overwrite: true });
+ fs.moveSync('./src/shims-vue.d.ts', genConfig.dirPathPrefix + 'types/shims-vue.d.ts', { overwrite: true });
+ } catch (err) {
+ throw err;
+ }
+ }
- // Existing Project and is using Nativescript-Vue-Web
- if(options.isNVW && !options.isNativeOnly) {
-
- }
+ // for new projects that are native only, move files/dirs and delete others
+ if (options.isNativeOnly) {
+ // Do these synchronously so that when we delete the ./src directory below
+ // we don't try and move a file that no longer exists
+ try {
+ // move store.js file from ./src to ./app
+ if (api.hasPlugin('vuex')) {
+ fs.moveSync('./src/store' + genConfig.jsOrTs, genConfig.dirPathPrefix + genConfig.nativeAppPathModifier + 'store' + genConfig.jsOrTs, {
+ overwrite: true
+ });
+ }
+ } catch (err) {
+ throw err;
+ }
+ // remove src directory as we don't need it any longer
+ fs.remove('./src', (err) => {
+ if (err) throw err;
+ });
+ // remove public directory as we don't need it any longer
+ fs.remove('./public', (err) => {
+ if (err) throw err;
+ });
+ // rename main.native.js to main.js
+ fs.moveSync(
+ genConfig.dirPathPrefix + genConfig.nativeAppPathModifier + 'main.native' + genConfig.jsOrTs,
+ genConfig.dirPathPrefix + genConfig.nativeAppPathModifier + 'main' + genConfig.jsOrTs,
+ {
+ overwrite: true
+ }
+ );
+
+ nativeOnlyPackageJsonSetup(genConfig.dirPathPrefix + genConfig.nativeAppPathModifier + 'package.json');
+ }
+ } else if (!options.isNewProject) {
+ // copy type files from ./src to ./ns-example
+ if (api.hasPlugin('typescript')) {
+ fs.copy('./src/shims-tsx.d.ts', path.join(genConfig.dirPathPrefix, 'types/shims-tsx.d.ts'), (err) => {
+ if (err) throw err;
+ });
- // Existing Project & Native Only -- should never be able to use Nativescript-Vue-Web
- if(!options.isNVW && options.isNativeOnly) {
- api.render('./templates/simple/native-only/existing', commonRenderOptions)
- }
+ fs.copy('./src/shims-vue.d.ts', path.join(genConfig.dirPathPrefix, 'types/shims-vue.d.ts'), (err) => {
+ if (err) throw err;
+ });
+ }
- if(options.isNVW && options.isNativeOnly) {
- // should never reach this block of code
+ if (options.isNativeOnly) {
+ // move store.js file from ./src to ./ns-example/app
+ if (api.hasPlugin('vuex')) {
+ fs.copy('./src/store' + genConfig.jsOrTs, genConfig.dirPathPrefix + genConfig.nativeAppPathModifier + 'store' + genConfig.jsOrTs, (err) => {
+ if (err) throw err;
+ });
+ }
+
+ // rename main.native.js to main.js
+ fs.moveSync(
+ genConfig.dirPathPrefix + genConfig.nativeAppPathModifier + 'main.native' + genConfig.jsOrTs,
+ genConfig.dirPathPrefix + genConfig.nativeAppPathModifier + 'main' + genConfig.jsOrTs,
+ {
+ overwrite: true
+ }
+ );
+
+ nativeOnlyPackageJsonSetup(genConfig.dirPathPrefix + genConfig.nativeAppPathModifier + 'package.json');
+ }
+ } else {
+ // nothing to do here
+ }
+ });
+};
+
+// setup vue-router options
+// will not setup any vue-router options for native app
+// for new projects it will write to changes as normal
+// and for existing projects it will write changes to the ./ns-example directory
+const vueRouterSetup = (module.exports.vueRouterSetup = async (api, filePathPrefix, jsOrTs) => {
+ try {
+ if (api.hasPlugin('vue-router')) {
+ api.injectImports(filePathPrefix.replace(/.\//, '') + 'src/main' + jsOrTs, `import router from './router';`);
+ api.injectRootOptions(filePathPrefix.replace(/.\//, '') + 'src/main' + jsOrTs, `router`);
+ }
+ } catch (err) {
+ throw err;
+ }
+});
+
+// setup Vuex options
+// for new projects it will write to changes as normal
+// and for existing projects it will write changes to the ./ns-example directory
+const vuexSetup = (module.exports.vuexSetup = async (api, options, filePathPrefix, jsOrTs, nativeAppPathModifier) => {
+ try {
+ if (api.hasPlugin('vuex')) {
+ if (!options.isNativeOnly) {
+ api.injectImports(filePathPrefix.replace(/.\//, '') + 'src/main' + jsOrTs, `import store from './store';`);
+ api.injectRootOptions(filePathPrefix.replace(/.\//, '') + 'src/main' + jsOrTs, `store`);
+
+ // if we're using Nativescript-Vue-Web, then we have to modify the main.native file
+ api.injectImports(filePathPrefix.replace(/.\//, '') + 'src/main.native' + jsOrTs, `import store from './store';`);
+ api.injectRootOptions(filePathPrefix.replace(/.\//, '') + 'src/main.native' + jsOrTs, `store`);
+ } else {
+ // if it's native only, it will not do anything in /src directory
+ api.injectImports(filePathPrefix.replace(/.\//, '') + nativeAppPathModifier + 'main' + jsOrTs, `import store from './store';`);
+ api.injectRootOptions(filePathPrefix.replace(/.\//, '') + nativeAppPathModifier + 'main' + jsOrTs, `store`);
+ }
+ }
+ } catch (err) {
+ throw err;
+ }
+});
+
+// write out babel.config.js options by adding options and replacing the base @vue/app
+// for new projects it will write to the root of the project
+// and for existing projects it will write it to the ./ns-example directory
+const applyBabelConfig = (module.exports.applyBabelConfig = async (api, filePath) => {
+ const babelReplaceOptions = {
+ files: '',
+ from: " '@vue/app'",
+ to: " process.env.VUE_PLATFORM === 'web' ? '@vue/app' : {}, " + newline + " ['@babel/env', { targets: { esmodules: true } }]"
+ };
+
+ try {
+ babelReplaceOptions.files = filePath;
+
+ api.render((files) => {
+ files[filePath] = api.genJSConfig({
+ plugins: ['@babel/plugin-syntax-dynamic-import'],
+ presets: ['@vue/app']
+ });
+ // eslint-disable-next-line no-unused-vars
+ replace(babelReplaceOptions, (err, changes) => {
+ if (err) throw err;
+ });
+ });
+ } catch (err) {
+ throw err;
+ }
+});
+
+// write out files in the root of the project
+// this includes the environment files as well as a global types file for
+// Typescript projects. for new projects it will write files to the root of the project
+// and for existing projects it will write it to the ./ns-example directory
+const writeRootFiles = (module.exports.writeRootFiles = async (api, options, filePathPrefix) => {
+ try {
+ const envDevelopmentAndroid = 'NODE_ENV=development' + newline + 'VUE_APP_PLATFORM=android' + newline + 'VUE_APP_MODE=native';
+ const envDevelopmentIOS = 'NODE_ENV=development' + newline + 'VUE_APP_PLATFORM=ios' + newline + 'VUE_APP_MODE=native';
+ const envProductionAndroid = 'NODE_ENV=production' + newline + 'VUE_APP_PLATFORM=android' + newline + 'VUE_APP_MODE=native';
+ const envProductionIOS = 'NODE_ENV=production' + newline + 'VUE_APP_PLATFORM=ios' + newline + 'VUE_APP_MODE=native';
+
+ fs.writeFileSync(
+ filePathPrefix + '.env.development.android',
+ envDevelopmentAndroid,
+ {
+ encoding: 'utf8'
+ },
+ (err) => {
+ if (err) throw err;
+ }
+ );
+ fs.writeFileSync(
+ filePathPrefix + '.env.development.ios',
+ envDevelopmentIOS,
+ {
+ encoding: 'utf8'
+ },
+ (err) => {
+ if (err) throw err;
+ }
+ );
+ fs.writeFileSync(
+ filePathPrefix + '.env.production.android',
+ envProductionAndroid,
+ {
+ encoding: 'utf8'
+ },
+ (err) => {
+ if (err) throw err;
+ }
+ );
+ fs.writeFileSync(
+ filePathPrefix + '.env.production.ios',
+ envProductionIOS,
+ {
+ encoding: 'utf8'
+ },
+ (err) => {
+ if (err) throw err;
+ }
+ );
+
+ // only write these out if we are also developing for the web
+ if (!options.isNativeOnly) {
+ console.log('dual components env files');
+ const envDevelopmentWeb = 'NODE_ENV=development' + newline + 'VUE_APP_PLATFORM=web' + newline + 'VUE_APP_MODE=web';
+ const envProductionWeb = 'NODE_ENV=production' + newline + 'VUE_APP_PLATFORM=web' + newline + 'VUE_APP_MODE=web';
+
+ fs.writeFileSync(
+ filePathPrefix + '.env.development.web',
+ envDevelopmentWeb,
+ {
+ encoding: 'utf8'
+ },
+ (err) => {
+ if (err) throw err;
+ }
+ );
+ fs.writeFileSync(
+ filePathPrefix + '.env.production.web',
+ envProductionWeb,
+ {
+ encoding: 'utf8'
+ },
+ (err) => {
+ if (err) throw err;
+ }
+ );
}
+ // only write this out if we are using typescript
+ if (api.hasPlugin('typescript')) {
+ // this file is ultimately optional if you don't use any process.env.VARIABLE_NAME references in your code
+ const globalTypes =
+ 'declare const TNS_ENV: string;' + newline + 'declare const TNS_APP_PLATFORM: string;' + newline + 'declare const TNS_APP_MODE: string;';
+ fs.outputFileSync(
+ filePathPrefix + 'types/globals.d.ts',
+ globalTypes,
+ {
+ encoding: 'utf8'
+ },
+ (err) => {
+ if (err) throw err;
+ }
+ );
+ }
+ } catch (err) {
+ throw err;
}
+});
-
-
+// write .gitignore additions for native app exemptions
+// will make changes to the root .gitignore file regardless of new or exisiting project
+const gitignoreAdditions = (module.exports.gitignoreAdditions = async (api) => {
+ try {
+ let gitignoreContent;
+ const gitignorePath = api.resolve('.gitignore');
+ const gitignoreAdditions = newline + '# NativeScript application' + newline + 'hooks' + newline + 'platforms' + newline + 'webpack.config.js';
-
- api.onCreateComplete(() => {
+ if (fs.existsSync(gitignorePath)) {
+ gitignoreContent = fs.readFileSync(gitignorePath, {
+ encoding: 'utf8'
+ });
+ } else {
+ gitignoreContent = '';
+ }
- const newline = process.platform === 'win32' ? '\r\n' : '\n';
- const gitignorePath = api.resolve('.gitignore');
- const gitignoreWebpackConfig = api.resolve('.webpack.config.js');
-
- // // setup string replacement options for babel.config.js file
- // if(api.hasPlugin('babel') && fs.existsSync('./babel.config.js')) {
- // const replaceOptions = {
- // files: './babel.config.js',
- // from: ' \'@vue/app\'',
- // to: ' process.env.VUE_PLATFORM === \'web\' ? \'@vue/app\' : {}, ' + newline + ' [\'@babel/env\', { targets: { esmodules: true } }]',
- // }
- // replace(replaceOptions, (err, changes) => {
- // if (err) throw err;
- // });
- // }
-
-
- // for new projects that are native only, move files/dirs and delete others
- if(options.isNewProject && options.isNativeOnly) {
-
- // move store.js file from ./src to ./app
- if(api.hasPlugin('vuex')) {
- fs.move('./src/store.js', './app/store.js', (err) => {
- if(err) throw err;
+ if (gitignoreContent.indexOf(gitignoreAdditions) === -1) {
+ gitignoreContent += gitignoreAdditions;
+
+ fs.writeFileSync(
+ gitignorePath,
+ gitignoreContent,
+ {
+ encoding: 'utf8'
+ },
+ (err) => {
+ if (err) throw err;
+ }
+ );
+ }
+ } catch (err) {
+ throw err;
+ }
+});
+
+// setup nsconfig.json file. for new projects it will write to the root of the project
+// and for existing projects it will write it to the ./ns-example directory
+const nsconfigSetup = (module.exports.nsconfigSetup = async (dirPathPrefix, nsconfigPath, nativeAppPathModifier, appResourcesPathModifier, options) => {
+ let nsconfigContent = '';
+
+ try {
+ if (fs.existsSync(nsconfigPath)) {
+ nsconfigContent = JSON.parse(
+ fs.readFileSync(nsconfigPath, {
+ encoding: 'utf8'
})
+ );
+ } else {
+ nsconfigContent = {};
+ }
+
+ nsconfigContent.appPath = nativeAppPathModifier.slice(0, -1);
+ nsconfigContent.appResourcesPath = appResourcesPathModifier;
+
+ if (options.isNewProject) {
+ nsconfigContent.useLegacyWorkflow = false;
+ }
+
+ fs.writeFileSync(
+ dirPathPrefix + 'nsconfig.json',
+ JSON.stringify(nsconfigContent, null, 2),
+ {
+ encoding: 'utf8'
+ },
+ (err) => {
+ if (err) console.error(err);
+ }
+ );
+ } catch (err) {
+ throw err;
+ }
+});
+
+// can be used to strip out template tags in native only project
+// currently unused in preference for EJS templating
+// eslint-disable-next-line no-unused-vars
+const stripTemplateTags = (module.exports.stripTemplateTags = async (srcPathPrefix) => {
+ try {
+ const files = await getAllFilesInDirStructure(srcPathPrefix, '');
+
+ for (const file of files) {
+ if (file.slice(-4) == '.vue') {
+ const options = {
+ files: path.join(srcPathPrefix, file),
+ from: [
+ new RegExp(`^(()[\\s\\S]*?(<\\/template>)`, `gim`),
+ new RegExp(`^(()`, `gim`)
+ ],
+ to: ['', '']
+ };
+
+ await replaceInFile(options);
}
+ }
+ } catch (err) {
+ throw err;
+ }
+});
- // move assets directory from ./src/assets to ./app/assets
- fs.ensureDir('./src/assets', err => {
- if(err) throw err;
- fs.move('./src/assets', './app/assets', err => {
- if (err) throw err;
- })
- })
+const nativeOnlyRenameFiles = (module.exports.nativeOnlyRenameFiles = async (srcPathPrefix) => {
+ try {
+ const _files = await getAllFilesInDirStructure(srcPathPrefix, '');
+ const files = new Array();
+ const match = '.native.vue';
- fs.remove('./src', err => {
- if (err) throw err
- })
+ for (const file of _files) {
+ if (file.slice(-11) == match) {
+ files.push(path.join(srcPathPrefix, file));
+ }
+ }
+ for (const file of files) {
+ const oldFile = file.replace(match, '.vue');
+ fs.moveSync(file, oldFile, { overwrite: true });
}
+ } catch (err) {
+ throw err;
+ }
+});
+// setup tslintSetup
+const nativeOnlyPackageJsonSetup = (module.exports.nativeOnlyPackageJsonSetup = async (filePath) => {
+ let fileContents = '';
+
+ try {
+ if (fs.existsSync(filePath)) {
+ fileContents = JSON.parse(
+ fs.readFileSync(filePath, {
+ encoding: 'utf8'
+ })
+ );
+ } else {
+ return;
+ }
- // write out environmental files
- const developmentAndroid = 'NODE_ENV=development' + newline + 'VUE_APP_PLATFORM=android' + newline + 'VUE_APP_MODE=native';
- const developmentIOS = 'NODE_ENV=development' + newline + 'VUE_APP_PLATFORM=ios' + newline + 'VUE_APP_MODE=native';
- const developmentWeb = 'NODE_ENV=development' + newline + 'VUE_APP_PLATFORM=web' + newline + 'VUE_APP_MODE=web';
- const productionAndroid = 'NODE_ENV=production' + newline + 'VUE_APP_PLATFORM=android' + newline + 'VUE_APP_MODE=native';
- const productionIOS = 'NODE_ENV=production' + newline + 'VUE_APP_PLATFORM=ios' + newline + 'VUE_APP_MODE=native';
- const productionWeb = 'NODE_ENV=production' + newline + 'VUE_APP_PLATFORM=web' + newline + 'VUE_APP_MODE=web';
+ fileContents.main = 'main';
- fs.writeFileSync('./.env.development.android', developmentAndroid, { encoding: 'utf8' }, (err) => {if (err) throw err;});
- fs.writeFileSync('./.env.development.ios', developmentIOS, { encoding: 'utf8' }, (err) => {if (err) throw err;});
- fs.writeFileSync('./.env.development.web', developmentWeb, { encoding: 'utf8' }, (err) => {if (err) throw err;});
- fs.writeFileSync('./.env.production.android', productionAndroid, { encoding: 'utf8' }, (err) => {if (err) throw err;});
- fs.writeFileSync('./.env.production.ios', productionIOS, { encoding: 'utf8' }, (err) => {if (err) throw err;});
- fs.writeFileSync('./.env.production.web', productionWeb, { encoding: 'utf8' }, (err) => {if (err) throw err;});
+ fs.writeFileSync(
+ filePath,
+ JSON.stringify(fileContents, null, 2),
+ {
+ encoding: 'utf8'
+ },
+ (err) => {
+ if (err) console.error(err);
+ }
+ );
+ } catch (err) {
+ throw err;
+ }
+});
+// setup tslintSetup
+const tslintSetup = (module.exports.tslintSetup = async (dirPathPrefix, tslintPath, tsExclusionArray) => {
+ let tslintContent = '';
- // write nsconfig.json
- const nsconfig = {
- 'appPath': 'app',
- 'appResourcesPath': 'app/App_Resources'
+ try {
+ if (fs.existsSync(tslintPath)) {
+ tslintContent = JSON.parse(
+ fs.readFileSync(tslintPath, {
+ encoding: 'utf8'
+ })
+ );
+ } else {
+ return;
}
- fs.writeFileSync('./nsconfig.json', JSON.stringify(nsconfig, null, 2), {encoding: 'utf8'}, (err) => {if (err) throw err;});
- // write .gitignore additions
- let gitignoreContent;
+ // create arrays if they aren't already in tslint.json
+ if (tslintContent.linterOptions.exclude === undefined) tslintContent.linterOptions.exclude = new Array();
+ if (tslintContent.exclude === undefined) tslintContent.exclude = new Array();
- if (fs.existsSync(gitignorePath)) {
- gitignoreContent = fs.readFileSync(gitignorePath, { encoding: 'utf8' });
+ // add items into exclude arrays, but only if they don't already exist
+ for (let item of tsExclusionArray) {
+ if (!tslintContent.linterOptions.exclude.includes(item + '/**')) tslintContent.linterOptions.exclude.push(item + '/**');
+
+ if (!tslintContent.exclude.includes(item)) tslintContent.exclude.push(item);
+ }
+
+ fs.writeFileSync(
+ dirPathPrefix + 'tslint.json',
+ JSON.stringify(tslintContent, null, 2),
+ {
+ encoding: 'utf8'
+ },
+ (err) => {
+ if (err) console.error(err);
+ }
+ );
+ } catch (err) {
+ throw err;
+ }
+});
+
+// setup tsconfig for native only projects
+const tsconfigSetup = (module.exports.tsconfigSetup = async (options, dirPathPrefix, nativeAppPathModifier) => {
+ try {
+ // setup the ability to edit the tsconfig.json file in the root of the project
+ let tsConfigContent = '';
+ let tsConfigPath = path.join(dirPathPrefix, 'tsconfig.json');
+
+ if (fs.existsSync(tsConfigPath)) {
+ tsConfigContent = fs.readJsonSync(tsConfigPath, {
+ encoding: 'utf8'
+ });
} else {
- gitignoreContent = '';
+ return;
}
- const gitignoreAdditions = newline + '# NativeScript application' + newline + 'hooks' + newline + 'platforms' + newline + './webpack.config.js'
- if (gitignoreContent.indexOf(gitignoreAdditions) === -1) {
- gitignoreContent += gitignoreAdditions
+ tsConfigContent.compilerOptions.noImplicitAny = false;
+ // // // tsConfigContent.compilerOptions.types = [];
- fs.writeFileSync(gitignorePath, gitignoreContent, { encoding: 'utf8' }, (err) => {if (err) throw err;});
+ // edit types attribute to fix build
+ tsConfigContent.compilerOptions.types = ['node'];
+
+ // edit some of the options in compilerOptions.paths object array
+ tsConfigContent.compilerOptions.paths['@/*'] = [nativeAppPathModifier + '*'];
+ tsConfigContent.compilerOptions.paths['assets/*'] = [nativeAppPathModifier + 'assets/*'];
+ tsConfigContent.compilerOptions.paths['fonts/*'] = [nativeAppPathModifier + 'fonts/*'];
+ tsConfigContent.compilerOptions.paths['components/*'] = [nativeAppPathModifier + 'components/*'];
+ tsConfigContent.compilerOptions.paths['styles/*'] = [nativeAppPathModifier + 'styles/*'];
+
+ // add the types directory into the config
+ if (!tsConfigContent.include.includes('types/**/*.d.ts')) tsConfigContent.include.push('types/**/*.d.ts');
+
+ // add items into the include array
+ if (!tsConfigContent.include.includes(nativeAppPathModifier + '**/*.ts')) tsConfigContent.include.push(nativeAppPathModifier + '**/*.ts');
+ if (!tsConfigContent.include.includes(nativeAppPathModifier + '**/*.tsx')) tsConfigContent.include.push(nativeAppPathModifier + '**/*.tsx');
+ if (!tsConfigContent.include.includes(nativeAppPathModifier + '**/*.vue')) tsConfigContent.include.push(nativeAppPathModifier + '**/*.vue');
+
+ // add unit test directories into include array
+ if (fs.existsSync(path.join(dirPathPrefix, 'tests'))) {
+ if (!tsConfigContent.include.includes('tests/**/*.ts')) tsConfigContent.include.push('tests/**/*.ts');
+ if (!tsConfigContent.include.includes('tests/**/*.tsx')) tsConfigContent.include.push('tests/**/*.tsx');
}
- })
+ if (options.isNativeOnly) {
+ // edit some of the options in compilerOptions.paths object array
+ tsConfigContent.compilerOptions.paths['src/*'] = [nativeAppPathModifier + '*'];
-
+ // remove some items from the include array
+ tsConfigContent.include = await removeFromArray(tsConfigContent.include, 'src/**/*.ts');
+ tsConfigContent.include = await removeFromArray(tsConfigContent.include, 'src/**/*.tsx');
+ tsConfigContent.include = await removeFromArray(tsConfigContent.include, 'src/**/*.vue');
+
+ fs.writeJsonSync(tsConfigPath, tsConfigContent, {
+ spaces: 2,
+ encoding: 'utf8'
+ });
+ } else {
+ tsConfigContent.compilerOptions.paths['src/*'] = [nativeAppPathModifier + '*'];
+
+ fs.writeJsonSync(tsConfigPath, tsConfigContent, {
+ spaces: 2,
+ encoding: 'utf8'
+ });
+ }
+ } catch (err) {
+ throw err;
+ }
+});
+
+// Use the generator's render function to render individual files passed in from an array.
+// Will iterate through the array and then construct and object that is passed to render()
+const renderFilesIndividually = (module.exports.renderFilesIndividually = async (
+ api,
+ options,
+ jsOrTs,
+ files,
+ commonRenderOptions,
+ srcPathPrefix,
+ destPathPrefix
+) => {
+ try {
+ const obj = {};
+
+ for (let file of files) {
+ let newFile = file;
+
+ // renames .js files to .ts
+ if (file.slice(-3) === '.js' || file.slice(-3) === '.ts') newFile = file.substring(0, file.length - 3) + jsOrTs;
+
+ if ((!api.hasPlugin('typescript') && file !== 'tsconfig.json') || api.hasPlugin('typescript'))
+ obj[path.join(destPathPrefix, newFile)] = path.join(srcPathPrefix, file);
+ }
-}
+ api.render(obj, commonRenderOptions);
+ } catch (err) {
+ throw err;
+ }
+});
+
+// Good chunk of the following code comes from vue-cli/packages/@vue/cli/lib/GeneratorAPI.js
+// Specifically the render function. We want to render the entire directory, but passing just
+// the directory to render doesn't give us the ability to tell where to put it as the cli's render
+// function lacks a simple directory in and directory out option. So, we have to get the contents
+// of the passed in directory and then render each file individually to where we want it via
+// the render function's isObject(source) option that we use in our renderFilesIndividually function.
+
+// eslint-disable-next-line prettier/prettier
+// eslint-disable-next-line max-len
+const renderDirectoryStructure = (module.exports.renderDirectoryStructure = async (
+ api,
+ options,
+ rootOptions,
+ jsOrTs,
+ commonRenderOptions,
+ srcPathPrefix,
+ destPathPrefix
+) => {
+ try {
+ const files = new Array();
+ const _files = await getAllFilesInDirStructure(srcPathPrefix, __dirname);
+
+ for (const rawPath of _files) {
+ // // // let filename = path.basename(rawPath);
+ // // // // dotfiles are ignored when published to npm, therefore in templates
+ // // // // we need to use underscore instead (e.g. "_gitignore")
+ // // // if (filename.charAt(0) === '_' && filename.charAt(1) !== '_') {
+ // // // filename = `.${filename.slice(1)}`;
+ // // // }
+ // // // if (filename.charAt(0) === '_' && filename.charAt(1) === '_') {
+ // // // filename = `${filename.slice(1)}`;
+ // // // }
+
+ // only import styles based on the type of preprocessor you do or do not have.
+ // Essentially acts as filter as you iterate through the list of files in a directory structure
+ if (
+ rawPath.slice(-4) == '.css' ||
+ rawPath.slice(-5) == '.scss' ||
+ rawPath.slice(-5) == '.sass' ||
+ rawPath.slice(-5) == '.less' ||
+ rawPath.slice(-5) == '.styl' ||
+ rawPath.slice(-7) == '.stylus'
+ ) {
+ if (rootOptions.cssPreprocessor) {
+ switch (rootOptions.cssPreprocessor) {
+ case 'scss':
+ if (rawPath.slice(-5) == '.scss' || rawPath.slice(-5) == '.sass') files.push(rawPath);
+ break;
+ case 'sass':
+ if (rawPath.slice(-5) == '.scss' || rawPath.slice(-5) == '.sass') files.push(rawPath);
+ break;
+ case 'dart-sass':
+ if (rawPath.slice(-5) == '.scss' || rawPath.slice(-5) == '.sass') files.push(rawPath);
+ break;
+ case 'less':
+ if (rawPath.slice(-5) == '.less') files.push(rawPath);
+ break;
+ case 'stylus':
+ if (rawPath.slice(-5) == '.styl' || rawPath.slice(-7) == '.stylus') files.push(rawPath);
+ break;
+ }
+ } else {
+ if (rawPath.slice(-4) == '.css') files.push(rawPath);
+ }
+ } else {
+ files.push(rawPath);
+ }
+ }
+ renderFilesIndividually(api, options, jsOrTs, files, commonRenderOptions, srcPathPrefix, destPathPrefix);
+ } catch (err) {
+ throw err;
+ }
+});
+
+// THIS FUNCTION MAY NOT LONGER BE NEEDED AS OF 0.0.16
+// WILL KEEP THIS COMMENTED OUT CODE IN FOR A FEW OF RELEASES
+// // extract callsite file location using error stack
+// const extractCallDir = (module.exports.extractCallDir = () => {
+// try {
+// const obj = {};
+// console.log('__dirname - ', __dirname);
+// Error.captureStackTrace(obj);
+// const callSite = obj.stack.split('\n')[3];
+// console.log('callSite - ', callSite);
+
+// let { fileName } = /(?[^(]+):[0-9]+:[0-9]+/.exec(callSite).groups;
+// console.log('fileName 1 - ', fileName);
+
+// if (fileName.indexOf('file') >= 0) {
+// fileName = new URL(fileName).pathname;
+// }
+
+// if (fileName.indexOf(fileName.length - 1) === ')') {
+// fileName = fileName.splice(0, fileName.length - 1);
+// }
+
+// console.log(`fileName 2 - '`, fileName + `'`);
+
+// fileName = fileName.replace('at ', '');
+// console.log(`fileName 3 - '`, fileName) + `'`;
+
+// let dirname = path.dirname(fileName);
+// console.log(`dirname - '`, dirname + `'`);
+
+// return __dirname;
+// } catch (err) {
+// throw err;
+// }
+// });
+
+// utility function used to get all the files in a directory structure. is recursive in nature due to globby
+const getAllFilesInDirStructure = (module.exports.replaceInFile = async (srcPathPrefix, baseDir) => {
+ try {
+ const source = path.resolve(baseDir, srcPathPrefix);
+ const globby = require('globby');
+ const _files = await globby(['**/*'], {
+ cwd: source
+ });
+
+ return _files;
+ } catch (error) {
+ console.log(error);
+ }
+});
+
+// utility function used to remove sections of strings from files
+const replaceInFile = (module.exports.replaceInFile = async (options) => {
+ try {
+ await replace(options);
+ } catch (error) {
+ console.error('Error occurred:', error);
+ }
+});
+
+// utility function used to remove items from an array that match 'item'
+const removeFromArray = (module.exports.removeFromArray = async (array, item) => {
+ const index = array.indexOf(item);
+ if (index !== -1) array.splice(index, 1);
+ return array;
+});
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/Android/AndroidManifest.xml b/generator/templates/App_Resources/Android/AndroidManifest.xml
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/Android/AndroidManifest.xml
rename to generator/templates/App_Resources/Android/AndroidManifest.xml
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/Android/app.gradle b/generator/templates/App_Resources/Android/app.gradle
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/Android/app.gradle
rename to generator/templates/App_Resources/Android/app.gradle
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/Android/drawable-hdpi/background.png b/generator/templates/App_Resources/Android/drawable-hdpi/background.png
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/Android/drawable-hdpi/background.png
rename to generator/templates/App_Resources/Android/drawable-hdpi/background.png
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/Android/drawable-hdpi/icon.png b/generator/templates/App_Resources/Android/drawable-hdpi/icon.png
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/Android/drawable-hdpi/icon.png
rename to generator/templates/App_Resources/Android/drawable-hdpi/icon.png
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/Android/drawable-hdpi/logo.png b/generator/templates/App_Resources/Android/drawable-hdpi/logo.png
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/Android/drawable-hdpi/logo.png
rename to generator/templates/App_Resources/Android/drawable-hdpi/logo.png
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/Android/drawable-ldpi/background.png b/generator/templates/App_Resources/Android/drawable-ldpi/background.png
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/Android/drawable-ldpi/background.png
rename to generator/templates/App_Resources/Android/drawable-ldpi/background.png
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/Android/drawable-ldpi/icon.png b/generator/templates/App_Resources/Android/drawable-ldpi/icon.png
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/Android/drawable-ldpi/icon.png
rename to generator/templates/App_Resources/Android/drawable-ldpi/icon.png
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/Android/drawable-ldpi/logo.png b/generator/templates/App_Resources/Android/drawable-ldpi/logo.png
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/Android/drawable-ldpi/logo.png
rename to generator/templates/App_Resources/Android/drawable-ldpi/logo.png
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/Android/drawable-mdpi/background.png b/generator/templates/App_Resources/Android/drawable-mdpi/background.png
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/Android/drawable-mdpi/background.png
rename to generator/templates/App_Resources/Android/drawable-mdpi/background.png
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/Android/drawable-mdpi/icon.png b/generator/templates/App_Resources/Android/drawable-mdpi/icon.png
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/Android/drawable-mdpi/icon.png
rename to generator/templates/App_Resources/Android/drawable-mdpi/icon.png
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/Android/drawable-mdpi/logo.png b/generator/templates/App_Resources/Android/drawable-mdpi/logo.png
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/Android/drawable-mdpi/logo.png
rename to generator/templates/App_Resources/Android/drawable-mdpi/logo.png
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/Android/drawable-nodpi/splash_screen.xml b/generator/templates/App_Resources/Android/drawable-nodpi/splash_screen.xml
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/Android/drawable-nodpi/splash_screen.xml
rename to generator/templates/App_Resources/Android/drawable-nodpi/splash_screen.xml
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/Android/drawable-xhdpi/background.png b/generator/templates/App_Resources/Android/drawable-xhdpi/background.png
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/Android/drawable-xhdpi/background.png
rename to generator/templates/App_Resources/Android/drawable-xhdpi/background.png
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/Android/drawable-xhdpi/icon.png b/generator/templates/App_Resources/Android/drawable-xhdpi/icon.png
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/Android/drawable-xhdpi/icon.png
rename to generator/templates/App_Resources/Android/drawable-xhdpi/icon.png
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/Android/drawable-xhdpi/logo.png b/generator/templates/App_Resources/Android/drawable-xhdpi/logo.png
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/Android/drawable-xhdpi/logo.png
rename to generator/templates/App_Resources/Android/drawable-xhdpi/logo.png
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/Android/drawable-xxhdpi/background.png b/generator/templates/App_Resources/Android/drawable-xxhdpi/background.png
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/Android/drawable-xxhdpi/background.png
rename to generator/templates/App_Resources/Android/drawable-xxhdpi/background.png
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/Android/drawable-xxhdpi/icon.png b/generator/templates/App_Resources/Android/drawable-xxhdpi/icon.png
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/Android/drawable-xxhdpi/icon.png
rename to generator/templates/App_Resources/Android/drawable-xxhdpi/icon.png
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/Android/drawable-xxhdpi/logo.png b/generator/templates/App_Resources/Android/drawable-xxhdpi/logo.png
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/Android/drawable-xxhdpi/logo.png
rename to generator/templates/App_Resources/Android/drawable-xxhdpi/logo.png
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/Android/drawable-xxxhdpi/background.png b/generator/templates/App_Resources/Android/drawable-xxxhdpi/background.png
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/Android/drawable-xxxhdpi/background.png
rename to generator/templates/App_Resources/Android/drawable-xxxhdpi/background.png
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/Android/drawable-xxxhdpi/icon.png b/generator/templates/App_Resources/Android/drawable-xxxhdpi/icon.png
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/Android/drawable-xxxhdpi/icon.png
rename to generator/templates/App_Resources/Android/drawable-xxxhdpi/icon.png
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/Android/drawable-xxxhdpi/logo.png b/generator/templates/App_Resources/Android/drawable-xxxhdpi/logo.png
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/Android/drawable-xxxhdpi/logo.png
rename to generator/templates/App_Resources/Android/drawable-xxxhdpi/logo.png
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/Android/values-v21/colors.xml b/generator/templates/App_Resources/Android/values-v21/colors.xml
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/Android/values-v21/colors.xml
rename to generator/templates/App_Resources/Android/values-v21/colors.xml
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/Android/values-v21/strings.xml b/generator/templates/App_Resources/Android/values-v21/strings.xml
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/Android/values-v21/strings.xml
rename to generator/templates/App_Resources/Android/values-v21/strings.xml
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/Android/values-v21/styles.xml b/generator/templates/App_Resources/Android/values-v21/styles.xml
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/Android/values-v21/styles.xml
rename to generator/templates/App_Resources/Android/values-v21/styles.xml
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/Android/values/colors.xml b/generator/templates/App_Resources/Android/values/colors.xml
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/Android/values/colors.xml
rename to generator/templates/App_Resources/Android/values/colors.xml
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/Android/values/strings.xml b/generator/templates/App_Resources/Android/values/strings.xml
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/Android/values/strings.xml
rename to generator/templates/App_Resources/Android/values/strings.xml
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/Android/values/styles.xml b/generator/templates/App_Resources/Android/values/styles.xml
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/Android/values/styles.xml
rename to generator/templates/App_Resources/Android/values/styles.xml
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json b/generator/templates/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json
rename to generator/templates/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png b/generator/templates/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png
rename to generator/templates/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png b/generator/templates/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png
rename to generator/templates/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png b/generator/templates/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png
rename to generator/templates/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png b/generator/templates/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png
rename to generator/templates/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png b/generator/templates/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png
rename to generator/templates/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png b/generator/templates/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png
rename to generator/templates/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png b/generator/templates/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png
rename to generator/templates/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png b/generator/templates/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png
rename to generator/templates/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png b/generator/templates/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png
rename to generator/templates/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png b/generator/templates/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png
rename to generator/templates/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png b/generator/templates/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png
rename to generator/templates/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png b/generator/templates/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png
rename to generator/templates/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/Contents.json b/generator/templates/App_Resources/iOS/Assets.xcassets/Contents.json
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/Contents.json
rename to generator/templates/App_Resources/iOS/Assets.xcassets/Contents.json
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Contents.json b/generator/templates/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Contents.json
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Contents.json
rename to generator/templates/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Contents.json
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-1125h.png b/generator/templates/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-1125h.png
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-1125h.png
rename to generator/templates/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-1125h.png
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png b/generator/templates/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png
rename to generator/templates/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png b/generator/templates/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png
rename to generator/templates/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png b/generator/templates/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png
rename to generator/templates/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-X.png b/generator/templates/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-X.png
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-X.png
rename to generator/templates/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-X.png
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png b/generator/templates/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png
rename to generator/templates/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png b/generator/templates/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png
rename to generator/templates/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png b/generator/templates/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png
rename to generator/templates/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png b/generator/templates/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png
rename to generator/templates/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png b/generator/templates/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png
rename to generator/templates/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png b/generator/templates/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png
rename to generator/templates/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png b/generator/templates/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png
rename to generator/templates/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/Contents.json b/generator/templates/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/Contents.json
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/Contents.json
rename to generator/templates/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/Contents.json
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png b/generator/templates/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png
rename to generator/templates/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png b/generator/templates/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png
rename to generator/templates/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/Contents.json b/generator/templates/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/Contents.json
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/Contents.json
rename to generator/templates/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/Contents.json
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png b/generator/templates/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png
rename to generator/templates/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png b/generator/templates/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png
rename to generator/templates/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Info.plist b/generator/templates/App_Resources/iOS/Info.plist
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/Info.plist
rename to generator/templates/App_Resources/iOS/Info.plist
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/LaunchScreen.storyboard b/generator/templates/App_Resources/iOS/LaunchScreen.storyboard
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/LaunchScreen.storyboard
rename to generator/templates/App_Resources/iOS/LaunchScreen.storyboard
diff --git a/generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/build.xcconfig b/generator/templates/App_Resources/iOS/build.xcconfig
similarity index 100%
rename from generator/templates/simple/native-only/existing/example/app/App_Resources/iOS/build.xcconfig
rename to generator/templates/App_Resources/iOS/build.xcconfig
diff --git a/generator/templates/nvw/src/App.vue b/generator/templates/nvw/src/App.vue
new file mode 100644
index 0000000..b06aa08
--- /dev/null
+++ b/generator/templates/nvw/src/App.vue
@@ -0,0 +1,206 @@
+<%_ if (rootOptions.router) { _%>
+<%# -------------------- IS Using vue-router -------------------- -%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<%_ } else { _%>
+<%# -------------------- IS NOT Using vue-router -------------------- -%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<%_ } _%>
+<%_ if (!usingTS && rootOptions.router) { _%>
+<%# -------------------- IS NOT Using TypeScript AND IS Using vue-router -------------------- -%>
+
+<%_ } else if (!usingTS && !rootOptions.router) { _%>
+<%# -------------------- IS NOT Using TypeScript AND IS NOT Using vue-router -------------------- -%>
+
+<%_ } else if (usingTS && rootOptions.router) { _%>
+<%# -------------------- IS Using TypeScript AND IS Using vue-router -------------------- -%>
+
+<%_ } else if (usingTS && !rootOptions.router) { _%>
+<%# -------------------- IS Using TypeScript AND IS NOT Using vue-router -------------------- -%>
+
+<%_ } else { _%>
+<%# -------------------- don't do anything -------------------- -%>
+<%_ } _%>
+
+<%_ if (rootOptions.cssPreprocessor) { _%>
+<%_ if (rootOptions.cssPreprocessor == 'sass' || rootOptions.cssPreprocessor == 'scss' || rootOptions.cssPreprocessor == 'dart-sass' ) { _%>
+<%# -------------------- IS Using sass, scss OR dart-sass -------------------- -%>
+
+
+<%_ } else if (rootOptions.cssPreprocessor == 'stylus') { _%>
+<%# -------------------- IS Using stylus -------------------- -%>
+
+
+<%_ } else if (rootOptions.cssPreprocessor == 'less') { _%>
+<%# -------------------- IS Using Less -------------------- -%>
+
+
+<%_ } _%>
+<%_ } else { _%>
+<%# -------------------- IS Using standard CSS -------------------- -%>
+
+
+<%_ } _%>
diff --git a/generator/templates/simple/without-nvw/existing/example/src/assets/logo.png b/generator/templates/nvw/src/assets/logo.png
similarity index 100%
rename from generator/templates/simple/without-nvw/existing/example/src/assets/logo.png
rename to generator/templates/nvw/src/assets/logo.png
diff --git a/generator/templates/nvw/src/components/HelloWorld.android.vue b/generator/templates/nvw/src/components/HelloWorld.android.vue
new file mode 100644
index 0000000..9f4a274
--- /dev/null
+++ b/generator/templates/nvw/src/components/HelloWorld.android.vue
@@ -0,0 +1,85 @@
+
+
+
+
+
+
+
+<%_ if (!usingTS) { _%>
+<%# -------------------- Is Not Using TypeScript -------------------- -%>
+
+<%_ } else { _%>
+<%# -------------------- Is Using TypeScript -------------------- -%>
+
+<%_ } _%>
+
+<%_ if (rootOptions.cssPreprocessor) { _%>
+<%_ if (rootOptions.cssPreprocessor == 'sass' || rootOptions.cssPreprocessor == 'scss' || rootOptions.cssPreprocessor == 'dart-sass' ) { _%>
+<%# -------------------- IS Using sass, scss OR dart-sass -------------------- -%>
+
+<%_ } else if (rootOptions.cssPreprocessor == 'stylus') { _%>
+<%# -------------------- IS Using stylus -------------------- -%>
+
+<%_ } else if (rootOptions.cssPreprocessor == 'less') { _%>
+<%# -------------------- IS Using Less -------------------- -%>
+
+<%_ } _%>
+<%_ } else { _%>
+<%# -------------------- IS Using standard CSS -------------------- -%>
+
+<%_ } _%>
\ No newline at end of file
diff --git a/generator/templates/nvw/src/components/HelloWorld.ios.vue b/generator/templates/nvw/src/components/HelloWorld.ios.vue
new file mode 100644
index 0000000..9f4a274
--- /dev/null
+++ b/generator/templates/nvw/src/components/HelloWorld.ios.vue
@@ -0,0 +1,85 @@
+
+
+
+
+
+
+
+<%_ if (!usingTS) { _%>
+<%# -------------------- Is Not Using TypeScript -------------------- -%>
+
+<%_ } else { _%>
+<%# -------------------- Is Using TypeScript -------------------- -%>
+
+<%_ } _%>
+
+<%_ if (rootOptions.cssPreprocessor) { _%>
+<%_ if (rootOptions.cssPreprocessor == 'sass' || rootOptions.cssPreprocessor == 'scss' || rootOptions.cssPreprocessor == 'dart-sass' ) { _%>
+<%# -------------------- IS Using sass, scss OR dart-sass -------------------- -%>
+
+<%_ } else if (rootOptions.cssPreprocessor == 'stylus') { _%>
+<%# -------------------- IS Using stylus -------------------- -%>
+
+<%_ } else if (rootOptions.cssPreprocessor == 'less') { _%>
+<%# -------------------- IS Using Less -------------------- -%>
+
+<%_ } _%>
+<%_ } else { _%>
+<%# -------------------- IS Using standard CSS -------------------- -%>
+
+<%_ } _%>
\ No newline at end of file
diff --git a/generator/templates/nvw/src/components/HelloWorld.native.vue b/generator/templates/nvw/src/components/HelloWorld.native.vue
new file mode 100644
index 0000000..9f4a274
--- /dev/null
+++ b/generator/templates/nvw/src/components/HelloWorld.native.vue
@@ -0,0 +1,85 @@
+
+
+
+
+
+
+
+<%_ if (!usingTS) { _%>
+<%# -------------------- Is Not Using TypeScript -------------------- -%>
+
+<%_ } else { _%>
+<%# -------------------- Is Using TypeScript -------------------- -%>
+
+<%_ } _%>
+
+<%_ if (rootOptions.cssPreprocessor) { _%>
+<%_ if (rootOptions.cssPreprocessor == 'sass' || rootOptions.cssPreprocessor == 'scss' || rootOptions.cssPreprocessor == 'dart-sass' ) { _%>
+<%# -------------------- IS Using sass, scss OR dart-sass -------------------- -%>
+
+<%_ } else if (rootOptions.cssPreprocessor == 'stylus') { _%>
+<%# -------------------- IS Using stylus -------------------- -%>
+
+<%_ } else if (rootOptions.cssPreprocessor == 'less') { _%>
+<%# -------------------- IS Using Less -------------------- -%>
+
+<%_ } _%>
+<%_ } else { _%>
+<%# -------------------- IS Using standard CSS -------------------- -%>
+
+<%_ } _%>
\ No newline at end of file
diff --git a/generator/templates/nvw/src/components/HelloWorld.vue b/generator/templates/nvw/src/components/HelloWorld.vue
new file mode 100644
index 0000000..7f18e4b
--- /dev/null
+++ b/generator/templates/nvw/src/components/HelloWorld.vue
@@ -0,0 +1,103 @@
+
+
+
+
+
+
+
+<%_ if (!usingTS) { _%>
+<%# -------------------- Is Not Using TypeScript -------------------- -%>
+
+<%_ } else { _%>
+<%# -------------------- Is Using TypeScript -------------------- -%>
+
+<%_ } _%>
+
+<%_ if (rootOptions.cssPreprocessor) { _%>
+<%_ if (rootOptions.cssPreprocessor == 'sass' || rootOptions.cssPreprocessor == 'scss' || rootOptions.cssPreprocessor == 'dart-sass' ) { _%>
+<%# -------------------- IS Using sass, scss OR dart-sass -------------------- -%>
+
+<%_ } else if (rootOptions.cssPreprocessor == 'stylus') { _%>
+<%# -------------------- IS Using stylus -------------------- -%>
+
+<%_ } else if (rootOptions.cssPreprocessor == 'less') { _%>
+<%# -------------------- IS Using Less -------------------- -%>
+
+<%_ } _%>
+<%_ } else { _%>
+<%# -------------------- IS Using standard CSS -------------------- -%>
+
+<%_ } _%>
\ No newline at end of file
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-hdpi/icon.png b/generator/templates/nvw/src/components/icon.png
similarity index 100%
rename from generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-hdpi/icon.png
rename to generator/templates/nvw/src/components/icon.png
diff --git a/generator/templates/nvw/src/main.js b/generator/templates/nvw/src/main.js
new file mode 100644
index 0000000..5857247
--- /dev/null
+++ b/generator/templates/nvw/src/main.js
@@ -0,0 +1,38 @@
+---
+extend: '@vue/cli-service/generator/template/src/main.js'
+replace:
+ - !!js/regexp /import Vue from 'vue'/
+ - !!js/regexp /import App from './App.vue'/
+ - !!js/regexp /Vue.config.productionTip = false/
+ - !!js/regexp /h => h\(App\),/
+ - !!js/regexp /}\)\.\$mount\('#app'\)/
+---
+
+<%# REPLACE %>
+import Vue from 'vue';
+<%# END_REPLACE %>
+
+<%# REPLACE %>
+import App from '~/App.vue';
+import { Page, ActionBar, GridLayout, Button, Img, Label } from 'nativescript-vue-web';
+
+Vue.component('Page', Page);
+Vue.component('ActionBar', ActionBar);
+Vue.component('GridLayout', GridLayout);
+Vue.component('Button', Button);
+Vue.component('Img', Img);
+Vue.component('Label', Label);
+
+<%# END_REPLACE %>
+
+<%# REPLACE %>
+Vue.config.productionTip = false;
+<%# END_REPLACE %>
+
+<%# REPLACE %>
+(h) => h(App),
+<%# END_REPLACE %>
+
+<%# REPLACE %>
+}).$mount('#app');
+<%# END_REPLACE %>
\ No newline at end of file
diff --git a/generator/templates/simple/without-nvw/existing/example/app/main.js b/generator/templates/nvw/src/main.native.js
similarity index 66%
rename from generator/templates/simple/without-nvw/existing/example/app/main.js
rename to generator/templates/nvw/src/main.native.js
index dfd8310..c7d645a 100644
--- a/generator/templates/simple/without-nvw/existing/example/app/main.js
+++ b/generator/templates/nvw/src/main.native.js
@@ -2,31 +2,27 @@
extend: '@vue/cli-service/generator/template/src/main.js'
replace:
- !!js/regexp /import Vue from 'vue'/
- - !!js/regexp /import App from './App.vue'/
- !!js/regexp /Vue.config.productionTip = false/
- - !!js/regexp /h\(App\)/
+ - !!js/regexp /h => h\(App\),/
- !!js/regexp /}\)\.\$mount\('#app'\)/
---
<%# REPLACE %>
-import Vue from 'nativescript-vue'
-<%# END_REPLACE %>
-
-<%# REPLACE %>
-import App from '~/App'
+import Vue from 'nativescript-vue';
<%# END_REPLACE %>
<%# REPLACE %>
// Set the following to `true` to hide the logs created by nativescript-vue
-Vue.config.silent = false
+Vue.config.silent = false;
// Set the following to `false` to not colorize the logs created by nativescript-vue
-Vue.config.debug = true
+// disabled in template due to typing issue for Typescript projects....NEEDS TO BE FIXED
+// Vue.config.debug = true;
<%# END_REPLACE %>
<%# REPLACE %>
-h('frame', [h(App)])
+(h) => h('frame', [h(App)]),
<%# END_REPLACE %>
<%# REPLACE %>
-}).$start()
+}).$start();
<%# END_REPLACE %>
\ No newline at end of file
diff --git a/generator/templates/simple/native-only/existing/example/app/package.json b/generator/templates/nvw/src/package.json
similarity index 86%
rename from generator/templates/simple/native-only/existing/example/app/package.json
rename to generator/templates/nvw/src/package.json
index 8f7b233..41f6a95 100644
--- a/generator/templates/simple/native-only/existing/example/app/package.json
+++ b/generator/templates/nvw/src/package.json
@@ -3,7 +3,7 @@
"v8Flags": "--expose_gc",
"markingMode": "none"
},
- "main": "main",
+ "main": "main.native",
"name": "<%- applicationName %>",
"version": "<%- applicationVersion %>"
}
diff --git a/generator/templates/nvw/src/router.js b/generator/templates/nvw/src/router.js
new file mode 100644
index 0000000..2b66ba4
--- /dev/null
+++ b/generator/templates/nvw/src/router.js
@@ -0,0 +1,34 @@
+---
+extend: '@vue/cli-service/generator/router.js'
+replace:
+ - !!js/regexp /import Vue from 'vue'/
+ - !!js/regexp /import Router from 'vue-router'/
+ - !!js/regexp /Vue.use\(Router\)/
+ - !!js/regexp /import Home from './views/Home.vue'/
+ - !!js/regexp /'./views/About.vue'\)/
+ - !!js/regexp /\}\)/
+---
+
+<%# REPLACE %>
+import Vue from 'vue';
+<%# END_REPLACE %>
+
+<%# REPLACE %>
+import Router from 'vue-router';
+<%# END_REPLACE %>
+
+<%# REPLACE %>
+Vue.use(Router);
+<%# END_REPLACE %>
+
+<%# REPLACE %>
+import Home from '~/views/Home.vue';
+<%# END_REPLACE %>
+
+<%# REPLACE %>
+'~/views/About.vue'),
+<%# END_REPLACE %>
+
+<%# REPLACE %>
+});
+<%# END_REPLACE %>
diff --git a/generator/templates/nvw/src/styles/style-one.css b/generator/templates/nvw/src/styles/style-one.css
new file mode 100644
index 0000000..aede169
--- /dev/null
+++ b/generator/templates/nvw/src/styles/style-one.css
@@ -0,0 +1,53 @@
+ActionBar {
+ color: #42b983;
+}
+
+.w-navbar {
+ color: #42b983;
+ position: fixed;
+ z-index: 10000;
+ height: 3em;
+ width: 100%;
+ top: 0px;
+ left: 0px;
+ margin: auto;
+ list-style: none;
+
+ display: flex;
+ align-items: center;
+ padding: 0 10px;
+
+ -webkit-box-shadow: -8px 8px 6px -7px #999;
+ -moz-box-shadow: -8px 8px 6px -7px #999;
+ box-shadow: -8px 8px 6px -7px #999;
+}
+
+.w-navbar .w-title {
+ margin-left: auto;
+ margin-right: auto;
+}
+
+.w-container {
+ height: 100%;
+ width: 100%;
+ padding-top: 3em;
+ position: relative;
+ overflow: hidden;
+ display: flex;
+ flex-direction: column;
+ justify-content: top;
+ align-items: center;
+}
+
+.w-container .w-button {
+ width: 50%;
+ height: 2em;
+ margin: .25em;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ background-color: #d7d7d7;
+ border-width: 0px;
+ font-weight: 600;
+ border-radius: 3px;
+}
\ No newline at end of file
diff --git a/generator/templates/nvw/src/styles/style-one.less b/generator/templates/nvw/src/styles/style-one.less
new file mode 100644
index 0000000..aede169
--- /dev/null
+++ b/generator/templates/nvw/src/styles/style-one.less
@@ -0,0 +1,53 @@
+ActionBar {
+ color: #42b983;
+}
+
+.w-navbar {
+ color: #42b983;
+ position: fixed;
+ z-index: 10000;
+ height: 3em;
+ width: 100%;
+ top: 0px;
+ left: 0px;
+ margin: auto;
+ list-style: none;
+
+ display: flex;
+ align-items: center;
+ padding: 0 10px;
+
+ -webkit-box-shadow: -8px 8px 6px -7px #999;
+ -moz-box-shadow: -8px 8px 6px -7px #999;
+ box-shadow: -8px 8px 6px -7px #999;
+}
+
+.w-navbar .w-title {
+ margin-left: auto;
+ margin-right: auto;
+}
+
+.w-container {
+ height: 100%;
+ width: 100%;
+ padding-top: 3em;
+ position: relative;
+ overflow: hidden;
+ display: flex;
+ flex-direction: column;
+ justify-content: top;
+ align-items: center;
+}
+
+.w-container .w-button {
+ width: 50%;
+ height: 2em;
+ margin: .25em;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ background-color: #d7d7d7;
+ border-width: 0px;
+ font-weight: 600;
+ border-radius: 3px;
+}
\ No newline at end of file
diff --git a/generator/templates/nvw/src/styles/style-one.scss b/generator/templates/nvw/src/styles/style-one.scss
new file mode 100644
index 0000000..a3453ff
--- /dev/null
+++ b/generator/templates/nvw/src/styles/style-one.scss
@@ -0,0 +1,55 @@
+ActionBar {
+ color: #42b983;
+}
+
+.w-navbar {
+ color: #42b983;
+ position: fixed;
+ z-index: 10000;
+ height: 3em;
+ width: 100%;
+ top: 0px;
+ left: 0px;
+ margin: auto;
+ list-style: none;
+
+ display: flex;
+ align-items: center;
+ padding: 0 10px;
+
+ -webkit-box-shadow: -8px 8px 6px -7px #999;
+ -moz-box-shadow: -8px 8px 6px -7px #999;
+ box-shadow: -8px 8px 6px -7px #999;
+
+ .w-title {
+ margin-left: auto;
+ margin-right: auto;
+ }
+}
+
+.w-container {
+ height: 100%;
+ width: 100%;
+ padding-top: 3em;
+ position: relative;
+ overflow: hidden;
+ display: flex;
+ flex-direction: column;
+ justify-content: top;
+ align-items: center;
+
+
+ .w-button {
+ width: 50%;
+ height: 2em;
+ margin: .25em;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ background-color: #d7d7d7;
+ border-width: 0px;
+ font-weight: 600;
+ border-radius: 3px;
+ }
+
+}
\ No newline at end of file
diff --git a/generator/templates/nvw/src/styles/style-one.styl b/generator/templates/nvw/src/styles/style-one.styl
new file mode 100644
index 0000000..72959e9
--- /dev/null
+++ b/generator/templates/nvw/src/styles/style-one.styl
@@ -0,0 +1,46 @@
+ActionBar
+ color #42b983
+
+.w-navbar
+ color #42b983
+ position fixed
+ z-index 10000
+ height 3em
+ width 100%
+ top 0px
+ left 0px
+ margin auto
+ list-style none
+ display flex
+ align-items center
+ padding 0 10px
+ -webkit-box-shadow -8px 8px 6px -7px #999
+ -moz-box-shadow -8px 8px 6px -7px #999
+ box-shadow -8px 8px 6px -7px #999
+
+ .w-title
+ margin-left auto
+ margin-right auto
+
+.w-container
+ height 100%
+ width 100%
+ padding-top 3em
+ position relative
+ overflow hidden
+ display flex
+ flex-direction column
+ justify-content top
+ align-items center
+
+ .w-button
+ width 50%
+ height 2em
+ margin 0.25em
+ display flex
+ justify-content center
+ align-items center
+ background-color #d7d7d7
+ border-width 0px
+ font-weight 600
+ border-radius 3px
\ No newline at end of file
diff --git a/generator/templates/nvw/src/styles/style-two.css b/generator/templates/nvw/src/styles/style-two.css
new file mode 100644
index 0000000..3ee2f55
--- /dev/null
+++ b/generator/templates/nvw/src/styles/style-two.css
@@ -0,0 +1,7 @@
+ActionBar {
+ color: #000000;
+}
+
+.w-navbar {
+ color: #000000;
+}
\ No newline at end of file
diff --git a/generator/templates/nvw/src/styles/style-two.less b/generator/templates/nvw/src/styles/style-two.less
new file mode 100644
index 0000000..3ee2f55
--- /dev/null
+++ b/generator/templates/nvw/src/styles/style-two.less
@@ -0,0 +1,7 @@
+ActionBar {
+ color: #000000;
+}
+
+.w-navbar {
+ color: #000000;
+}
\ No newline at end of file
diff --git a/generator/templates/nvw/src/styles/style-two.scss b/generator/templates/nvw/src/styles/style-two.scss
new file mode 100644
index 0000000..9abd667
--- /dev/null
+++ b/generator/templates/nvw/src/styles/style-two.scss
@@ -0,0 +1,7 @@
+ActionBar {
+ color: #000000;
+}
+
+.w-navbar {
+ color: #000000;
+}
\ No newline at end of file
diff --git a/generator/templates/nvw/src/styles/style-two.styl b/generator/templates/nvw/src/styles/style-two.styl
new file mode 100644
index 0000000..a771955
--- /dev/null
+++ b/generator/templates/nvw/src/styles/style-two.styl
@@ -0,0 +1,5 @@
+ActionBar
+ color #000000
+
+.w-navbar
+ color #000000
\ No newline at end of file
diff --git a/generator/templates/nvw/src/views/About.vue b/generator/templates/nvw/src/views/About.vue
new file mode 100644
index 0000000..1938baf
--- /dev/null
+++ b/generator/templates/nvw/src/views/About.vue
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<%_ if (!usingTS) { _%>
+<%# -------------------- Is Not Using TypeScript -------------------- -%>
+
+<%_ } else { _%>
+<%# -------------------- Is Using TypeScript -------------------- -%>
+
+<%_ } _%>
+
+<%_ if (rootOptions.cssPreprocessor) { _%>
+<%_ if (rootOptions.cssPreprocessor == 'sass' || rootOptions.cssPreprocessor == 'scss' || rootOptions.cssPreprocessor == 'dart-sass' ) { _%>
+<%# -------------------- IS Using sass, scss OR dart-sass -------------------- -%>
+
+<%_ } else if (rootOptions.cssPreprocessor == 'stylus') { _%>
+<%# -------------------- IS Using stylus -------------------- -%>
+
+<%_ } else if (rootOptions.cssPreprocessor == 'less') { _%>
+<%# -------------------- IS Using Less -------------------- -%>
+
+<%_ } _%>
+<%_ } else { _%>
+<%# -------------------- IS Using standard CSS -------------------- -%>
+
+<%_ } _%>
+
+
+
diff --git a/generator/templates/nvw/src/views/Home.vue b/generator/templates/nvw/src/views/Home.vue
new file mode 100644
index 0000000..0de317c
--- /dev/null
+++ b/generator/templates/nvw/src/views/Home.vue
@@ -0,0 +1,133 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<%_ if (!usingTS) { _%>
+<%# -------------------- Is Not Using TypeScript -------------------- -%>
+
+<%_ } else { _%>
+<%# -------------------- Is Using TypeScript -------------------- -%>
+
+<%_ } _%>
+
+<%_ if (rootOptions.cssPreprocessor) { _%>
+<%_ if (rootOptions.cssPreprocessor == 'sass' || rootOptions.cssPreprocessor == 'scss' || rootOptions.cssPreprocessor == 'dart-sass' ) { _%>
+<%# -------------------- IS Using sass, scss OR dart-sass -------------------- -%>
+
+<%_ } else if (rootOptions.cssPreprocessor == 'stylus') { _%>
+<%# -------------------- IS Using stylus -------------------- -%>
+
+<%_ } else if (rootOptions.cssPreprocessor == 'less') { _%>
+<%# -------------------- IS Using Less -------------------- -%>
+
+<%_ } _%>
+<%_ } else { _%>
+<%# -------------------- IS Using standard CSS -------------------- -%>
+
+<%_ } _%>
diff --git a/generator/templates/simple/native-only/existing/example/app/App.android.vue b/generator/templates/simple/native-only/existing/example/app/App.android.vue
deleted file mode 100644
index df50695..0000000
--- a/generator/templates/simple/native-only/existing/example/app/App.android.vue
+++ /dev/null
@@ -1,92 +0,0 @@
-<%_ if (!rootOptions.router) { _%>
-<%# This code is the same as having a router. #%>
-<%# Setting this space aside for future possible use in the template #%>
-
-
-
-
-
-
-
-
-
-
-<%_ } else { _%>
-<%# This code is the same as not having a router. #%>
-<%# See note above #%>
-
-
-
-
-
-
-
-
-
-
-<%_ } _%>
-
-<%_ if (rootOptions.cssPreprocessor !== 'stylus') { _%>
-
-<%_ } else { _%>
-
-<%_ } _%>
diff --git a/generator/templates/simple/native-only/existing/example/app/App.ios.vue b/generator/templates/simple/native-only/existing/example/app/App.ios.vue
deleted file mode 100644
index a50c727..0000000
--- a/generator/templates/simple/native-only/existing/example/app/App.ios.vue
+++ /dev/null
@@ -1,92 +0,0 @@
-<%_ if (!rootOptions.router) { _%>
-<%# This code is the same as having a router. #%>
-<%# Setting this space aside for future possible use in the template #%>
-
-
-
-
-
-
-
-
-
-
-<%_ } else { _%>
-<%# This code is the same as not having a router. #%>
-<%# See note above #%>
-
-
-
-
-
-
-
-
-
-
-<%_ } _%>
-
-<%_ if (rootOptions.cssPreprocessor !== 'stylus') { _%>
-
-<%_ } else { _%>
-
-<%_ } _%>
diff --git a/generator/templates/simple/native-only/existing/example/app/App.native.vue b/generator/templates/simple/native-only/existing/example/app/App.native.vue
deleted file mode 100644
index e2b5de1..0000000
--- a/generator/templates/simple/native-only/existing/example/app/App.native.vue
+++ /dev/null
@@ -1,92 +0,0 @@
-<%_ if (!rootOptions.router) { _%>
-<%# This code is the same as having a router. #%>
-<%# Setting this space aside for future possible use in the template #%>
-
-
-
-
-
-
-
-
-
-
-<%_ } else { _%>
-<%# This code is the same as not having a router. #%>
-<%# See note above #%>
-
-
-
-
-
-
-
-
-
-
-<%_ } _%>
-
-<%_ if (rootOptions.cssPreprocessor !== 'stylus') { _%>
-
-<%_ } else { _%>
-
-<%_ } _%>
diff --git a/generator/templates/simple/native-only/existing/example/app/components/HelloWorld.android.vue b/generator/templates/simple/native-only/existing/example/app/components/HelloWorld.android.vue
deleted file mode 100644
index 0669e6f..0000000
--- a/generator/templates/simple/native-only/existing/example/app/components/HelloWorld.android.vue
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-<%_ if (rootOptions.cssPreprocessor !== 'stylus') { _%>
-
-<%_ } else { _%>
-
-<%_ } _%>
\ No newline at end of file
diff --git a/generator/templates/simple/native-only/existing/example/app/components/HelloWorld.ios.vue b/generator/templates/simple/native-only/existing/example/app/components/HelloWorld.ios.vue
deleted file mode 100644
index 0669e6f..0000000
--- a/generator/templates/simple/native-only/existing/example/app/components/HelloWorld.ios.vue
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-<%_ if (rootOptions.cssPreprocessor !== 'stylus') { _%>
-
-<%_ } else { _%>
-
-<%_ } _%>
\ No newline at end of file
diff --git a/generator/templates/simple/native-only/existing/example/app/components/HelloWorld.native.vue b/generator/templates/simple/native-only/existing/example/app/components/HelloWorld.native.vue
deleted file mode 100644
index 0669e6f..0000000
--- a/generator/templates/simple/native-only/existing/example/app/components/HelloWorld.native.vue
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-<%_ if (rootOptions.cssPreprocessor !== 'stylus') { _%>
-
-<%_ } else { _%>
-
-<%_ } _%>
\ No newline at end of file
diff --git a/generator/templates/simple/native-only/existing/example/app/main.js b/generator/templates/simple/native-only/existing/example/app/main.js
deleted file mode 100644
index dfd8310..0000000
--- a/generator/templates/simple/native-only/existing/example/app/main.js
+++ /dev/null
@@ -1,32 +0,0 @@
----
-extend: '@vue/cli-service/generator/template/src/main.js'
-replace:
- - !!js/regexp /import Vue from 'vue'/
- - !!js/regexp /import App from './App.vue'/
- - !!js/regexp /Vue.config.productionTip = false/
- - !!js/regexp /h\(App\)/
- - !!js/regexp /}\)\.\$mount\('#app'\)/
----
-
-<%# REPLACE %>
-import Vue from 'nativescript-vue'
-<%# END_REPLACE %>
-
-<%# REPLACE %>
-import App from '~/App'
-<%# END_REPLACE %>
-
-<%# REPLACE %>
-// Set the following to `true` to hide the logs created by nativescript-vue
-Vue.config.silent = false
-// Set the following to `false` to not colorize the logs created by nativescript-vue
-Vue.config.debug = true
-<%# END_REPLACE %>
-
-<%# REPLACE %>
-h('frame', [h(App)])
-<%# END_REPLACE %>
-
-<%# REPLACE %>
-}).$start()
-<%# END_REPLACE %>
\ No newline at end of file
diff --git a/generator/templates/simple/native-only/existing/example/app/views/About.android.vue b/generator/templates/simple/native-only/existing/example/app/views/About.android.vue
deleted file mode 100644
index db9189d..0000000
--- a/generator/templates/simple/native-only/existing/example/app/views/About.android.vue
+++ /dev/null
@@ -1,20 +0,0 @@
-<%_ if (rootOptions.router) { _%>
-
-
-
-
-
-
-
-
-
-<%_ } _%>
diff --git a/generator/templates/simple/native-only/existing/example/app/views/About.ios.vue b/generator/templates/simple/native-only/existing/example/app/views/About.ios.vue
deleted file mode 100644
index aa2c945..0000000
--- a/generator/templates/simple/native-only/existing/example/app/views/About.ios.vue
+++ /dev/null
@@ -1,20 +0,0 @@
-<%_ if (rootOptions.router) { _%>
-
-
-
-
-
-
-
-
-
-<%_ } _%>
diff --git a/generator/templates/simple/native-only/existing/example/app/views/About.native.vue b/generator/templates/simple/native-only/existing/example/app/views/About.native.vue
deleted file mode 100644
index e2b2191..0000000
--- a/generator/templates/simple/native-only/existing/example/app/views/About.native.vue
+++ /dev/null
@@ -1,20 +0,0 @@
-<%_ if (rootOptions.router) { _%>
-
-
-
-
-
-
-
-
-
-<%_ } _%>
diff --git a/generator/templates/simple/native-only/existing/example/app/views/Home.android.vue b/generator/templates/simple/native-only/existing/example/app/views/Home.android.vue
deleted file mode 100644
index f6bb09e..0000000
--- a/generator/templates/simple/native-only/existing/example/app/views/Home.android.vue
+++ /dev/null
@@ -1,52 +0,0 @@
-<%_ if (rootOptions.router) { _%>
-
-
-
-
-
-
-
-
-
-
-
-<%_ } _%>
-
-<%_ if (rootOptions.cssPreprocessor !== 'stylus') { _%>
-
-<%_ } else { _%>
-
-<%_ } _%>
diff --git a/generator/templates/simple/native-only/existing/example/app/views/Home.ios.vue b/generator/templates/simple/native-only/existing/example/app/views/Home.ios.vue
deleted file mode 100644
index da41017..0000000
--- a/generator/templates/simple/native-only/existing/example/app/views/Home.ios.vue
+++ /dev/null
@@ -1,52 +0,0 @@
-<%_ if (rootOptions.router) { _%>
-
-
-
-
-
-
-
-
-
-
-
-<%_ } _%>
-
-<%_ if (rootOptions.cssPreprocessor !== 'stylus') { _%>
-
-<%_ } else { _%>
-
-<%_ } _%>
diff --git a/generator/templates/simple/native-only/existing/example/app/views/Home.native.vue b/generator/templates/simple/native-only/existing/example/app/views/Home.native.vue
deleted file mode 100644
index 61732ca..0000000
--- a/generator/templates/simple/native-only/existing/example/app/views/Home.native.vue
+++ /dev/null
@@ -1,52 +0,0 @@
-<%_ if (rootOptions.router) { _%>
-
-
-
-
-
-
-
-
-
-
-
-<%_ } _%>
-
-<%_ if (rootOptions.cssPreprocessor !== 'stylus') { _%>
-
-<%_ } else { _%>
-
-<%_ } _%>
diff --git a/generator/templates/simple/native-only/existing/example/babel.config.js b/generator/templates/simple/native-only/existing/example/babel.config.js
deleted file mode 100644
index 116252c..0000000
--- a/generator/templates/simple/native-only/existing/example/babel.config.js
+++ /dev/null
@@ -1,7 +0,0 @@
-module.exports = {
- plugins: ["@babel/plugin-syntax-dynamic-import"],
- presets: [
- process.env.VUE_PLATFORM === 'web' ? '@vue/app' : {},
- ['@babel/env', { targets: { esmodules: true } }]
- ]
-}
\ No newline at end of file
diff --git a/generator/templates/simple/native-only/new/app/App.android.vue b/generator/templates/simple/native-only/new/app/App.android.vue
deleted file mode 100644
index df50695..0000000
--- a/generator/templates/simple/native-only/new/app/App.android.vue
+++ /dev/null
@@ -1,92 +0,0 @@
-<%_ if (!rootOptions.router) { _%>
-<%# This code is the same as having a router. #%>
-<%# Setting this space aside for future possible use in the template #%>
-
-
-
-
-
-
-
-
-
-
-<%_ } else { _%>
-<%# This code is the same as not having a router. #%>
-<%# See note above #%>
-
-
-
-
-
-
-
-
-
-
-<%_ } _%>
-
-<%_ if (rootOptions.cssPreprocessor !== 'stylus') { _%>
-
-<%_ } else { _%>
-
-<%_ } _%>
diff --git a/generator/templates/simple/native-only/new/app/App.ios.vue b/generator/templates/simple/native-only/new/app/App.ios.vue
deleted file mode 100644
index a50c727..0000000
--- a/generator/templates/simple/native-only/new/app/App.ios.vue
+++ /dev/null
@@ -1,92 +0,0 @@
-<%_ if (!rootOptions.router) { _%>
-<%# This code is the same as having a router. #%>
-<%# Setting this space aside for future possible use in the template #%>
-
-
-
-
-
-
-
-
-
-
-<%_ } else { _%>
-<%# This code is the same as not having a router. #%>
-<%# See note above #%>
-
-
-
-
-
-
-
-
-
-
-<%_ } _%>
-
-<%_ if (rootOptions.cssPreprocessor !== 'stylus') { _%>
-
-<%_ } else { _%>
-
-<%_ } _%>
diff --git a/generator/templates/simple/native-only/new/app/App.native.vue b/generator/templates/simple/native-only/new/app/App.native.vue
deleted file mode 100644
index e2b5de1..0000000
--- a/generator/templates/simple/native-only/new/app/App.native.vue
+++ /dev/null
@@ -1,92 +0,0 @@
-<%_ if (!rootOptions.router) { _%>
-<%# This code is the same as having a router. #%>
-<%# Setting this space aside for future possible use in the template #%>
-
-
-
-
-
-
-
-
-
-
-<%_ } else { _%>
-<%# This code is the same as not having a router. #%>
-<%# See note above #%>
-
-
-
-
-
-
-
-
-
-
-<%_ } _%>
-
-<%_ if (rootOptions.cssPreprocessor !== 'stylus') { _%>
-
-<%_ } else { _%>
-
-<%_ } _%>
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/Android/AndroidManifest.xml b/generator/templates/simple/native-only/new/app/App_Resources/Android/AndroidManifest.xml
deleted file mode 100644
index c2e1d9a..0000000
--- a/generator/templates/simple/native-only/new/app/App_Resources/Android/AndroidManifest.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/Android/app.gradle b/generator/templates/simple/native-only/new/app/App_Resources/Android/app.gradle
deleted file mode 100644
index 5476b2c..0000000
--- a/generator/templates/simple/native-only/new/app/App_Resources/Android/app.gradle
+++ /dev/null
@@ -1,11 +0,0 @@
-// Add your native dependencies here:
-
-android {
- defaultConfig {
- generatedDensities = []
- applicationId = "__PACKAGE__"
- }
- aaptOptions {
- additionalParameters "--no-version-vectors"
- }
-}
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-hdpi/background.png b/generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-hdpi/background.png
deleted file mode 100644
index 6420032..0000000
Binary files a/generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-hdpi/background.png and /dev/null differ
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-hdpi/logo.png b/generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-hdpi/logo.png
deleted file mode 100644
index 711905f..0000000
Binary files a/generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-hdpi/logo.png and /dev/null differ
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-ldpi/background.png b/generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-ldpi/background.png
deleted file mode 100644
index 03befc2..0000000
Binary files a/generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-ldpi/background.png and /dev/null differ
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-ldpi/icon.png b/generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-ldpi/icon.png
deleted file mode 100644
index bd04848..0000000
Binary files a/generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-ldpi/icon.png and /dev/null differ
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-ldpi/logo.png b/generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-ldpi/logo.png
deleted file mode 100644
index af908e4..0000000
Binary files a/generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-ldpi/logo.png and /dev/null differ
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-mdpi/background.png b/generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-mdpi/background.png
deleted file mode 100644
index cfe4a7c..0000000
Binary files a/generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-mdpi/background.png and /dev/null differ
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-mdpi/icon.png b/generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-mdpi/icon.png
deleted file mode 100644
index 32aa617..0000000
Binary files a/generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-mdpi/icon.png and /dev/null differ
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-mdpi/logo.png b/generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-mdpi/logo.png
deleted file mode 100644
index c21ae44..0000000
Binary files a/generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-mdpi/logo.png and /dev/null differ
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-nodpi/splash_screen.xml b/generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-nodpi/splash_screen.xml
deleted file mode 100644
index ada77f9..0000000
--- a/generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-nodpi/splash_screen.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-xhdpi/background.png b/generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-xhdpi/background.png
deleted file mode 100644
index b06ae26..0000000
Binary files a/generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-xhdpi/background.png and /dev/null differ
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-xhdpi/icon.png b/generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-xhdpi/icon.png
deleted file mode 100644
index 1295004..0000000
Binary files a/generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-xhdpi/icon.png and /dev/null differ
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-xhdpi/logo.png b/generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-xhdpi/logo.png
deleted file mode 100644
index 4ad5346..0000000
Binary files a/generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-xhdpi/logo.png and /dev/null differ
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-xxhdpi/background.png b/generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-xxhdpi/background.png
deleted file mode 100644
index 9bc7f01..0000000
Binary files a/generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-xxhdpi/background.png and /dev/null differ
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-xxhdpi/icon.png b/generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-xxhdpi/icon.png
deleted file mode 100644
index 541e759..0000000
Binary files a/generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-xxhdpi/icon.png and /dev/null differ
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-xxhdpi/logo.png b/generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-xxhdpi/logo.png
deleted file mode 100644
index bcc4011..0000000
Binary files a/generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-xxhdpi/logo.png and /dev/null differ
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-xxxhdpi/background.png b/generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-xxxhdpi/background.png
deleted file mode 100644
index d93c3d8..0000000
Binary files a/generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-xxxhdpi/background.png and /dev/null differ
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-xxxhdpi/icon.png b/generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-xxxhdpi/icon.png
deleted file mode 100644
index 072b601..0000000
Binary files a/generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-xxxhdpi/icon.png and /dev/null differ
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-xxxhdpi/logo.png b/generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-xxxhdpi/logo.png
deleted file mode 100644
index 96acb1e..0000000
Binary files a/generator/templates/simple/native-only/new/app/App_Resources/Android/drawable-xxxhdpi/logo.png and /dev/null differ
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/Android/values-v21/colors.xml b/generator/templates/simple/native-only/new/app/App_Resources/Android/values-v21/colors.xml
deleted file mode 100644
index a64641a..0000000
--- a/generator/templates/simple/native-only/new/app/App_Resources/Android/values-v21/colors.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
- #3d5afe
-
\ No newline at end of file
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/Android/values-v21/strings.xml b/generator/templates/simple/native-only/new/app/App_Resources/Android/values-v21/strings.xml
deleted file mode 100644
index f2e7f1b..0000000
--- a/generator/templates/simple/native-only/new/app/App_Resources/Android/values-v21/strings.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
- <%- applicationName %>
- <%- applicationName %>
-
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/Android/values-v21/styles.xml b/generator/templates/simple/native-only/new/app/App_Resources/Android/values-v21/styles.xml
deleted file mode 100644
index acff7c9..0000000
--- a/generator/templates/simple/native-only/new/app/App_Resources/Android/values-v21/styles.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/Android/values/colors.xml b/generator/templates/simple/native-only/new/app/App_Resources/Android/values/colors.xml
deleted file mode 100644
index 74ad882..0000000
--- a/generator/templates/simple/native-only/new/app/App_Resources/Android/values/colors.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
- #F5F5F5
- #757575
- #33B5E5
- #272734
-
\ No newline at end of file
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/Android/values/strings.xml b/generator/templates/simple/native-only/new/app/App_Resources/Android/values/strings.xml
deleted file mode 100644
index f2e7f1b..0000000
--- a/generator/templates/simple/native-only/new/app/App_Resources/Android/values/strings.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
- <%- applicationName %>
- <%- applicationName %>
-
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/Android/values/styles.xml b/generator/templates/simple/native-only/new/app/App_Resources/Android/values/styles.xml
deleted file mode 100644
index fae0f4b..0000000
--- a/generator/templates/simple/native-only/new/app/App_Resources/Android/values/styles.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json b/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json
deleted file mode 100644
index 4034b76..0000000
--- a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json
+++ /dev/null
@@ -1,98 +0,0 @@
-{
- "images" : [
- {
- "size" : "29x29",
- "idiom" : "iphone",
- "filename" : "icon-29.png",
- "scale" : "1x"
- },
- {
- "size" : "29x29",
- "idiom" : "iphone",
- "filename" : "icon-29@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "29x29",
- "idiom" : "iphone",
- "filename" : "icon-29@3x.png",
- "scale" : "3x"
- },
- {
- "size" : "40x40",
- "idiom" : "iphone",
- "filename" : "icon-40@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "40x40",
- "idiom" : "iphone",
- "filename" : "icon-40@3x.png",
- "scale" : "3x"
- },
- {
- "size" : "60x60",
- "idiom" : "iphone",
- "filename" : "icon-60@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "60x60",
- "idiom" : "iphone",
- "filename" : "icon-60@3x.png",
- "scale" : "3x"
- },
- {
- "size" : "29x29",
- "idiom" : "ipad",
- "filename" : "icon-29.png",
- "scale" : "1x"
- },
- {
- "size" : "29x29",
- "idiom" : "ipad",
- "filename" : "icon-29@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "40x40",
- "idiom" : "ipad",
- "filename" : "icon-40.png",
- "scale" : "1x"
- },
- {
- "size" : "40x40",
- "idiom" : "ipad",
- "filename" : "icon-40@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "76x76",
- "idiom" : "ipad",
- "filename" : "icon-76.png",
- "scale" : "1x"
- },
- {
- "size" : "76x76",
- "idiom" : "ipad",
- "filename" : "icon-76@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "83.5x83.5",
- "idiom" : "ipad",
- "filename" : "icon-83.5@2x.png",
- "scale" : "2x"
- },
- {
- "size" : "1024x1024",
- "idiom" : "ios-marketing",
- "filename" : "icon-1024.png",
- "scale" : "1x"
- }
- ],
- "info" : {
- "version" : 1,
- "author" : "xcode"
- }
-}
\ No newline at end of file
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png b/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png
deleted file mode 100644
index fe7c504..0000000
Binary files a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png and /dev/null differ
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png b/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png
deleted file mode 100644
index 275ddd1..0000000
Binary files a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png and /dev/null differ
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png b/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png
deleted file mode 100644
index 906e4b4..0000000
Binary files a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png and /dev/null differ
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png b/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png
deleted file mode 100644
index 5b9a78e..0000000
Binary files a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png and /dev/null differ
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png b/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png
deleted file mode 100644
index 3e4a7ea..0000000
Binary files a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png and /dev/null differ
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png b/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png
deleted file mode 100644
index f1cf7ae..0000000
Binary files a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png and /dev/null differ
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png b/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png
deleted file mode 100644
index a6b0b6f..0000000
Binary files a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png and /dev/null differ
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png b/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png
deleted file mode 100644
index 091c136..0000000
Binary files a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png and /dev/null differ
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png b/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png
deleted file mode 100644
index eb0279c..0000000
Binary files a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png and /dev/null differ
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png b/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png
deleted file mode 100644
index 42d84e1..0000000
Binary files a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png and /dev/null differ
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png b/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png
deleted file mode 100644
index 50f1e70..0000000
Binary files a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png and /dev/null differ
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png b/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png
deleted file mode 100644
index 11dc75f..0000000
Binary files a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png and /dev/null differ
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/Contents.json b/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/Contents.json
deleted file mode 100644
index da4a164..0000000
--- a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/Contents.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "info" : {
- "version" : 1,
- "author" : "xcode"
- }
-}
\ No newline at end of file
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Contents.json b/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Contents.json
deleted file mode 100644
index 11bfcf5..0000000
--- a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Contents.json
+++ /dev/null
@@ -1,176 +0,0 @@
-{
- "images" : [
- {
- "extent" : "full-screen",
- "idiom" : "iphone",
- "subtype" : "2436h",
- "filename" : "Default-1125h.png",
- "minimum-system-version" : "11.0",
- "orientation" : "portrait",
- "scale" : "3x"
- },
- {
- "orientation" : "landscape",
- "idiom" : "iphone",
- "extent" : "full-screen",
- "filename" : "Default-Landscape-X.png",
- "minimum-system-version" : "11.0",
- "subtype" : "2436h",
- "scale" : "3x"
- },
- {
- "extent" : "full-screen",
- "idiom" : "iphone",
- "subtype" : "736h",
- "filename" : "Default-736h@3x.png",
- "minimum-system-version" : "8.0",
- "orientation" : "portrait",
- "scale" : "3x"
- },
- {
- "extent" : "full-screen",
- "idiom" : "iphone",
- "subtype" : "736h",
- "filename" : "Default-Landscape@3x.png",
- "minimum-system-version" : "8.0",
- "orientation" : "landscape",
- "scale" : "3x"
- },
- {
- "extent" : "full-screen",
- "idiom" : "iphone",
- "subtype" : "667h",
- "filename" : "Default-667h@2x.png",
- "minimum-system-version" : "8.0",
- "orientation" : "portrait",
- "scale" : "2x"
- },
- {
- "orientation" : "portrait",
- "idiom" : "iphone",
- "filename" : "Default@2x.png",
- "extent" : "full-screen",
- "minimum-system-version" : "7.0",
- "scale" : "2x"
- },
- {
- "extent" : "full-screen",
- "idiom" : "iphone",
- "subtype" : "retina4",
- "filename" : "Default-568h@2x.png",
- "minimum-system-version" : "7.0",
- "orientation" : "portrait",
- "scale" : "2x"
- },
- {
- "orientation" : "portrait",
- "idiom" : "ipad",
- "filename" : "Default-Portrait.png",
- "extent" : "full-screen",
- "minimum-system-version" : "7.0",
- "scale" : "1x"
- },
- {
- "orientation" : "landscape",
- "idiom" : "ipad",
- "filename" : "Default-Landscape.png",
- "extent" : "full-screen",
- "minimum-system-version" : "7.0",
- "scale" : "1x"
- },
- {
- "orientation" : "portrait",
- "idiom" : "ipad",
- "filename" : "Default-Portrait@2x.png",
- "extent" : "full-screen",
- "minimum-system-version" : "7.0",
- "scale" : "2x"
- },
- {
- "orientation" : "landscape",
- "idiom" : "ipad",
- "filename" : "Default-Landscape@2x.png",
- "extent" : "full-screen",
- "minimum-system-version" : "7.0",
- "scale" : "2x"
- },
- {
- "orientation" : "portrait",
- "idiom" : "iphone",
- "filename" : "Default.png",
- "extent" : "full-screen",
- "scale" : "1x"
- },
- {
- "orientation" : "portrait",
- "idiom" : "iphone",
- "filename" : "Default@2x.png",
- "extent" : "full-screen",
- "scale" : "2x"
- },
- {
- "orientation" : "portrait",
- "idiom" : "iphone",
- "filename" : "Default-568h@2x.png",
- "extent" : "full-screen",
- "subtype" : "retina4",
- "scale" : "2x"
- },
- {
- "orientation" : "portrait",
- "idiom" : "ipad",
- "extent" : "to-status-bar",
- "scale" : "1x"
- },
- {
- "orientation" : "portrait",
- "idiom" : "ipad",
- "filename" : "Default-Portrait.png",
- "extent" : "full-screen",
- "scale" : "1x"
- },
- {
- "orientation" : "landscape",
- "idiom" : "ipad",
- "extent" : "to-status-bar",
- "scale" : "1x"
- },
- {
- "orientation" : "landscape",
- "idiom" : "ipad",
- "filename" : "Default-Landscape.png",
- "extent" : "full-screen",
- "scale" : "1x"
- },
- {
- "orientation" : "portrait",
- "idiom" : "ipad",
- "extent" : "to-status-bar",
- "scale" : "2x"
- },
- {
- "orientation" : "portrait",
- "idiom" : "ipad",
- "filename" : "Default-Portrait@2x.png",
- "extent" : "full-screen",
- "scale" : "2x"
- },
- {
- "orientation" : "landscape",
- "idiom" : "ipad",
- "extent" : "to-status-bar",
- "scale" : "2x"
- },
- {
- "orientation" : "landscape",
- "idiom" : "ipad",
- "filename" : "Default-Landscape@2x.png",
- "extent" : "full-screen",
- "scale" : "2x"
- }
- ],
- "info" : {
- "version" : 1,
- "author" : "xcode"
- }
-}
\ No newline at end of file
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-1125h.png b/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-1125h.png
deleted file mode 100644
index c0b1795..0000000
Binary files a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-1125h.png and /dev/null differ
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png b/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png
deleted file mode 100644
index 2cbc87d..0000000
Binary files a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png and /dev/null differ
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png b/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png
deleted file mode 100644
index 1347b86..0000000
Binary files a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png and /dev/null differ
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png b/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png
deleted file mode 100644
index cbc84a5..0000000
Binary files a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png and /dev/null differ
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-X.png b/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-X.png
deleted file mode 100644
index bd01ebd..0000000
Binary files a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-X.png and /dev/null differ
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png b/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png
deleted file mode 100644
index 5721995..0000000
Binary files a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png and /dev/null differ
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png b/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png
deleted file mode 100644
index 69e52d7..0000000
Binary files a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png and /dev/null differ
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png b/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png
deleted file mode 100644
index 7831dec..0000000
Binary files a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png and /dev/null differ
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png b/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png
deleted file mode 100644
index ad002d9..0000000
Binary files a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png and /dev/null differ
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png b/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png
deleted file mode 100644
index 78def5c..0000000
Binary files a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png and /dev/null differ
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png b/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png
deleted file mode 100644
index eb6f00f..0000000
Binary files a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png and /dev/null differ
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png b/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png
deleted file mode 100644
index fb8f093..0000000
Binary files a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png and /dev/null differ
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/Contents.json b/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/Contents.json
deleted file mode 100644
index 4f4e9c5..0000000
--- a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/Contents.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "images" : [
- {
- "idiom" : "universal",
- "filename" : "LaunchScreen-AspectFill.png",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "filename" : "LaunchScreen-AspectFill@2x.png",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "version" : 1,
- "author" : "xcode"
- }
-}
\ No newline at end of file
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png b/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png
deleted file mode 100644
index 037843e..0000000
Binary files a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png and /dev/null differ
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png b/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png
deleted file mode 100644
index 05e0cca..0000000
Binary files a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png and /dev/null differ
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/Contents.json b/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/Contents.json
deleted file mode 100644
index 23c0ffd..0000000
--- a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/Contents.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "images" : [
- {
- "idiom" : "universal",
- "filename" : "LaunchScreen-Center.png",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "filename" : "LaunchScreen-Center@2x.png",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "version" : 1,
- "author" : "xcode"
- }
-}
\ No newline at end of file
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png b/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png
deleted file mode 100644
index e665846..0000000
Binary files a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png and /dev/null differ
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png b/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png
deleted file mode 100644
index b864a44..0000000
Binary files a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png and /dev/null differ
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Info.plist b/generator/templates/simple/native-only/new/app/App_Resources/iOS/Info.plist
deleted file mode 100644
index a7c481c..0000000
--- a/generator/templates/simple/native-only/new/app/App_Resources/iOS/Info.plist
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
-
-
- CFBundleDevelopmentRegion
- en
- CFBundleDisplayName
- <%- applicationName %>
- CFBundleExecutable
- ${EXECUTABLE_NAME}
- CFBundleInfoDictionaryVersion
- 6.0
- CFBundleName
- ${PRODUCT_NAME}
- CFBundlePackageType
- APPL
- CFBundleShortVersionString
- <%- applicationVersion %>
- CFBundleSignature
- ????
- CFBundleVersion
- <%- applicationVersion %>
- LSRequiresIPhoneOS
-
- UILaunchStoryboardName
- LaunchScreen
- UIRequiresFullScreen
-
- UIRequiredDeviceCapabilities
-
- armv7
-
- UISupportedInterfaceOrientations
-
- UIInterfaceOrientationPortrait
- UIInterfaceOrientationLandscapeLeft
- UIInterfaceOrientationLandscapeRight
-
- UISupportedInterfaceOrientations~ipad
-
- UIInterfaceOrientationPortrait
- UIInterfaceOrientationPortraitUpsideDown
- UIInterfaceOrientationLandscapeLeft
- UIInterfaceOrientationLandscapeRight
-
-
-
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/iOS/LaunchScreen.storyboard b/generator/templates/simple/native-only/new/app/App_Resources/iOS/LaunchScreen.storyboard
deleted file mode 100644
index 2ad9471..0000000
--- a/generator/templates/simple/native-only/new/app/App_Resources/iOS/LaunchScreen.storyboard
+++ /dev/null
@@ -1,49 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/generator/templates/simple/native-only/new/app/App_Resources/iOS/build.xcconfig b/generator/templates/simple/native-only/new/app/App_Resources/iOS/build.xcconfig
deleted file mode 100644
index 4b01184..0000000
--- a/generator/templates/simple/native-only/new/app/App_Resources/iOS/build.xcconfig
+++ /dev/null
@@ -1,7 +0,0 @@
-// You can add custom settings here
-// for example you can uncomment the following line to force distribution code signing
-// CODE_SIGN_IDENTITY = iPhone Distribution
-// 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
-// DEVELOPMENT_TEAM = YOUR_TEAM_ID;
-ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
-ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
diff --git a/generator/templates/simple/native-only/new/app/components/HelloWorld.android.vue b/generator/templates/simple/native-only/new/app/components/HelloWorld.android.vue
deleted file mode 100644
index 0669e6f..0000000
--- a/generator/templates/simple/native-only/new/app/components/HelloWorld.android.vue
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-<%_ if (rootOptions.cssPreprocessor !== 'stylus') { _%>
-
-<%_ } else { _%>
-
-<%_ } _%>
\ No newline at end of file
diff --git a/generator/templates/simple/native-only/new/app/components/HelloWorld.ios.vue b/generator/templates/simple/native-only/new/app/components/HelloWorld.ios.vue
deleted file mode 100644
index 0669e6f..0000000
--- a/generator/templates/simple/native-only/new/app/components/HelloWorld.ios.vue
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-<%_ if (rootOptions.cssPreprocessor !== 'stylus') { _%>
-
-<%_ } else { _%>
-
-<%_ } _%>
\ No newline at end of file
diff --git a/generator/templates/simple/native-only/new/app/components/HelloWorld.native.vue b/generator/templates/simple/native-only/new/app/components/HelloWorld.native.vue
deleted file mode 100644
index 0669e6f..0000000
--- a/generator/templates/simple/native-only/new/app/components/HelloWorld.native.vue
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-<%_ if (rootOptions.cssPreprocessor !== 'stylus') { _%>
-
-<%_ } else { _%>
-
-<%_ } _%>
\ No newline at end of file
diff --git a/generator/templates/simple/native-only/new/app/views/About.android.vue b/generator/templates/simple/native-only/new/app/views/About.android.vue
deleted file mode 100644
index db9189d..0000000
--- a/generator/templates/simple/native-only/new/app/views/About.android.vue
+++ /dev/null
@@ -1,20 +0,0 @@
-<%_ if (rootOptions.router) { _%>
-
-
-
-
-
-
-
-
-
-<%_ } _%>
diff --git a/generator/templates/simple/native-only/new/app/views/About.ios.vue b/generator/templates/simple/native-only/new/app/views/About.ios.vue
deleted file mode 100644
index aa2c945..0000000
--- a/generator/templates/simple/native-only/new/app/views/About.ios.vue
+++ /dev/null
@@ -1,20 +0,0 @@
-<%_ if (rootOptions.router) { _%>
-
-
-
-
-
-
-
-
-
-<%_ } _%>
diff --git a/generator/templates/simple/native-only/new/app/views/About.native.vue b/generator/templates/simple/native-only/new/app/views/About.native.vue
deleted file mode 100644
index e2b2191..0000000
--- a/generator/templates/simple/native-only/new/app/views/About.native.vue
+++ /dev/null
@@ -1,20 +0,0 @@
-<%_ if (rootOptions.router) { _%>
-
-
-
-
-
-
-
-
-
-<%_ } _%>
diff --git a/generator/templates/simple/native-only/new/app/views/Home.android.vue b/generator/templates/simple/native-only/new/app/views/Home.android.vue
deleted file mode 100644
index f6bb09e..0000000
--- a/generator/templates/simple/native-only/new/app/views/Home.android.vue
+++ /dev/null
@@ -1,52 +0,0 @@
-<%_ if (rootOptions.router) { _%>
-
-
-
-
-
-
-
-
-
-
-
-<%_ } _%>
-
-<%_ if (rootOptions.cssPreprocessor !== 'stylus') { _%>
-
-<%_ } else { _%>
-
-<%_ } _%>
diff --git a/generator/templates/simple/native-only/new/app/views/Home.ios.vue b/generator/templates/simple/native-only/new/app/views/Home.ios.vue
deleted file mode 100644
index da41017..0000000
--- a/generator/templates/simple/native-only/new/app/views/Home.ios.vue
+++ /dev/null
@@ -1,52 +0,0 @@
-<%_ if (rootOptions.router) { _%>
-
-
-
-
-
-
-
-
-
-
-
-<%_ } _%>
-
-<%_ if (rootOptions.cssPreprocessor !== 'stylus') { _%>
-
-<%_ } else { _%>
-
-<%_ } _%>
diff --git a/generator/templates/simple/native-only/new/app/views/Home.native.vue b/generator/templates/simple/native-only/new/app/views/Home.native.vue
deleted file mode 100644
index 61732ca..0000000
--- a/generator/templates/simple/native-only/new/app/views/Home.native.vue
+++ /dev/null
@@ -1,52 +0,0 @@
-<%_ if (rootOptions.router) { _%>
-
-
-
-
-
-
-
-
-
-
-
-<%_ } _%>
-
-<%_ if (rootOptions.cssPreprocessor !== 'stylus') { _%>
-
-<%_ } else { _%>
-
-<%_ } _%>
diff --git a/generator/templates/simple/native-only/new/babel.config.js b/generator/templates/simple/native-only/new/babel.config.js
deleted file mode 100644
index 116252c..0000000
--- a/generator/templates/simple/native-only/new/babel.config.js
+++ /dev/null
@@ -1,7 +0,0 @@
-module.exports = {
- plugins: ["@babel/plugin-syntax-dynamic-import"],
- presets: [
- process.env.VUE_PLATFORM === 'web' ? '@vue/app' : {},
- ['@babel/env', { targets: { esmodules: true } }]
- ]
-}
\ No newline at end of file
diff --git a/generator/templates/simple/src/App.vue b/generator/templates/simple/src/App.vue
new file mode 100644
index 0000000..6822ea4
--- /dev/null
+++ b/generator/templates/simple/src/App.vue
@@ -0,0 +1,206 @@
+<%_ if (rootOptions.router) { _%>
+<%# -------------------- IS Using vue-router -------------------- -%>
+<%_ if (!options.isNativeOnly) { _%>
+
+
+
+
+ Home
+
+
+
+
+
+
+
+<%_ } else { _%>
+
+<%_ } _%>
+
+
+
+
+
+
+
+
+<%_ } else { _%>
+<%# -------------------- IS NOT Using vue-router -------------------- -%>
+<%_ if (!options.isNativeOnly) { _%>
+
+
+
+
+
+
+
+
+
+<%_ } else { _%>
+
+<%_ } _%>
+
+
+
+
+
+
+
+<%_ } _%>
+<%_ if (!usingTS) { _%>
+<%# -------------------- IS NOT Using TypeScript -------------------- -%>
+
+<%_ } else { _%>
+<%# -------------------- IS Using TypeScript -------------------- -%>
+
+<%_ } _%>
+
+
+<%_ if (rootOptions.cssPreprocessor) { _%>
+<%_ if (rootOptions.cssPreprocessor == 'sass' || rootOptions.cssPreprocessor == 'scss' || rootOptions.cssPreprocessor == 'dart-sass' ) { _%>
+<%# -------------------- IS Using sass, scss OR dart-sass -------------------- -%>
+
+
+<%_ } else if (rootOptions.cssPreprocessor == 'stylus') { _%>
+<%# -------------------- IS Using stylus -------------------- -%>
+
+
+<%_ } else if (rootOptions.cssPreprocessor == 'less') { _%>
+<%# -------------------- IS Using Less -------------------- -%>
+
+
+<%_ } _%>
+<%_ } else { _%>
+<%# -------------------- IS Using standard CSS -------------------- -%>
+
+
+<%_ } _%>
diff --git a/generator/templates/simple/without-nvw/new/src/assets/logo.png b/generator/templates/simple/src/assets/logo.png
similarity index 100%
rename from generator/templates/simple/without-nvw/new/src/assets/logo.png
rename to generator/templates/simple/src/assets/logo.png
diff --git a/generator/templates/simple/src/components/HelloWorld.android.vue b/generator/templates/simple/src/components/HelloWorld.android.vue
new file mode 100644
index 0000000..d3a74e1
--- /dev/null
+++ b/generator/templates/simple/src/components/HelloWorld.android.vue
@@ -0,0 +1,85 @@
+
+
+
+
+
+
+
+<%_ if (!usingTS) { _%>
+<%# -------------------- Is Not Using TypeScript -------------------- -%>
+
+<%_ } else { _%>
+<%# -------------------- Is Using TypeScript -------------------- -%>
+
+<%_ } _%>
+
+<%_ if (rootOptions.cssPreprocessor) { _%>
+<%_ if (rootOptions.cssPreprocessor == 'sass' || rootOptions.cssPreprocessor == 'scss' || rootOptions.cssPreprocessor == 'dart-sass' ) { _%>
+<%# -------------------- IS Using sass, scss OR dart-sass -------------------- -%>
+
+<%_ } else if (rootOptions.cssPreprocessor == 'stylus') { _%>
+<%# -------------------- IS Using stylus -------------------- -%>
+
+<%_ } else if (rootOptions.cssPreprocessor == 'less') { _%>
+<%# -------------------- IS Using Less -------------------- -%>
+
+<%_ } _%>
+<%_ } else { _%>
+<%# -------------------- IS Using standard CSS -------------------- -%>
+
+<%_ } _%>
\ No newline at end of file
diff --git a/generator/templates/simple/src/components/HelloWorld.ios.vue b/generator/templates/simple/src/components/HelloWorld.ios.vue
new file mode 100644
index 0000000..d3a74e1
--- /dev/null
+++ b/generator/templates/simple/src/components/HelloWorld.ios.vue
@@ -0,0 +1,85 @@
+
+
+
+
+
+
+
+<%_ if (!usingTS) { _%>
+<%# -------------------- Is Not Using TypeScript -------------------- -%>
+
+<%_ } else { _%>
+<%# -------------------- Is Using TypeScript -------------------- -%>
+
+<%_ } _%>
+
+<%_ if (rootOptions.cssPreprocessor) { _%>
+<%_ if (rootOptions.cssPreprocessor == 'sass' || rootOptions.cssPreprocessor == 'scss' || rootOptions.cssPreprocessor == 'dart-sass' ) { _%>
+<%# -------------------- IS Using sass, scss OR dart-sass -------------------- -%>
+
+<%_ } else if (rootOptions.cssPreprocessor == 'stylus') { _%>
+<%# -------------------- IS Using stylus -------------------- -%>
+
+<%_ } else if (rootOptions.cssPreprocessor == 'less') { _%>
+<%# -------------------- IS Using Less -------------------- -%>
+
+<%_ } _%>
+<%_ } else { _%>
+<%# -------------------- IS Using standard CSS -------------------- -%>
+
+<%_ } _%>
\ No newline at end of file
diff --git a/generator/templates/simple/src/components/HelloWorld.native.vue b/generator/templates/simple/src/components/HelloWorld.native.vue
new file mode 100644
index 0000000..d3a74e1
--- /dev/null
+++ b/generator/templates/simple/src/components/HelloWorld.native.vue
@@ -0,0 +1,85 @@
+
+
+
+
+
+
+
+<%_ if (!usingTS) { _%>
+<%# -------------------- Is Not Using TypeScript -------------------- -%>
+
+<%_ } else { _%>
+<%# -------------------- Is Using TypeScript -------------------- -%>
+
+<%_ } _%>
+
+<%_ if (rootOptions.cssPreprocessor) { _%>
+<%_ if (rootOptions.cssPreprocessor == 'sass' || rootOptions.cssPreprocessor == 'scss' || rootOptions.cssPreprocessor == 'dart-sass' ) { _%>
+<%# -------------------- IS Using sass, scss OR dart-sass -------------------- -%>
+
+<%_ } else if (rootOptions.cssPreprocessor == 'stylus') { _%>
+<%# -------------------- IS Using stylus -------------------- -%>
+
+<%_ } else if (rootOptions.cssPreprocessor == 'less') { _%>
+<%# -------------------- IS Using Less -------------------- -%>
+
+<%_ } _%>
+<%_ } else { _%>
+<%# -------------------- IS Using standard CSS -------------------- -%>
+
+<%_ } _%>
\ No newline at end of file
diff --git a/generator/templates/simple/src/components/HelloWorld.vue b/generator/templates/simple/src/components/HelloWorld.vue
new file mode 100644
index 0000000..a5a3594
--- /dev/null
+++ b/generator/templates/simple/src/components/HelloWorld.vue
@@ -0,0 +1,100 @@
+
+
+
{{msg}}
+
+
+
+<%_ if (!usingTS) { _%>
+<%# -------------------- Is Not Using TypeScript -------------------- -%>
+
+<%_ } else { _%>
+<%# -------------------- Is Using TypeScript -------------------- -%>
+
+<%_ } _%>
+
+<%_ if (rootOptions.cssPreprocessor) { _%>
+<%_ if (rootOptions.cssPreprocessor == 'sass' || rootOptions.cssPreprocessor == 'scss' || rootOptions.cssPreprocessor == 'dart-sass' ) { _%>
+<%# -------------------- IS Using sass, scss OR dart-sass -------------------- -%>
+
+<%_ } else if (rootOptions.cssPreprocessor == 'stylus') { _%>
+<%# -------------------- IS Using stylus -------------------- -%>
+
+<%_ } else if (rootOptions.cssPreprocessor == 'less') { _%>
+<%# -------------------- IS Using Less -------------------- -%>
+
+<%_ } _%>
+<%_ } else { _%>
+<%# -------------------- IS Using standard CSS -------------------- -%>
+
+<%_ } _%>
\ No newline at end of file
diff --git a/generator/templates/simple/without-nvw/existing/example/app/App_Resources/Android/drawable-hdpi/icon.png b/generator/templates/simple/src/components/icon.png
similarity index 100%
rename from generator/templates/simple/without-nvw/existing/example/app/App_Resources/Android/drawable-hdpi/icon.png
rename to generator/templates/simple/src/components/icon.png
diff --git a/generator/templates/simple/native-only/new/app/main.js b/generator/templates/simple/src/main.js
similarity index 56%
rename from generator/templates/simple/native-only/new/app/main.js
rename to generator/templates/simple/src/main.js
index dfd8310..899cd19 100644
--- a/generator/templates/simple/native-only/new/app/main.js
+++ b/generator/templates/simple/src/main.js
@@ -4,29 +4,26 @@ replace:
- !!js/regexp /import Vue from 'vue'/
- !!js/regexp /import App from './App.vue'/
- !!js/regexp /Vue.config.productionTip = false/
- - !!js/regexp /h\(App\)/
+ - !!js/regexp /h => h\(App\),/
- !!js/regexp /}\)\.\$mount\('#app'\)/
---
<%# REPLACE %>
-import Vue from 'nativescript-vue'
+import Vue from 'vue';
<%# END_REPLACE %>
<%# REPLACE %>
-import App from '~/App'
+import App from '~/App.vue';
<%# END_REPLACE %>
<%# REPLACE %>
-// Set the following to `true` to hide the logs created by nativescript-vue
-Vue.config.silent = false
-// Set the following to `false` to not colorize the logs created by nativescript-vue
-Vue.config.debug = true
+Vue.config.productionTip = false;
<%# END_REPLACE %>
<%# REPLACE %>
-h('frame', [h(App)])
+(h) => h(App),
<%# END_REPLACE %>
<%# REPLACE %>
-}).$start()
+}).$mount('#app');
<%# END_REPLACE %>
\ No newline at end of file
diff --git a/generator/templates/simple/src/main.native.js b/generator/templates/simple/src/main.native.js
new file mode 100644
index 0000000..b463509
--- /dev/null
+++ b/generator/templates/simple/src/main.native.js
@@ -0,0 +1,29 @@
+import Vue from 'nativescript-vue';
+<%_ if (rootOptions.router) { _%>
+import Navigator from 'nativescript-vue-navigator'
+<%_ } _%>
+
+import App from './App.vue';
+<%_ if (rootOptions.router) { _%>
+import { options } from './router';
+
+// adapt vue-router routes to nativescript-vue-navigator
+const routes = options.routes.reduce((data, route) => {
+ data[route.name] = {
+ component: route.component
+ }
+ return data
+}, {});
+
+Vue.use(Navigator, { routes });
+<%_ } _%>
+
+// Set the following to `true` to hide the logs created by nativescript-vue
+Vue.config.silent = false;
+// Set the following to `false` to not colorize the logs created by nativescript-vue
+// disabled in template due to typing issue for Typescript projects....NEEDS TO BE FIXED
+// Vue.config.debug = true;
+
+new Vue({
+ render: h => h('frame', [h(App)]),
+}).$start();
diff --git a/generator/templates/simple/native-only/new/app/package.json b/generator/templates/simple/src/package.json
similarity index 86%
rename from generator/templates/simple/native-only/new/app/package.json
rename to generator/templates/simple/src/package.json
index 8f7b233..41f6a95 100644
--- a/generator/templates/simple/native-only/new/app/package.json
+++ b/generator/templates/simple/src/package.json
@@ -3,7 +3,7 @@
"v8Flags": "--expose_gc",
"markingMode": "none"
},
- "main": "main",
+ "main": "main.native",
"name": "<%- applicationName %>",
"version": "<%- applicationVersion %>"
}
diff --git a/generator/templates/simple/src/router.js b/generator/templates/simple/src/router.js
new file mode 100644
index 0000000..e11a842
--- /dev/null
+++ b/generator/templates/simple/src/router.js
@@ -0,0 +1,53 @@
+---
+extend: '@vue/cli-service/generator/router.js'
+replace:
+ - !!js/regexp /import Vue from 'vue'/
+ - !!js/regexp /import Router from 'vue-router'/
+ - !!js/regexp /Vue.use\(Router\)/
+ - !!js/regexp /export default new Router\(\{/
+ - !!js/regexp /import Home from '\./views/Home.vue'/
+ - !!js/regexp /\(\) => import(.*)\.\/views\/About\.vue'\)/
+ - !!js/regexp /(\s+)\/\/ (.*)/
+ - !!js/regexp /(\s+)\/\/ (.*)/
+ - !!js/regexp /(\s+)\/\/ (.*)/
+ - !!js/regexp /\}\)/
+---
+
+<%# REPLACE %>
+import Vue from 'vue';
+<%# END_REPLACE %>
+
+<%# REPLACE %>
+import Router from 'vue-router';
+<%# END_REPLACE %>
+
+<%# REPLACE %>
+Vue.use(Router);
+<%# END_REPLACE %>
+
+<%# REPLACE %>
+export const options = {
+<%# END_REPLACE %>
+
+<%# REPLACE %>
+import Home from '~/views/Home.vue';
+import About from '~/views/About.vue';
+<%# END_REPLACE %>
+
+<%# REPLACE %>
+About,
+<%# END_REPLACE %>
+
+<%# REPLACE %>
+<%# END_REPLACE %>
+
+<%# REPLACE %>
+<%# END_REPLACE %>
+
+<%# REPLACE %>
+<%# END_REPLACE %>
+
+<%# REPLACE %>
+};
+export default new Router(options);
+<%# END_REPLACE %>
diff --git a/generator/templates/simple/src/styles/style-one.css b/generator/templates/simple/src/styles/style-one.css
new file mode 100644
index 0000000..aede169
--- /dev/null
+++ b/generator/templates/simple/src/styles/style-one.css
@@ -0,0 +1,53 @@
+ActionBar {
+ color: #42b983;
+}
+
+.w-navbar {
+ color: #42b983;
+ position: fixed;
+ z-index: 10000;
+ height: 3em;
+ width: 100%;
+ top: 0px;
+ left: 0px;
+ margin: auto;
+ list-style: none;
+
+ display: flex;
+ align-items: center;
+ padding: 0 10px;
+
+ -webkit-box-shadow: -8px 8px 6px -7px #999;
+ -moz-box-shadow: -8px 8px 6px -7px #999;
+ box-shadow: -8px 8px 6px -7px #999;
+}
+
+.w-navbar .w-title {
+ margin-left: auto;
+ margin-right: auto;
+}
+
+.w-container {
+ height: 100%;
+ width: 100%;
+ padding-top: 3em;
+ position: relative;
+ overflow: hidden;
+ display: flex;
+ flex-direction: column;
+ justify-content: top;
+ align-items: center;
+}
+
+.w-container .w-button {
+ width: 50%;
+ height: 2em;
+ margin: .25em;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ background-color: #d7d7d7;
+ border-width: 0px;
+ font-weight: 600;
+ border-radius: 3px;
+}
\ No newline at end of file
diff --git a/generator/templates/simple/src/styles/style-one.less b/generator/templates/simple/src/styles/style-one.less
new file mode 100644
index 0000000..aede169
--- /dev/null
+++ b/generator/templates/simple/src/styles/style-one.less
@@ -0,0 +1,53 @@
+ActionBar {
+ color: #42b983;
+}
+
+.w-navbar {
+ color: #42b983;
+ position: fixed;
+ z-index: 10000;
+ height: 3em;
+ width: 100%;
+ top: 0px;
+ left: 0px;
+ margin: auto;
+ list-style: none;
+
+ display: flex;
+ align-items: center;
+ padding: 0 10px;
+
+ -webkit-box-shadow: -8px 8px 6px -7px #999;
+ -moz-box-shadow: -8px 8px 6px -7px #999;
+ box-shadow: -8px 8px 6px -7px #999;
+}
+
+.w-navbar .w-title {
+ margin-left: auto;
+ margin-right: auto;
+}
+
+.w-container {
+ height: 100%;
+ width: 100%;
+ padding-top: 3em;
+ position: relative;
+ overflow: hidden;
+ display: flex;
+ flex-direction: column;
+ justify-content: top;
+ align-items: center;
+}
+
+.w-container .w-button {
+ width: 50%;
+ height: 2em;
+ margin: .25em;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ background-color: #d7d7d7;
+ border-width: 0px;
+ font-weight: 600;
+ border-radius: 3px;
+}
\ No newline at end of file
diff --git a/generator/templates/simple/src/styles/style-one.scss b/generator/templates/simple/src/styles/style-one.scss
new file mode 100644
index 0000000..a3453ff
--- /dev/null
+++ b/generator/templates/simple/src/styles/style-one.scss
@@ -0,0 +1,55 @@
+ActionBar {
+ color: #42b983;
+}
+
+.w-navbar {
+ color: #42b983;
+ position: fixed;
+ z-index: 10000;
+ height: 3em;
+ width: 100%;
+ top: 0px;
+ left: 0px;
+ margin: auto;
+ list-style: none;
+
+ display: flex;
+ align-items: center;
+ padding: 0 10px;
+
+ -webkit-box-shadow: -8px 8px 6px -7px #999;
+ -moz-box-shadow: -8px 8px 6px -7px #999;
+ box-shadow: -8px 8px 6px -7px #999;
+
+ .w-title {
+ margin-left: auto;
+ margin-right: auto;
+ }
+}
+
+.w-container {
+ height: 100%;
+ width: 100%;
+ padding-top: 3em;
+ position: relative;
+ overflow: hidden;
+ display: flex;
+ flex-direction: column;
+ justify-content: top;
+ align-items: center;
+
+
+ .w-button {
+ width: 50%;
+ height: 2em;
+ margin: .25em;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ background-color: #d7d7d7;
+ border-width: 0px;
+ font-weight: 600;
+ border-radius: 3px;
+ }
+
+}
\ No newline at end of file
diff --git a/generator/templates/simple/src/styles/style-one.styl b/generator/templates/simple/src/styles/style-one.styl
new file mode 100644
index 0000000..72959e9
--- /dev/null
+++ b/generator/templates/simple/src/styles/style-one.styl
@@ -0,0 +1,46 @@
+ActionBar
+ color #42b983
+
+.w-navbar
+ color #42b983
+ position fixed
+ z-index 10000
+ height 3em
+ width 100%
+ top 0px
+ left 0px
+ margin auto
+ list-style none
+ display flex
+ align-items center
+ padding 0 10px
+ -webkit-box-shadow -8px 8px 6px -7px #999
+ -moz-box-shadow -8px 8px 6px -7px #999
+ box-shadow -8px 8px 6px -7px #999
+
+ .w-title
+ margin-left auto
+ margin-right auto
+
+.w-container
+ height 100%
+ width 100%
+ padding-top 3em
+ position relative
+ overflow hidden
+ display flex
+ flex-direction column
+ justify-content top
+ align-items center
+
+ .w-button
+ width 50%
+ height 2em
+ margin 0.25em
+ display flex
+ justify-content center
+ align-items center
+ background-color #d7d7d7
+ border-width 0px
+ font-weight 600
+ border-radius 3px
\ No newline at end of file
diff --git a/generator/templates/simple/src/styles/style-two.css b/generator/templates/simple/src/styles/style-two.css
new file mode 100644
index 0000000..3ee2f55
--- /dev/null
+++ b/generator/templates/simple/src/styles/style-two.css
@@ -0,0 +1,7 @@
+ActionBar {
+ color: #000000;
+}
+
+.w-navbar {
+ color: #000000;
+}
\ No newline at end of file
diff --git a/generator/templates/simple/src/styles/style-two.less b/generator/templates/simple/src/styles/style-two.less
new file mode 100644
index 0000000..3ee2f55
--- /dev/null
+++ b/generator/templates/simple/src/styles/style-two.less
@@ -0,0 +1,7 @@
+ActionBar {
+ color: #000000;
+}
+
+.w-navbar {
+ color: #000000;
+}
\ No newline at end of file
diff --git a/generator/templates/simple/src/styles/style-two.scss b/generator/templates/simple/src/styles/style-two.scss
new file mode 100644
index 0000000..9abd667
--- /dev/null
+++ b/generator/templates/simple/src/styles/style-two.scss
@@ -0,0 +1,7 @@
+ActionBar {
+ color: #000000;
+}
+
+.w-navbar {
+ color: #000000;
+}
\ No newline at end of file
diff --git a/generator/templates/simple/src/styles/style-two.styl b/generator/templates/simple/src/styles/style-two.styl
new file mode 100644
index 0000000..a771955
--- /dev/null
+++ b/generator/templates/simple/src/styles/style-two.styl
@@ -0,0 +1,5 @@
+ActionBar
+ color #000000
+
+.w-navbar
+ color #000000
\ No newline at end of file
diff --git a/generator/templates/simple/src/views/About.vue b/generator/templates/simple/src/views/About.vue
new file mode 100644
index 0000000..bdd0537
--- /dev/null
+++ b/generator/templates/simple/src/views/About.vue
@@ -0,0 +1,80 @@
+<%_ if (!options.isNativeOnly) { _%>
+
+
+
+ This is an about page
+
+
+
+
+<%_ } else { _%>
+
+<%_ } _%>
+
+
+
+
+
+
+
+<%_ if (!usingTS) { _%>
+
+<%_ } else { _%>
+
+<%_ } _%>
+<%_ if (!usingTS) { _%>
+<%# -------------------- Is Not Using TypeScript -------------------- -%>
+<%# -------------------- Remove this line and Uncomment the next to use script tag - Prettier formatting bug removes all script tags if these are left in -------------------- -%>
+<%# -------------------- -------------------- -%>
+<%_ } else { _%>
+<%# -------------------- Is Using TypeScript -------------------- -%>
+<%# -------------------- Remove this line and Uncomment the next to use script tag - Prettier formatting bug removes all script tags if these are left in -------------------- -%>
+<%# -------------------- -------------------- -%>
+<%_ } _%>
+
+<%_ if (rootOptions.cssPreprocessor) { _%>
+<%_ if (rootOptions.cssPreprocessor == 'sass' || rootOptions.cssPreprocessor == 'scss' || rootOptions.cssPreprocessor == 'dart-sass' ) { _%>
+<%# -------------------- IS Using sass, scss OR dart-sass -------------------- -%>
+
+<%_ } else if (rootOptions.cssPreprocessor == 'stylus') { _%>
+<%# -------------------- IS Using stylus -------------------- -%>
+
+<%_ } else if (rootOptions.cssPreprocessor == 'less') { _%>
+<%# -------------------- IS Using Less -------------------- -%>
+
+<%_ } _%>
+<%_ } else { _%>
+<%# -------------------- IS Using standard CSS -------------------- -%>
+
+<%_ } _%>
\ No newline at end of file
diff --git a/generator/templates/simple/src/views/Home.vue b/generator/templates/simple/src/views/Home.vue
new file mode 100644
index 0000000..7dcaa9b
--- /dev/null
+++ b/generator/templates/simple/src/views/Home.vue
@@ -0,0 +1,123 @@
+<%_ if (!options.isNativeOnly) { _%>
+
+