Skip to content

Instantly share code, notes, and snippets.

View ElakkuvanR's full-sized avatar

Elakkuvan R ElakkuvanR

View GitHub Profile
# Create session and log to Sitecore
[CmdletBinding(DefaultParameterSetName = "no-arguments")]
Param (
[Parameter(Mandatory = $true, HelpMessage = "The remote CM URL")]
[string]$remoteCMUrl,
[Parameter(Mandatory = $true, HelpMessage = "User name under PSE Security Group")]
[string]$username,
[Parameter(Mandatory = $true, HelpMessage = "Password")]
# Create session and log to Sitecore
[CmdletBinding(DefaultParameterSetName = "no-arguments")]
Param (
[Parameter(Mandatory = $true, HelpMessage = "The remote CM URL")]
[string]$remoteCMUrl,
[Parameter(Mandatory = $true, HelpMessage = "User name under PSE Security Group")]
[string]$username,
[Parameter(Mandatory = $true, HelpMessage = "Password")]
# Create session and log to Sitecore
[CmdletBinding(DefaultParameterSetName = "no-arguments")]
Param (
[Parameter(Mandatory = $true, HelpMessage = "The remote CM URL")]
[string]$remoteCMUrl,
[Parameter(Mandatory = $true, HelpMessage = "User name under PSE Security Group")]
[string]$username,
[Parameter(Mandatory = $true, HelpMessage = "Password")]
<project>
<Metadata>
<metadata>
<PackageName>Package_Name</PackageName>
<Author />
<Version />
<Revision />
<License />
<Comment />
<Attributes />
# escape=`
ARG PARENT_IMAGE
FROM $PARENT_IMAGE
USER ContainerAdministrator
ARG NODEJS_VERSION
WORKDIR c:\build
RUN curl.exe -sS -L -o node.zip https://nodejs.org/dist/v%NODEJS_VERSION%/node-v%NODEJS_VERSION%-win-x64.zip"
[CmdletBinding()]
param (
[Parameter(Mandatory)]
[ValidateScript({ Test-Path $_ -PathType Container })]
[string]$ResourcesDirectory,
[Parameter(Mandatory)]
[string]$SqlServer,
[Parameter(Mandatory)]
query ProductList($rootPath: String!, $templateId: String!, $after: String) {
search(
where: {
AND: [
{ name: "_templates", value: $templateId, operator: CONTAINS }
{ name: "_path", value: $rootPath, operator: CONTAINS }
]
}
first: 4
after: $after
import React from 'react';
import {
ComponentRendering,
useSitecoreContext,
} from '@sitecore-jss/sitecore-jss-nextjs';
import { request } from 'graphql-request';
import { useSWRInfinite } from 'swr';
import { ProductListDocument, ProductListQuery, _Product, Item } from './ProductList.graphql';
import { SitecoreContextValues } from 'lib/page-props';
import { SitecoreTemplates } from 'lib/sitecoreTemplates';
import React, { useState } from 'react';
import { request } from 'graphql-request';
import useSWR from 'swr';
import { ComponentRendering, useSitecoreContext } from '@sitecore-jss/sitecore-jss-nextjs';
import { ProductListDocument, _Product, Item } from './ProductList.graphql';
import config from 'temp/config';
import { DocumentNode } from 'graphql';
import ListProduct from 'lib/helpers/ListProduct';
import { SitecoreTemplates } from 'lib/sitecoreTemplates';
import { SitecoreContextValues } from 'lib/page-props';
import React from 'react';
import {
_NavigationItem,
Item,
HomePage,
NavigationDocument,
NavigationQuery,
} from './Navigation.graphql';
import NextLink from 'next/link';
import {