Giter VIP home page Giter VIP logo

Comments (6)

alexweininger avatar alexweininger commented on May 18, 2024 5

I really like this feature. I'm exploring adding local debugging for SWAs into the VS Code extension and this would make the configuration much easier on users.

I think users would be much more comfortable editing a swa-cli.config.json versus launch/tasks.json files.

from static-web-apps-cli.

itpropro avatar itpropro commented on May 18, 2024 4
  • swa property in package.json could lead to problems with monorepos
  • swa.json not really clear that it's a config file
  • swa.config.json, .swarc both fine for me

I would prefer .swarc, as I think the most important thing about the naming would be to avoid confusion with the staticwebapp.config.json file for the user.

from static-web-apps-cli.

anthonychu avatar anthonychu commented on May 18, 2024 3

For naming, thinking something like swa-cli.config.json so it's clear that it's for the CLI.

For contents, I think we can start with a single prop named configurations (not sure what else to name them, maybe environments? contexts?).

{
  "configurations": {
    "app1": {
      "context": "./static",
      "api": "./api"
    },
    "app2": {
      "context": "http://localhost:3000",
      "app-startup-command": "cd frontend && npm start", // proposed in #147
      "api": "./api"
    }
  }
}

If there's a single configuration, swa start can just use it.

If there's more than one, use swa start app1. If there's a folder of the same name, the CLI will prefer the config file.

If swa start is run without a context, perhaps use interactive prompts to create the file. (this is lower priority and can be a separate issue)

from static-web-apps-cli.

k-miyake avatar k-miyake commented on May 18, 2024

I assume that staticwebapp.config.json is already enabled as mentioned in this docs. Does this issue mean that the file name may be changed in the future?

I think staticwebapp.config.json is too long and I like swa.config.json.

from static-web-apps-cli.

manekinekko avatar manekinekko commented on May 18, 2024

@k-miyake sorry about the confusion:

  • staticwebapp.config.json is the config file for your project deployed on SWA
  • swa.config.json (name to be defined) would be the config file for the CLI.

Do you have other suggestions for the CLI config file?

from static-web-apps-cli.

k-miyake avatar k-miyake commented on May 18, 2024

@manekinekko I was mistaken, sorry.
In this issue, discussing a different file than staticwebapp.config.json.

It is preferable to use a file name that indicates it is for development.
For example, swa.development.json or local.development.json.

from static-web-apps-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.