Skip to content

CLI 2.5.0 Breaks Template Versioning #2493

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
NickIliev opened this issue Feb 6, 2017 · 5 comments
Closed

CLI 2.5.0 Breaks Template Versioning #2493

NickIliev opened this issue Feb 6, 2017 · 5 comments
Labels

Comments

@NickIliev
Copy link
Contributor

NickIliev commented Feb 6, 2017

From @nraboy on February 5, 2017 14:56

Please, provide the details below:

With CLI version 2.4.1 I was able to execute a command like the following to get a specific version of a NativeScript template:

tns create MyProject --template [email protected]

This allowed me to have a very predictable template formatted to my preference. However, after updating to CLI 2.5.0, providing a version appears to be broken. For example, the same command above will create a project that is missing the App_Resources directory which results in build errors. However, the following works as long as I don't mind the latest template:

tns create MyProject --template angular

To be clear, I don't want the latest template, I want a specific version.

Did you verify this is a real problem by searching Stack Overflow and the other open issues in this repo?

No I haven't. I verified this as a real problem by experiencing the results. It is also starting to be mentioned by participants taking my NativeScript course.

Tell us about the problem

Which platform(s) does your issue occur on?

Both

Please provide the following version numbers that your issue occurs with:

The CLI version 2.4.1 was working and 2.5.0 is not.

Please tell us how to recreate the issue in as much detail as possible.

Using the CLI, execute the following:

tns create MyProject --template [email protected]

The above will succeed, but be missing an app/App_Resources directory, essential when it comes to building.

Using the CLI, execute the following:

tns create MyProject --template angular

The above will succeed and include the app/App_Resources directory. I need a specific template version, not latest.

Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.

No code, this is all CLI generation.

Copied from original issue: NativeScript/NativeScript#3580

@nraboy
Copy link

nraboy commented Feb 6, 2017

Let me know if you need anything further.

Thanks,

@Plamen5kov
Copy link
Contributor

Hi @nraboy,
Since version 2.5 each templates has the App_Rerources folder inside them. Up to that point only the default template (tns-template-hello-world) had the App_Resources folder. This is an expected behavior, what you can do is take the App_Resources folder from any other template prior 2.5 and paste it in the <project_name>/app folder where missing, or use an older version of cli (<=2.4.x), which takes care of filling in the missing App_Resources folder.

@nraboy
Copy link

nraboy commented Feb 8, 2017

So I have a few issues with this:

  1. If this feature was removed, why was it not properly deprecated?
  2. Why is there no proper project versioning?

Including @tjvantoll since he was involved the first time I reported something like this. I personally don't think either of the proposed solutions are good solutions.

@tjvantoll
Copy link
Contributor

This has come up a few times now, so I went ahead and requested that we revert this change: #2513.

@Plamen5kov
Copy link
Contributor

Closing in favor of: #2513

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants