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

Add support for generating a d2l.dev app #90

Merged

Conversation

jorge-ramirez-arredondo
Copy link
Contributor

No description provided.

@jorge-ramirez-arredondo jorge-ramirez-arredondo requested a review from a team as a code owner June 3, 2024 21:46
@jorge-ramirez-arredondo jorge-ramirez-arredondo force-pushed the jorge-ramirez-arredondo/add-d2ldev-template branch from fc55065 to 6d7b4d9 Compare June 3, 2024 21:50
src/create.js Outdated Show resolved Hide resolved
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-session-token: ${{ secrets.AWS_SESSION_TOKEN }}
role-to-assume: "arn:aws:iam::022062736489:role/r+<%= githubOrg %>+<%= repoName %>+repo"
Copy link
Member

Choose a reason for hiding this comment

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

Not sure where best to put this -- maybe in the generated readme or the script output? -- but there should probably be some indication that they'll need to configure this in repo-settings.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I went back and forth on where it was better to indicate this, but I just put it in the script output for now. Let me know if you'd like me to add something to the README as well.

src/generators/d2ldev/templates/src/index.js Outdated Show resolved Hide resolved
<script src="./index.js" type="module"></script>
<title><%= hyphenatedName %></title>
</head>
<body class="d2l-typography">
Copy link
Member

Choose a reason for hiding this comment

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

Would it be worthwhile plugging the router in here and showing how to properly set up a few "pages?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you mind if I do that in a follow-up PR? I'm not sure how much time I'll have to work on this right now, so I don't want to get too fancy right off the bat. I also didn't include linting, tests, or PR previews for this reason.

Copy link
Member

Choose a reason for hiding this comment

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

Yep totally.

src/generators/d2ldev/templates/rollup.config.js Outdated Show resolved Hide resolved
role-duration-seconds: 3600
aws-region: ca-central-1

- name: Publish
Copy link
Member

Choose a reason for hiding this comment

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

Other than the publish step, the "d2l.dev" project is very similar to what I'd imagine a generic "application" to be that doesn't publish to d2l.dev... like the Daylight Site for example. Just wondering if it's worth it to make this so "d2l.dev" specific, or if making it more generic would make it useful for a wider audience?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess we could ask the user if it's for a d2l.dev site and change things dynamically? What would you envision for the generic site? Just leave the d2l.dev specific things blank (role-to-assume, aws-region, bucket-path)? Or remove the steps altogether?

I'm not sure what is the norm for a generic site, would we still assume that they use BrightspaceUI/actions/publish-to-s3?

Copy link
Member

Choose a reason for hiding this comment

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

I'd probably leave the publish step out altogether since it's difficult to guess what they'd want. Or we could ask something like "Would you like to publish your application to S3?" (yes/no) and then ask for the bucket?

At some point though there's diminishing returns on the complexity it all adds to the generator since there's already good documentation for S3 publishing and no matter what they'll need to set things up in repo-settings.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, based on your suggestion, I changed the generator (and the template files) to be more generic. It should now change the publish.yml and the readme a little based on what the publishing target is.

@jorge-ramirez-arredondo jorge-ramirez-arredondo force-pushed the jorge-ramirez-arredondo/add-d2ldev-template branch from 127f9bd to d1c41c5 Compare June 4, 2024 20:54
Copy link
Member

@dlockhart dlockhart left a comment

Choose a reason for hiding this comment

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

Awesome, thanks for adding this!

@dlockhart
Copy link
Member

(make sure you square merge with feat: blah blah to trigger a release)

@jorge-ramirez-arredondo jorge-ramirez-arredondo merged commit 8d6f5f2 into main Jun 5, 2024
1 check passed
@jorge-ramirez-arredondo jorge-ramirez-arredondo deleted the jorge-ramirez-arredondo/add-d2ldev-template branch June 5, 2024 14:16
Copy link

🎉 This PR is included in version 3.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants