Add API-only CLI option#903
Conversation
|
I do like the no_npm option. However, I don't see the point of an api_only option. This has been discussed multiple times. The reason that Rails added an api only option was because they only have one middleware stack. So an api still has to run through all the same handlers as a web app which pointlessly slows stuff down. With amber just create an Rails and Amber have different paradigms when it comes to middleware. |
|
Sounds reasonable. |
|
@sdzyba I believe the new |
|
@sdzyba I agree with @drujensen, please review that PR instead #865 your review would be valuable |
|
This should be closed in favor of #865 |
|
Got it. |
Description of the Change
Now it is possible to tell
amber watchto not to run npm process usingapi_onlyoption.api_onlyis a term borrowed from Rails' configuration. It might be reused in future for other API-specific functionality.Related Amber recipe: amberframework/recipes#33
Alternate Designs
Something like
no_npmoption in.amber.ymlmight be used as well, although I findapi_onlymore common and extendible in the future.Also
--no-npmargument foramber watchcould be used but I find it unintuitive to use and this way we have some cli options in.amber.ymland some as arguments and this is inconsistent.Benefits
User is able to run
amber watchwithout npm dependency.Possible Drawbacks
+1 another cli option to maintain.