Skip to content

Commit 27c25f4

Browse files
authored
Merge pull request #26 from IgniteUI/vnext
Publish to prod WC examples
2 parents d0ab84c + 919413c commit 27c25f4

File tree

663 files changed

+19815
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

663 files changed

+19815
-0
lines changed

.github/workflows/node.js.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
3+
4+
name: Node.js CI
5+
6+
on:
7+
push:
8+
branches: [ "vnext", "master" ]
9+
pull_request:
10+
branches: [ "vnext", "master" ]
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
17+
strategy:
18+
matrix:
19+
node-version: [20.x, 22.x]
20+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
- name: Use Node.js ${{ matrix.node-version }}
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: ${{ matrix.node-version }}
28+
cache: 'npm'
29+
- run: npm ci
30+
- run: npm run build --if-present

.gitignore

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
trigger:
2+
branches:
3+
include:
4+
- vnext
5+
- master
6+
7+
# This pipeline is meant to build specific branches for deployment. It's not meant to be a part of PR validation.
8+
pr: none
9+
10+
parameters:
11+
- name: isVerbose
12+
displayName: 'Get verbose output from steps - where configurable'
13+
type: boolean
14+
default: false
15+
- name: shouldCleanPostExecution
16+
displayName: 'Clean all pipeline dirs after the pipeline finishes?'
17+
type: boolean
18+
default: true
19+
20+
21+
name: $(Year:yyyy).$(Month).$(DayOfMonth)-r$(Rev:.r)
22+
23+
stages:
24+
- stage: Build
25+
pool:
26+
vmImage: ubuntu-latest
27+
28+
demands: npm
29+
jobs:
30+
- job: BuildSamples
31+
steps:
32+
- checkout: 'self'
33+
clean: true
34+
35+
- task: NodeTool@0
36+
displayName: 'Install Node'
37+
inputs:
38+
versionSource: 'spec'
39+
versionSpec: '18.x'
40+
41+
- task: Bash@3
42+
displayName: 'Create download artifact per sample (Shell)'
43+
inputs:
44+
targetType: 'inline'
45+
script: |
46+
# Define the root path where projects are located
47+
rootPath="$(Build.SourcesDirectory)/projects"
48+
49+
# Get all first-level subdirectories in the specified root path
50+
subdirectories=$(find "$rootPath" -mindepth 1 -maxdepth 1 -type d)
51+
52+
for subdirectory in $subdirectories; do
53+
# Extract the directory name from the path
54+
dirName=$(basename "$subdirectory")
55+
56+
# Give each sample a version in its package.json file - for traceability
57+
cd "$subdirectory"
58+
echo "Calling npm version command"
59+
npm version $(Build.BuildNumber) --no-git-tag-version
60+
61+
# Check if the directory name is already camel-case
62+
if [[ "$dirName" =~ ^[A-Z]+[a-z]+([A-Z][a-z]*)*$ ]]; then
63+
# If already camel-case, print it as is
64+
echo "$dirName"
65+
else
66+
# Convert to camel-case (capitalize first letters and remove hyphens)
67+
dirName=$(echo "$dirName" | sed -E 's/(^|-)([a-z])/\U\2/g')
68+
69+
fi
70+
71+
echo "Processing directory: $dirName"
72+
73+
# Define the name for the zip file
74+
zipName="$(Build.ArtifactStagingDirectory)/IgniteUI_WebComponents_ApplicationSample_${dirName}_Source.zip"
75+
echo "Creating ZIP: $zipName"
76+
77+
# Compress the directory into a ZIP file
78+
(cd "$subdirectory" && zip -r "$zipName" .)
79+
done
80+
81+
echo "All sample projects have been compressed and saved to the artifacts directory."
82+
83+
- task: PublishPipelineArtifact@1
84+
displayName: 'Publish Samples Sources zips'
85+
inputs:
86+
targetPath: '$(Build.ArtifactStagingDirectory)'
87+
artifact: 'samplesSourcesZips'
88+
publishLocation: 'pipeline'
89+
90+
- task: Npm@1
91+
displayName: 'Register licensed npm registry in .npmrc'
92+
inputs:
93+
verbose: ${{ parameters.isVerbose }}
94+
command: 'custom'
95+
workingDir: '$(Build.SourcesDirectory)'
96+
customCommand: 'config -L project set @infragistics:registry=https://packages.infragistics.com/npm/js-licensed/'
97+
customEndpoint: 'public proget'
98+
99+
- task: npmAuthenticate@0
100+
displayName: '[IG Production ProGet] npm authenticate'
101+
inputs:
102+
workingFile: '$(Build.SourcesDirectory)/.npmrc'
103+
customEndpoint: 'public proget'
104+
105+
- task: Npm@1
106+
displayName: 'npm install --legacy-peer-deps'
107+
inputs:
108+
verbose: ${{ parameters.isVerbose }}
109+
command: custom
110+
workingDir: '$(Build.SourcesDirectory)'
111+
customCommand: 'install --legacy-peer-deps'
112+
customEndpoint: 'public proget'
113+
114+
- task: Npm@1
115+
displayName: 'Install Ignite UI CLI globally'
116+
inputs:
117+
verbose: ${{ parameters.isVerbose }}
118+
command: custom
119+
workingDir: '$(Build.SourcesDirectory)'
120+
customCommand: 'install -g igniteui-cli'
121+
122+
- task: PowerShell@2
123+
displayName: 'Update vite.config to licensed'
124+
inputs:
125+
failOnStderr: true
126+
showWarnings: true
127+
workingDirectory: '$(Build.SourcesDirectory)'
128+
targetType: 'inline'
129+
script: |
130+
#Update vite.config.ts
131+
$viteConfig = Get-Content -Raw ./vite.config.ts
132+
$updatedViteConfig = $viteConfig -replace 'igniteui-webcomponents-', '@infragistics/igniteui-webcomponents-'
133+
$updatedViteConfig | Set-Content ./vite.config.ts
134+
135+
- task: Bash@3
136+
displayName: 'Run Ignite UI Upgrade in Root and All Project Subdirectories'
137+
inputs:
138+
targetType: 'inline'
139+
script: |
140+
echo "Running Ignite UI package upgrade at root level..."
141+
npx ig upgrade-packages --skip-install
142+
143+
echo "Running Ignite UI package upgrade in all project subdirectories..."
144+
for dir in $(Build.SourcesDirectory)/projects/*/; do
145+
if [ -d "$dir" ]; then
146+
echo "Processing: $dir"
147+
(cd "$dir" && npx ig upgrade-packages --skip-install)
148+
fi
149+
done
150+
151+
- task: Npm@1
152+
displayName: 'npm install --legacy-peer-deps'
153+
inputs:
154+
verbose: ${{ parameters.isVerbose }}
155+
command: custom
156+
workingDir: '$(Build.SourcesDirectory)'
157+
customCommand: 'install --legacy-peer-deps'
158+
159+
- task: Npm@1
160+
displayName: 'npm run build:ci'
161+
inputs:
162+
verbose: ${{ parameters.isVerbose }}
163+
command: custom
164+
workingDir: '$(Build.SourcesDirectory)'
165+
customCommand: 'run build:ci'
166+
167+
- task: PublishPipelineArtifact@1
168+
displayName: 'Publish app'
169+
inputs:
170+
targetPath: '$(Build.SourcesDirectory)/dist'
171+
artifact: 'dist.grid-demos-wc'
172+
publishLocation: 'pipeline'
173+
174+
- ${{ if eq(parameters.shouldCleanPostExecution, true) }}:
175+
- task: PostBuildCleanup@4

ignite-ui-cli.json

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"version": "$(cliVersion)",
3+
"project": {
4+
"defaultPort": 8000,
5+
"framework": "webcomponents",
6+
"projectTemplate": "$(projectTemplate)",
7+
"projectType": "igc-ts",
8+
"theme": "$(theme)",
9+
"isBundle": false,
10+
"components": [],
11+
"sourceFiles": [],
12+
"isShowcase": false,
13+
"version": ""
14+
},
15+
"build": {}
16+
}

index.html

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>Web Components Sample Apps</title>
7+
<link rel="icon" href="%BASE_URL%favicon.ico" />
8+
<link href="https://fonts.googleapis.com/css?family=Titillium+Web:300,400,600,700" rel="stylesheet" />
9+
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" />
10+
<link rel="stylesheet" href="./src/index.css" />
11+
<link rel="stylesheet" href="./node_modules/igniteui-webcomponents-grids/grids/themes/light/material.css" />
12+
<link rel="stylesheet" href="./node_modules/igniteui-webcomponents/themes/light/material.css" />
13+
<script type="module" src="./src/app.ts"></script>
14+
</head>
15+
<body class="ig-scrollbar ig-typography">
16+
<app-root></app-root>
17+
</body>
18+
</html>

0 commit comments

Comments
 (0)