1.0.10 • Published 7 years ago

@sysdoc/sysdoc-webstarter-repo v1.0.10

Weekly downloads
1
License
ISC
Repository
github
Last release
7 years ago

Sysdoc-Webstarter-Repo

This repo contains the folder/application structure that should be followed in all our applications. Technologies used:

Deployment

  • Run gulp config to create local config file
  • Change config file to be the site collection you want
  • Run gulp build (make sure config is set to correct site). This will build the js and css files. Change 'dev' to 'prd' for the 'env' in the project config and the files will be minified
  • Run gulp build-deployment-package. Additional args: --s (this scaffolds list services based on the SiteDefinition.json lists). This build the deploy.ps1 to provision your site.
  • Make sure you have the lastest Client Components (https://www.microsoft.com/en-gb/download/details.aspx?id=35585) and PnP PowerShell release (https://github.com/SharePoint/PnP-PowerShell/releases)
  • Run deploy.ps1 (Provisions the whole site including settings, features, files, directories, term groups, site columns, content types, lists)
  • If powershell doesnt have the PnP cmdlets then add a profile (C:\Users\YOUR USER\Documents\WindowsPowerShell\profile.ps1) with the line: $env:psmodulepath = $env:psmodulepath + ";C:\Users\YOUR USER\AppData\Local\Apps\SharePointPnPPowerShell2013" as its stuffed up the env variables
  • Map the SiteAssets and Masterpage gallery to drives indicated in your config (run gulp open-config to edit your projects config)
  • Run gulp watch to be able to update code on demand.

Code Conventions

Please refer to Sysdoc Code Convention.md in this repo for more info. Developers are expected to adhere to these standards.

Site Definition Example

{
	"id": "NewProject",
	"templatesId": "NewProjectTemplates",
	"baseSiteTemplate": "BLANKINTERNET#0",
	"url": "NewProject-test",
	"defaultPagesContentType": "New Project Page",
	"webSettings": {
		"welcomePage": "Pages/Home.aspx",
		"title": "New Project",
		"customMasterPageUrl": "{masterpagecatalog}/NewProject.master"
	},
	"navigation": {
		"global": {
			"navType": "Managed",
			"termSetId": "85F97200-0997-444D-8592-EB78506FD8A4"
		}
	},
	"security": {
		"admins": ["clark.tozer@sysdocgroup.com"],
		"owners": ["clark.tozer@sysdocgroup.com"],
		"visitors": ["clark.tozer@sysdocgroup.com"],
		"members": ["clark.tozer@sysdocgroup.com"],
		"groups": [{
			"title": "Admins",
			"description": "",
			"owner": "clark.tozer@sysdocgroup.com",
			"members": ["jon.hay@sysdocgroup.com"]
		}]
	},
	"features": {
		"web": [{
				"id": "94c94ca6-b32f-4da9-a9e3-1f3d343d7ecb",
				"enable": true
			},
			{
				"id": "00bfea71-d8fe-4fec-8dad-01c19a6e4053",
				"enable": true
			}
		]
	},
	"preferences": {
		"author": "Clark Tozer",
		"version": "1.2",
		"params": {
			"O365TenantName": "Sysdoc",
			"CodeProvidedParam": true,
			"YammerNetwork": "Sysdoc.co.uk",
			"CompanyName": "Sysdoc Inc.",
			"lcid": 1033
		}
	},
	"contentTypes": [{
			"name": "ExampleCT",
			"group": "NewProject",
			"parent": "Item",
			"description": "Example",
			"id": "0644AE67-7E2D-40A6-90DD-75679075C913",
			"fields": [
				"Field1",
				"Field2"
			]
		},
		{
			"name": "NewProject Page",
			"group": "NewProject",
			"parent": "Article Page",
			"description": "Example",
			"id": "6B41BF59-9131-4627-AF69-71A5026E30D0"
		}
	],
	"fields": [{
			"name": "Field1",
			"displayName": "Field1",
			"type": "TaxonomyFieldType",
			"group": "NewProject",
			"required": false,
			"description": "Example",
			"id": "BC0CD194-DC42-4675-8C3F-13FDAB11CF38",
			"termGroupName": "Example Group",
			"termSetName": "Example Termset"
		},
		{
			"name": "Field2",
			"displayName": "Field2",
			"type": "DateTime",
			"format": "DateOnly",
			"group": "NewProject",
			"description": "Example",
			"required": false,
			"id": "D3D47B87-9EDF-4E9B-9766-7F7E6E2DD074",
			"default": "[today]"
		}
	],
	"lists": [{
		"title": "Example",
		"description": "Example",
		"enableAttachments": true,
		"enableContentTypes": true,
		"removeExistingContentTypes": true,
		"id": "19505E99-1DE7-4C4C-9618-42CDEFB926F4",
		"templateType": 100,
		"interface": "ExampleInterface",
		"scaffoldService": true,
		"contentTypes": [
			"ExampleCT"
		]
	}],
	"termGroups": [{
		"id": "48325D1B-B36F-451B-8D8F-203646CA6D4A",
		"name": "Example Group",
		"description": "",
		"termSets": [{
				"name": "Header Navigation",
				"id": "729819F4-8A4F-411A-9718-DF3A61D57D9A",
				"isNavigation": true,
				"terms": [{
					"name": "Home",
					"id": "3B02EFB6-C115-40F7-889B-7D91E72DC022",
					"targetUrl": "{sitecollection}/pages/Home.aspx",
					"linkTitle": "Home"
				}]
			},
			{
				"name": "Footer Navigation",
				"id": "257177FF-3D2F-474E-BA48-B99BC430F5CB",
				"isNavigation": true,
				"scaffoldService": true,
				"interface": "FooterNode",
				"terms": []
			},
			{
				"name": "Example Termset",
				"id": "207D08EF-7C50-4B25-A7F2-3255F85741E7",
				"scaffoldService": true,
				"interface": "ExampleTermset",
				"terms": []
			}
		]
	}],
	"directories": [{
			"src": "dist",
			"folder": "SiteAssets/Sysdoc",
			"overwrite": true,
			"recursive": true
		},
		{
			"src": "assets",
			"folder": "SiteAssets/Sysdoc/assets",
			"overwrite": true,
			"recursive": true
		}
	],
	"files": [{
			"src": "templates/pagelayouts/NewProjectLayout.aspx",
			"isPageLayout": true,
			"overwrite": true,
			"properties": {
				"PublishingAssociatedContentType": "NewProject Page",
				"ContentType": "Page Layout",
				"Title": "NewProject Page Layout",
				"MasterPageDescription": "NewProject page layout"
			}
		},
		{
			"src": "templates/masterpages/NewProject.master",
			"isMasterPage": true,
			"overwire": true
		}
	],
	"pagesLibraryContentTypes": [
		"NewProject Page"
	],
	"pages": [{
		"name": "Home",
		"layout": "NewProjectLayout",
		"title": "Home",
		"publish": true
	}]
}