Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Do something about src/config.json #12771

Closed
3 tasks done
ficristo opened this issue Sep 10, 2016 · 6 comments
Closed
3 tasks done

Do something about src/config.json #12771

ficristo opened this issue Sep 10, 2016 · 6 comments

Comments

@ficristo
Copy link
Collaborator

Prerequisites

  • Can you reproduce the problem with Debug \ Reload Without Extensions?
  • Did you perform a cursory search to see if your bug or enhancement is already reported?
  • Did you read the Troubleshooting guide?

For more information on how to write a good bug report read here
For more information on how to contribute read here

Description

Now that npm install is part of the build we should do something about config.json:
it is regenerated everytime which is ok, but it needs different values if we are in dev or in production.
We should find a better way to manage the differences.

Steps to Reproduce

  1. Run npm install

Expected behavior:
Running git status config.json should not appear in the modified files.

Actual behavior:
Running git status config.json appears in the modified files.

Versions

Windows 10
master

@zaggino
Copy link
Contributor

zaggino commented Sep 10, 2016

In brackets-electron I made src/config.json to be ignored by git, since it's recreated after every npm install

@ficristo
Copy link
Collaborator Author

AFAIK the only thing to manage is healthDataServerURL which points to https://healthdev.brackets.io/healthDataLog in dev and points to https://health.brackets.io/healthDataLog in production.
After we find a way for that we can put src/config.json in .gitignore.

@petetnt
Copy link
Collaborator

petetnt commented Sep 11, 2016

Can we use environment variables? Something like healthDataServerURL = (BRACKETS_ENV === "development" ? "https://healthdev.brackets.io/healthDataLog" : "https://health.brackets.io/healthDataLog")?

@marcelgerber
Copy link
Contributor

We probably don't even need that.
package.json is used in dev and src/config.json in production, so we could just integrate this difference into the code that copies the values around.

@nethip
Copy link
Contributor

nethip commented Dec 9, 2016

Let me have a look at this issue. I am also thinking in line with @marcelgerber

@marcelgerber
Copy link
Contributor

Mostly fixed with #12778.
Created #13458 to fix another small inconsistency I am experiencing, see the PR description for more information.

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

5 participants