-
-
Notifications
You must be signed in to change notification settings - Fork 197
tns-android/ios are installed as dev dependencies #2532
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -126,6 +126,14 @@ export class NodeModulesBuilder implements INodeModulesBuilder { | |
let dependenciesBuilder = this.$injector.resolve(NodeModulesDependenciesBuilder, {}); | ||
let productionDependencies = dependenciesBuilder.getProductionDependencies(this.$projectData.projectDir); | ||
|
||
let prodDependenciesArr = []; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The const prodDependenciesArr = _.map(productionDependencies, prodDep => prodDep.name); |
||
for (let i in productionDependencies) { | ||
prodDependenciesArr.push(productionDependencies[i].name); | ||
} | ||
|
||
let prodDependenciesFilePath = path.join(this.$projectData.projectDir, "platforms", "android", "productionDependencies.json"); | ||
this.$fs.writeJson(prodDependenciesFilePath, prodDependenciesArr); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what's the purpose of this file? Why should we write it to platforms dir? Can you add comment in the code, please. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll add comments to the code, but the basic idea is, we need to tell gradle what are the production dependencies, that CLI found, so we search for dependencies only in production modules, it saves time, and it's less error prone. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why gradle needs to know which are the production dependencies? As far as I remember, CLI copies only production dependencies to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because gradle needs to go through the |
||
|
||
if (!this.$options.bundle) { | ||
const tnsModulesCopy = this.$injector.resolve(TnsModulesCopy, { | ||
outputRoot: absoluteOutputPath | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add
--save-exact
tonpmOptions
, as currently we are adding the framework package with^
, for example:This means that once we have
tns-android
2.6.0, and I executerm -rf node_modules && npm i
I'll get the new framework.