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

[v14] Create Umbraco/Bellissima Package RCL Template #14975

Conversation

leekelleher
Copy link
Member

Prerequisites

Description

During the Umbraco Community Teams days (2023), the Backoffice Team undertook the task to update the Umbraco Package template to work with the latest v14 preview release.

The updated template would be opinionated and install the following npm packages:

  • @umbraco-cms/backoffice
  • TypeScript
  • Vite

The template would have an example Dashboard and a Property Editor.

Currently, this pull request is only for the RCL version of the template. Going forwards, it is preferable to share the source files between both the RCL and non-RCL versions of the template, (although that is currently beyond my knowledge of how do to that with dotnet new templates - any help appreciated). 🙏

@github-actions
Copy link

github-actions bot commented Oct 14, 2023

Hi there @leekelleher, thank you for this contribution! 👍

While we wait for one of the Core Collaborators team to have a look at your work, we wanted to let you know about that we have a checklist for some of the things we will consider during review:

  • It's clear what problem this is solving, there's a connected issue or a description of what the changes do and how to test them
  • The automated tests all pass (see "Checks" tab on this PR)
  • The level of security for this contribution is the same or improved
  • The level of performance for this contribution is the same or improved
  • Avoids creating breaking changes; note that behavioral changes might also be perceived as breaking
  • If this is a new feature, Umbraco HQ provided guidance on the implementation beforehand
  • 💡 The contribution looks original and the contributor is presumably allowed to share it

Don't worry if you got something wrong. We like to think of a pull request as the start of a conversation, we're happy to provide guidance on improving your contribution.

If you realize that you might want to make some changes then you can do that by adding new commits to the branch you created for this work and pushing new commits. They should then automatically show up as updates to this pull request.

Thanks, from your friendly Umbraco GitHub bot 🤖 🙂


<Target Name="NpmInstall" AfterTargets="Restore;Build" Inputs="package-lock.json" Outputs="node_modules\.package-lock.json">
<Message Text="Installing NPM packages" Importance="High" />
<Exec Command="npm ci --no-fund --no-audit --prefer-offline" />
Copy link
Contributor

Choose a reason for hiding this comment

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

npm ci performs a clean install of all the packages, i.e. it wipes out and recreates ./node_modules/ - that shouldn't be necessary to run for every build. The ASP.NET example templates add some conditional logic to only run when /node_modules/ doesn't exist.

https://docs.npmjs.com/cli/v10/commands/npm-ci#description

Copy link
Contributor

Choose a reason for hiding this comment

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

Hi Jason! Notice the Inputs and Outputs attributes, which will result in incremental builds, so the commands are only executed when the package-lock.json has changed and/or the one in node_modules is different/doesn't exist yet 👍🏻

This also means that if you update your local repo with changes to this file (e.g. if someone or something else - like dependabot - installed/updated a package), the next dotnet restore/build will automatically ensure your local packages are up-to-date. No need to manually run npm ci anymore!

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm wondering if it shouldn't be enough to run npm install which would make the incremental builds even faster. With modern npm, the discrepancies between the lock file and package file are less critical and you won't end up with a completely different version of a sub-sub-dependency anymore, as was the case of older npm, which spawned the need for the ci command in the first place. Also, if someone for some reason forgot to commit the changed lockfile, the ci command actually fails resulting in the entire build failing. This is not the case with npm install. What do you think?

@JasonElkin
Copy link
Contributor

Excited to see this (but mainly leaving a comment so that the Collaborators dashboard doesn't shout at us 😁)

@leekelleher
Copy link
Member Author

Closing this PR, as it has been superseded by PR #17044.

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

Successfully merging this pull request may close these issues.

5 participants