Giter Club home page Giter Club logo

package.templates's Introduction

Umbraco Package Templates

This repository contains some templates for starting new Umbraco package projects, and adding things to existing Umbraco projects.

The templates can be used via the dotnet new command.

UI Examples

One of the templates being developed adds a 'UI Examples' section to your Umbraco website. UI Examples has also been released as a package on Our, so you can add this to your site by installing that package from there. The source code for UI Examples is in the Item Template, and has its own contribution guidelines.

Pre-requisite

You must be using Visual Studio 2019 to work with these templates.

Installation

You can install all the templates from a NuGet package:

dotnet new -i Umbraco.Tools.Packages.Templates

Updating

To check for any updates you can run the dotnet new --update-check command.

The dotnet new --update-apply command will update any of the installed template packages you have installed.

Usage

All Umbraco package templates are prefixed umbraco-. To see what Umbraco related templates you have installed:

dotnet new umbraco -l

You can get a list of all available templates in the docs

Example: To start a new package project

Supply the name of the project on the command line, this will setup the namespaces and folders within the project:

dotnet new umbraco-v8-package -n MySuperNewPackage

Contributing

Contributions are welcome! Please read our Contribution Guidelines for the steps to add new templates.

Developing your own templates

If you want to develop/extend these templates for your own use you should install them individually from your source folder. For example:

dotnet new -i c:\source\Package.Templates\ItemTemplates\Dashboard

package.templates's People

Contributors

callumbwhyte avatar dependabot[bot] avatar jmayntzhusen avatar kevinjump avatar lottepitcher avatar nikrimington avatar rockerby avatar ronaldbarendse avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

package.templates's Issues

Feature: Choose an Umbraco version at startup

Add a command line parameter to select the Umbraco version.

by default the package/site should use a defined version but if you want you should be able to override it with a parameter.

e.g.
-umbVersion 8.7.0

Will need to put in a placeholder in the .csproj files, and add something to the template.config to do the search/replace.

Update template names so they make sense in Visual Studio (preview)

We also need to review the names, descriptions, author, etc... used in actual templates too. One for the next package team meeting @jmayntzhusen?

This is how the project templates look in VS 2019 (prelease edition):

image

To see these you have to check:

image

These templates only appear if the templates are installed from nuget. If you install the templates from local source folder then they don't show up in VS Create New Project

Originally posted by @LottePitcher in #21 (comment)

Keep Item and Project template in sync.

We need a mechanism in the repo to keep the code in the item template folders in sync with that in the project template ones (e.g dashboards).

Something like a build event, or gulp script to copy the files between the two areas should be enough.

First build of website fails with missing csc.exe

When you create a package, and then open the visual studio solution and build the first request in a browser comes back with a YSOD

Could not find a part of the path 'C:\code\MyAwesomePackage\.website\bin\roslyn\csc.exe'.

If you clean and the then rebuild the solution in visual studio it then works.

there must be something in the solution or project file that is causing the first build not to work.

Push the output to nuget

If we push the output of this repo to nuget then it will make allowing people to use the templates much easier.

Contribution guidelines

Before asking people to contribute new templates we need guidelines on the process. I kept notes whilst working on #11 so have made a start. When that PR is finished I'll get these guidelines added.

Update contributing docs to item templates

Make the contribution template a bit more focused on making item templates.

we will build up a library of item templates, but not all of them will be copied over to the main "package" template as we don't want to overload it with switches -

but a library of item templates will still be useful.

Add demo site to repository

When creating a package using the templates, the demo site is ignored via .gitignore.

What do you think would be the right approach in order to include the demo site?

Should I just include all the files, some of the files, or maybe just a zip including the sqlce db?

"Build Project" build step throws an error

When running the GitHub actions, on the "Build Project" I get the following error:

Error: C:\Program Files\dotnet\sdk\3.1.402\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(241,5): error NETSDK1004: Assets file 'D:\a\DuugTest_Richard\DuugTest_Richard\src\DuugTest_Richard\obj\project.assets.json' not found. Run a NuGet package restore to generate this file. [D:\a\DuugTest_Richard\DuugTest_Richard\src\DuugTest_Richard\DuugTest_Richard.csproj]

I found by adding a /t:Restore to the build line it solved the issue:

run: msbuild ./src -p:Configuration=${{ env.CONFIG }} /t:Restore

UI Examples

This is a list of UI elements in the backoffice we'd like to cover in the UI Examples item template. Additionally we should have some contrib guidelines written up on how to contribute to this project!

  • Section/dashboard to get us started
  • List of icons - Lotte
    • Umb icon directive
    • Search for icons
    • Adding custom icons
  • Buttons - Richard
    • Overlays (popup notifications, confirm)
    • Button states
    • Pop-outs (slide out from the right - infinite editor)
    • Showing notifications
    • Dialogs - media picker, content picker, etc.
  • Tabs - David
  • Umb-box
    • Collapse - Jesper
    • Buttons on right
    • Header
    • Content
  • Layout - Kevin
    • Flex
    • Margin
    • Loading.
  • Editor panels
    • Header
    • Content
    • Footer
      • Footer left/right/center
  • Inputs (text boxes / selects etc)
    • Textbox
    • Area
    • Richtext
    • Checkbox
    • Toggle
    • DatePicker
  • Tables/Lists/Pagination (dave)
  • Localization
  • Alerts

Advanced:

  • Save and publish buttons
  • Header menu item
  • File download/upload
  • SignalR (needs code)
  • Tour of the section

Wrong path in package.xml

If you install the Package project you get a package.xml file in the root of the solution that includes a file and folder that points to the dll and the app plugins folder of the package. Automatically replaces the name, and is a very nice touch!

https://github.com/umbraco/Package.Templates/blob/master/ProjectTemplates/UmbracoPackage.1/package.xml

Problem I've found though is that the dll is not exisiting when I build, it is found in the .website folder instead, so fx last time I had to edit from:

  <files>
    <folder path="src/Package.Workshop/App_Plugins/Package.Workshop" orgPath="App_Plugins/Package.Workshop" />
    <file path=".src/Package.Workshop/bin/release/Package.Workshop.dll" orgPath="bin/Package.Workshop.dll" />
  </files>

To:

  <files>
    <folder path=".website/App_Plugins/Package.Workshop" orgPath="App_Plugins/Package.Workshop" />
    <file path=".website/bin/Package.Workshop.dll" orgPath="bin/Package.Workshop.dll" />
  </files>

Are we expecting the dll to exist in the core project? Guess I may have needed to build as release instead of debug for that?

Maybe it's easier to change it to the website folder instead as we'd expect the testsite to have the correct files and be tested before packing it up, right?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.