Skip to content
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

Create Project : Support conditional placeholder / region placeholders #392

Open
fvet opened this issue Jun 23, 2022 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@fvet
Copy link
Contributor

fvet commented Jun 23, 2022

Is your feature request related to a problem? Please describe.

Our template contains following boiler plate (app.json)

...
"internalsVisibleTo": [
    {
      "id": "[TEST_APP_ID]",
      "name": "Dynavision [APP_NAME]-Test",
      "publisher": "Dynavision"
    },
    {
      "id": "aea2fd90-9908-4f65-ae7d-03c393401854",
      "name": "Dynavision-Test",
      "publisher": "Dynavision"
    }
...

We are looking for a way (not by cloning the AL project in a 'Simple App Project' and 'Complex App+Test' template) to add a conditional parameter (true/false, e.g. 'Include Test App') to the 'NAB: Create AL Project' so we can remove code based on a condition (similar to #pragma directives, but really remove the code)

Describe the solution you'd like
If we would be able to add a region start / end marker in files

#region [placeholdername]
#endregion [placeholdername]

[#region [placeholdername]]
[#endregion [placeholdername]]

[#NABALTOOLS START [placeholdername]]
[#NABALTOOLS END [placeholdername]]

The NAB AL Create Project could test if the [placeholdername] is true or false.

  • If true, markers can be deleted
  • If false, markers AND everything between the markers can be deleted.

Describe alternatives you've considered

Manually cleaning up all references to test for (proxy / listing) apps that don't really require a test app.

PS: Still looking on how I could use this 'Include Test' app parameter to then remove redundant files as well in a later stage.

@fvet fvet added the enhancement New feature or request label Jun 23, 2022
@jwikman
Copy link
Owner

jwikman commented Jun 23, 2022

Hi @fvet,

That's an interesting idea.
When are you going to start programming TypeScript and help us out with these kind of suggestions? 😜

I need to think about how to solve this in a good way.

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

No branches or pull requests

2 participants