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

Clarify the instructions for using the .env file #8189

Merged
merged 2 commits into from Aug 26, 2021
Merged

Clarify the instructions for using the .env file #8189

merged 2 commits into from Aug 26, 2021

Conversation

mathewhodson
Copy link
Contributor

This fixes #7950.

The previous text didn't give clear guidance if you were using Windows.

@mathewhodson mathewhodson requested a review from a team as a code owner August 22, 2021 01:33
@mathewhodson mathewhodson requested review from a team, Rumyra and schalkneethling and removed request for a team August 22, 2021 01:33
@hamishwillee
Copy link
Collaborator

FWIW I like this more in some ways and less in others. This won't work on the Windows command prompt for example.

To me the important bit is actually the file. How you get there is a detail. So how about something like?


  1. Next, you'll want to start the local preview service, so you can see the changes you'll make as they would look in production:

    # Switch to a separate terminal.
    cd ~/repos/mdn/content
    yarn
    yarn start

    After running the commands above, you can view your local version of the site in any browser at the URL: http://localhost:5000.

  2. When browsing a page locally you can press the Open in your editor button to start editing the current page.

    To specify VS Code as your preferred editor create a file named .env in the root of your local content directory that contains the following line:

    EDITOR=code
    • You can create this file from the bash or Windows Powershell terminal using the command echo 'EDITOR=code' >> .env.
    • EDITOR is an environment variable. You can set it to any editor you like using the normal mechanism for your operating system/terminal (i.e. you don't have to use the .env file or VS Code).

README.md Outdated Show resolved Hide resolved
Put less focus on the specific command to create the .env file, since it
won't work in every environment.
Copy link
Collaborator

@hamishwillee hamishwillee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks very much!

@hamishwillee hamishwillee merged commit d891a65 into mdn:main Aug 26, 2021
@mathewhodson mathewhodson deleted the patch-4 branch August 26, 2021 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Content bug: <Missing guide for .env setup for windows>
2 participants