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

Factor out the config file compile step #4867

Merged
merged 3 commits into from
Feb 17, 2021
Merged

Conversation

timleslie
Copy link
Contributor

This will allow us to conditionally generate/build the Admin UI, without losing our compiled config file.

@vercel
Copy link

vercel bot commented Feb 17, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/keystonejs/keystone-next-docs/52g5yc88z
✅ Preview: https://keystone-next-docs-git-factor-out-config-build.keystonejs.vercel.app

@changeset-bot
Copy link

changeset-bot bot commented Feb 17, 2021

🦋 Changeset detected

Latest commit: 0d666f6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 12 packages
Name Type
@keystone-next/admin-ui Major
@keystone-next/keystone Patch
@keystone-next/example-auth Patch
@keystone-next/app-basic Patch
@keystone-next/example-ecommerce Patch
@keystone-next/example-roles Patch
@keystone-next/example-todo Patch
@keystone-next/auth Major
@keystone-next/cloudinary Patch
@keystone-next/fields-document Patch
@keystone-next/fields Patch
@keystonejs/test-utils Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel vercel bot temporarily deployed to Preview February 17, 2021 04:17 Inactive
@timleslie timleslie force-pushed the factor-out-config-build branch from 0e2e08d to 25c0ac8 Compare February 17, 2021 04:28
@vercel vercel bot temporarily deployed to Preview February 17, 2021 04:28 Inactive
@timleslie timleslie force-pushed the factor-out-config-build branch from 25c0ac8 to 303af16 Compare February 17, 2021 04:35
@timleslie timleslie changed the title [WIP] Factor out the config file compile step Factor out the config file compile step Feb 17, 2021
@vercel vercel bot temporarily deployed to Preview February 17, 2021 04:35 Inactive
@timleslie timleslie requested a review from emmatown February 17, 2021 04:35
export const formatSource = (src: string, parser: 'babel' | 'babel-ts' = 'babel') =>
prettier.format(src, { parser, trailingComma: 'es5', singleQuote: true });

const generateKeystoneConfig = async (projectAdminPath: string) => {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
const generateKeystoneConfig = async (projectAdminPath: string) => {
const generateKeystoneConfigReexport = async (projectAdminPath: string) => {

v much a nit, I just want it to be clear to readers that it's not generating a keystone config, it's re-exporting the user's config

@vercel vercel bot temporarily deployed to Preview February 17, 2021 04:42 Inactive
@timleslie timleslie requested a review from emmatown February 17, 2021 04:43
@vercel vercel bot temporarily deployed to Preview February 17, 2021 04:47 Inactive
@timleslie timleslie merged commit 370c0ee into master Feb 17, 2021
@timleslie timleslie deleted the factor-out-config-build branch February 17, 2021 04:51
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