Skip to content

Add new environment variables #29

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

Merged
merged 1 commit into from
Sep 19, 2017
Merged

Conversation

dunglas
Copy link
Member

@dunglas dunglas commented Sep 19, 2017

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets n/a
License MIT
Doc PR todo

Add support for two new environment variables to configure the API entrypoint and the output directory: API_PLATFORM_CLIENT_GENERATOR_ENTRYPOINT and API_PLATFORM_CLIENT_GENERATOR_OUTPUT.

This is necessary for the new API Platform distribution I'm working on.

@dunglas dunglas requested review from soyuka and mysiar September 19, 2017 09:15
src/index.js Outdated
program.help();
}

const generator = generators(program.generator)(program.hydraPrefix)
const entrypoint = program.args[0] ? program.args[0] : process.env.API_PLATFORM_CLIENT_GENERATOR_ENTRYPOINT;
const outputDirectory = program.args[1] ? program.args[1] : process.env.API_PLATFORM_CLIENT_GENERATOR_OUTPUT;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not const entrypoint = program.args[0] || process.env.API_PLATFORM_CLIENT_GENERATOR_ENTRYPOINT?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indeed

Copy link
Member

@soyuka soyuka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor comment, rest is 👍

@soyuka soyuka merged commit 24aa819 into api-platform:master Sep 19, 2017
@dunglas dunglas deleted the env-vars branch September 19, 2017 12:38
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