-
-
Notifications
You must be signed in to change notification settings - Fork 195
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
There are currently 2 package.json files after tns create #2301
Comments
Hey @valentinstoychev ,
That's the current workflow and the reason why we have two package.json's. Of course this can be changed, but we should take care to handle all of the above requirements, so everything will continue working in the same manner :) |
I wouldn't say having two |
@rosen-vladimirov there are two problems:
Ultimately we will have only one package.json which will be application specific. For the time being though in order not to make drastic changes to the way the CLI works we decided with Plamen to keep the two |
Currently most of the content in
|
Semantically there should be only one package.json when you work on the app. What would be the reason to have more than one in this case? |
I think the real source of confusion stems from us duplicating (I consider that a bug) the dependencies, devDependencies, and other settings in both
https://github.com/NativeScript/NativeScript/blob/master/tns-core-modules/file-system/package.json This is a well-known node feature and I don't see a problem with using it in That said the root [1] V8 flags belong to the root |
I personally, and some people who I interacted with (on presentations and support) were very confused by the multiple package.json files. On multiple occasions we edited the incorrect file, and then trying to guess why the build continue to fail. I vote to simplify the project structure. |
@hdeshev If the V8 flags are declared in the root @teobugslayer I am all-in for making things easier, as long as we do not have some magical code in the CLI to cover a missing |
I think @hdeshev summed it quite well in his reply. The current problem I think is this:
This should be the first step that we need to do to fix the customer experience. Also @Plamen5kov suggested we add comments inside the package.json files, which will also a great addition and will help customers know the purpose of each file and key. As we discussed after that we can have a discussion whether we actually need one or two package.json files, but for me this will be a very low priority and not the real problem. Lets focus on the real problem. |
It will require some additional tooling to move those settings to some file in |
@valentinstoychev I totally agree that the two package.json's are confusing. I just wanted to summarize what's their purpose at the moment. {
"name": "my-template",
"comment": "This package.json is used for..." |
Currently, after executing
tns create
, there are twopackage.json
files - one in the root folder and one in theapp
folder. These two files are with almost identical content and it is confusing for the user which one to use.What is the reason for this?
The text was updated successfully, but these errors were encountered: