Closed callmeaponte closed 3 years ago
Yes. The recommended way to use surge is to avoid using the prompts. Many ways to accomplish this.
The surge command can take two arguments. surge <project-path> <domain>
.
So you can run...
surge . example.com
Or you can pass in params...
surge --project . --domain example.com
Or shorthand params...
surge -p . --d example.com
Of course if you need to point to another directory you can...
surge ./path/to/dist example.com
Also, its common practice to put this as a script in you package.json file then you can just run...
npm run deploy
Thanks! Good to know.
This is amazing software btw, the simplicity and ease-of-use is a beautiful thing.
I apologize if this has already been answered or solved, but I tried searching for it (for quite a while) and could not find anything.
Is there a way to "remember" the project that the CLI always prompts you for when you run
surge
? Similar to how you can create aCNAME
file for the CLI to remember the domain.I'm asking as I'm attempting to automate the deployment, but that prompt is making it difficult since I need to always press enter (even though the default value never changes).