trnktms / Helix.Skeleton

Accelarate Helix based Sitecore project initial setup and project addition included with common needs.
MIT License
12 stars 2 forks source link
accelerator helix initialization sitecore skeleton unicorn

Helix.Skeleton

Purpose of the project

Accelarate Helix based Sitecore project initial setup and project addition included with common needs.

How to use your own template, configuration with your project

Just use the following parameters when you call init.ps1 or add-project.ps1 or add-module.ps1 optionally:

I suggest to download this repository and put it into your own, so your folder structure would look like this for instance:

Change the following files/folders if you want to use your own template or configuration:

Create your own variants of the scripts, e.g.:

So other developers from the team can use the scripts above.

Commands

init.ps1

  1. Run the init.ps1 PowerShell script from the sk-scripts folder, which sets up your solution based on Sitecore 9.1 default.config.json by default. Here is all the settings what you can change:
    {
    "projectName": "MyProject",
    "targetFramework": "v4.7.1",
    "nugetTargetFramework": "net471",
    "aspNet": {
        "lib": "net45",
        "mvcVersion": "5.2.3",
        "webPagesVersion": "3.2.3",
        "razorVersion": "3.2.3"
    },
    "sitecore": {
        "version": "12.0.0",
        "lib": "net471"
    },
    "sitecoreMvc": {
        "version": "3.0.0",
        "lib": "net471"
    },
    "glassMapper": {
        "version": "4.5.0.4",
        "lib": "net45",
        "sitecoreVersion": "111",
        "mvcVersion": "Mvc52"
    },
    "castle": {
        "version": "3.3.3",
        "lib": "net45"
    },
    "rainbow": {
        "version": "2.0.0",
        "lib": "net452"
    },
    "rainbowCodeGeneration": {
        "version": "0.3.0",
        "lib": "net452"
    },
    "microsoftDependencyInjection": {
        "version": "2.1.1",
        "lib": "netstandard2.0"
    },
    "microsoftDependencyInjectionAbstraction": {
        "version": "2.1.1",
        "lib": "netstandard2.0"
    },
    "unicorn": {
        "version": "4.0.3",
        "lib": "net452"
    },
    "configy": {
        "version": "1.0.0",
        "lib": "net45"
    },
    "kamsarWebconsole": {
        "version": "2.0.0",
        "lib": "net40"
    },
    "microCHAP": {
        "version": "1.2.2.2",
        "lib": "net45"
    },
    "[guid]" : {
        "type" : "guid",
        "format": "D"
    },
    "[[subProjectId]]" : {
        "type" : "guid",
        "format" : "D"
    }
    }
  2. Install Sitecore into the sitecore folder - Data, Database, Website
  3. Add the https://sitecore.myget.org/F/sc-platform-9-1/api/v3/index.json to the nuget package sources
  4. Run a build: call the build\build.cmd. It deploys all the web projects at once into the sitecore\Website folder.
  5. Run the unicorn_source_setup.ps1 PowerShell script in the build folder, which sets the sourceFolder for Unicorn in sitecore\Website

add-project.ps1

  1. Run the add-project.ps1 command with 2 required parameters:
    • subProjectName: name of the new project (e.g. Navigation)
    • templateName: name of the subfolder from .\sk-templates\default (feature or foundation)
  2. This command uses the same default.config.json config above
  3. Include the newly generated project to your Visual Studio solution manually

add-module.ps1

  1. Run the add-module.ps1 command with 3 required parameters:
    • moduleName: name of the new module (e.g. TextModule)
    • subProjectName: name of the new project (e.g. Navigation)
    • templateName: name of the subfolder from .\sk-templates\default (feature or foundation)
  2. This command uses the same default.config.json config above
  3. Include the newly generated files to your Visual Studio project manually

For more documentation about the generator, checkout the base project: https://github.com/trnktms/sk-base

Important: your JSON configuration should be in sync with your template!

Unicorn sync

  1. Log in the sitecore as admin
  2. Open the unicorn page : {yourdomain/unicorn.aspx}
  3. Syncronise all the projects

Note: Some idea and code implementation based Neil Shack's Helixbase project - https://github.com/muso31/Helixbase