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

Configuration Templates and Variables (nw.js, pixi.js versions) #305

Closed
QuickBanjo opened this issue Nov 7, 2021 · 3 comments
Closed

Configuration Templates and Variables (nw.js, pixi.js versions) #305

QuickBanjo opened this issue Nov 7, 2021 · 3 comments
Assignees
Labels
type:enhancement An improvement to an existing functionality type:workflow This issue is about working with ct.js more efficiently as a user
Milestone

Comments

@QuickBanjo
Copy link
Contributor

An issue I noticed while doing the work behind #303 and #304: we don't always have a unified way of specifying certain values that are common throughout the whole project.

In my case, I found the NW.js version was specified in gulpfile.js, but I needed to use it in launch.json. I ended up just manually updating the latter to match the former, since neither of these files appear to have any way of pulling the desired value from, e.g. another file. I think the closest launch.json has is command input variables, which only solves the problem if we can write a script to do the job, and that's hard to do in a cross-platform manner.

Do any of our existing tools have a preprocessor or something that can handle this kind of nonsense at some stage in the development cycle? It'd be nice if, the same way we use the ${workspaceFolder} macro, we could just pull any variable we want from wherever.

@CosmoMyzrailGorynych
Copy link
Collaborator

devSetup.gulpfile.js is the closest thing that comes to mind. It is intended to be executed after every checkout.

@QuickBanjo
Copy link
Contributor Author

The main issue I'd see with using gulp in this case is that we're actually updating gulpfile.js, and it's actually that file that we'd probably want to put it, so anyone who updates the version somewhere sees it everywhere else. But I guess we could work around that by making the gulpfile the canonical version, then having the script copy it to launch.json. The issue then becomes that we may not want the gulpfile to become an aggregation of these kind of configuration options.

Maybe it would be worthwhile doing it properly if we see more of this in the future, but it's probably not worth it just for the original use case I was asking about.

@CosmoMyzrailGorynych CosmoMyzrailGorynych added type:enhancement An improvement to an existing functionality type:workflow This issue is about working with ct.js more efficiently as a user labels Dec 12, 2021
@CosmoMyzrailGorynych
Copy link
Collaborator

The issue then becomes that we may not want the gulpfile to become an aggregation of these kind of configuration options.

The nw.js version may be written in a separate JSON file, which can later be required by anything. And launch.json has to be updated by gulp or some kind of automation.

@CosmoMyzrailGorynych CosmoMyzrailGorynych added this to the v2.0 milestone Dec 12, 2021
@CosmoMyzrailGorynych CosmoMyzrailGorynych changed the title Configuration Templates and Variables Configuration Templates and Variables (nw.js, pixi.js versions) Dec 22, 2021
@CosmoMyzrailGorynych CosmoMyzrailGorynych self-assigned this Jan 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement An improvement to an existing functionality type:workflow This issue is about working with ct.js more efficiently as a user
Projects
Archived in project
Status: Done
Development

No branches or pull requests

2 participants