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

Smaller footprint #25

Open
wants to merge 2 commits into
base: typescript-axios
Choose a base branch
from
Open

Smaller footprint #25

wants to merge 2 commits into from

Conversation

nathanforce
Copy link

Makes some rather large changes to our output templates in an effort to reduce the overall footprint of the generated javascript.

  • Introduces a new variable hasInputParams which checks if there are any body, form, query, or path params.
  • Adds a new template file, client.mustache which creates a corresponding client.ts. This is used to generate a singleton that handles all fetching logic.
  • Modifieds api.mustache such that the apis generated in /resources import and use the client generated in client.ts rather than repeating the same structure across all request functions.

Related PR https://github.com/headway/headway/pull/7171

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.

2 participants