microsoft / vscode-azurestaticwebapps

Azure Static Web Apps extension for VS Code
https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azurestaticwebapps
MIT License
88 stars 35 forks source link

Improve Specificity in Instructions & Documentation. "App location" is ambiguous #614

Open jfoshee opened 2 years ago

jfoshee commented 2 years ago

From the UI:

Enter the location of your application code. For example, '/' represents the root of your app...

What does this mean? What is "root of your app"? Do you mean "root of your source code repository"? Or the root of the directory I currently have open (which might not be the repo root)? Or the path to the app at run-time? On the server file system or in the URL?

From the docs:

The app location is where the project app code lives. For example, if the src folder exists in the app folder, then the value app should be entered.

The docs add more confusion than explanation.

if the src folder exists in the app folder, then the value app should be entered

What? Why would it not be /app/src ? Is /src going to be implicitly added to whatever path I enter?

alexweininger commented 2 years ago

This setting is the location that the Static Web Apps GitHub Action will attempt to build your app. If you're working with a npm or yarn based project with a single package.json, this setting should be set to the directory containing your package.json (typically the root /).

A common case where you might need to set the app location to something other than the root would be a monorepo. Example: assuming your app is at /apps/my-app and /apps/my-app/package.json is the package.json location, then you would enter /apps/my-app.

Hope I was able to provide some clarity. We're working on improving the wording within the extension and on the documentation as we understand it's confusing.