Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Add target ids #754

Open
cboulanger opened this issue Aug 6, 2020 · 0 comments
Open

Add target ids #754

cboulanger opened this issue Aug 6, 2020 · 0 comments
Assignees

Comments

@cboulanger
Copy link
Contributor

At the moment, targets can only be differentiated by "type", i.e. a target is either "source" or "build", which is a shortcut for the underlying implementation class. In order to have specialized targets, one needs to create separate compile-XXX.json files which contain the specializations. This leads to a lot of code duplication, and is not ideal.

This problem can be solved by introducing “target-ids”. Currently the —target= specifies a type, but if it actually specified an ID, the target definition could be:

{ 
  type: “build”, 
  id: “deploy-debug”,
  // …
}

In order to be backwards-compatible, the IDs of “source” and ”build” will be made reserved IDs, in that if you have a id: “source” then it must be a type: “source”- and also the default id is the type. This would allow (eg) qx deploy —target=deploy-debug, but all the previous syntax would still work.

The implementation involves creating a seperate output directory for each target-id. There’s already some code that selects the correct target based on application type etc (ie you can have multiple type: “build” already, one for browser, another for node, etc).

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

No branches or pull requests

2 participants