-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
[v14] Create Umbraco/Bellissima Package RCL Template #14975
Conversation
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:
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" /> |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
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?
Excited to see this (but mainly leaving a comment so that the Collaborators dashboard doesn't shout at us 😁) |
Closing this PR, as it has been superseded by PR #17044. |
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
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). 🙏