You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently when a project is created the content of the template is placed inside the app directory of the newly created project.
This leads to some issues when you want to support more complex scenarios, for example it is difficult to add configuration file (like nsconfig.json or webpack.config.js) in the root of the project.
The suggested solution to allow templates to be the full application is to check the template from which the application is created. In case the template contains the following information:
Read the templateVersion property (if it is not set or there's no nativescript key, the default value is v1) and execute the following action based on its value:
In case it is v1, use the old way, i.e. place the content of the template in the app directory of the created project.
In case it is v2 place the content of the template at the root of the application.
In case it is anything else - throw an error.
In case it is missing, use v1 as default.
The solution ensures backwards compatiblity with existing templates and allows creating new types of templates.
The text was updated successfully, but these errors were encountered:
NOTE: For 4.1.0 we'll release this feature as a BETA - there are still some issues with this approach, for example in case you want the template to has a configuration file required by nativescript-plugin-firebase, the new approach still has some issues with it.
Currently when a project is created the content of the template is placed inside the
app
directory of the newly created project.This leads to some issues when you want to support more complex scenarios, for example it is difficult to add configuration file (like
nsconfig.json
orwebpack.config.js
) in the root of the project.The suggested solution to allow templates to be the full application is to check the template from which the application is created. In case the template contains the following information:
Read the templateVersion property (if it is not set or there's no nativescript key, the default value is
v1
) and execute the following action based on its value:The solution ensures backwards compatiblity with existing templates and allows creating new types of templates.
The text was updated successfully, but these errors were encountered: