Skip to content

Commit b295b18

Browse files
author
Konstantin Dinev
committed
Merge branch 'enable-ssr' of https://github.com/IgniteUI/igniteui-angular-samples into enable-ssr
2 parents 92ce7ce + 4a1a61f commit b295b18

File tree

10 files changed

+2808
-2714
lines changed

10 files changed

+2808
-2714
lines changed

azure-devops/app-cd.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,4 @@ steps:
8585
findRegex: angular-demos
8686
npmBuildCommand: 'run build-ci'
8787
repositoryfy: true
88+
repositoryfyCommand: 'repositoryfyAngularDemos'

azure-devops/app-lob-cd.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,4 @@ steps:
8585
findRegex: angular-demos
8686
npmBuildCommand: 'run build-ci:app-lob'
8787
repositoryfy: true
88+
repositoryfyCommand: 'repositoryfyAngularDemosLob'

azure-devops/templates/cd-template.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ parameters:
2222
- name: repositoryfy
2323
type: boolean
2424
default: false
25+
- name: repositoryfyCommand
26+
type: string
27+
default: ''
2528

2629
steps:
2730
# - task: CmdLine@2
@@ -137,32 +140,32 @@ steps:
137140

138141
- task: Npm@1
139142
displayName: Staging - Repositorify Angular Demos and LOB Demos
140-
condition: and(eq(variables['Build.SourceBranchName'], 'vNext'), eq(variables['repositoryfy'], 'true'))
143+
condition: and(eq(variables['Build.SourceBranchName'], 'vNext'), eq(${{ parameters.repositoryfy }}, 'true'))
141144
inputs:
142145
command: custom
143146
workingDir: ${{ parameters.workingDir }}
144147
verbose: false
145-
customCommand: run repositoryfyAngularDemosLob
148+
customCommand: run ${{ parameters.repositoryfyCommand }}
146149

147150
- task: Npm@1
148151
displayName: Production - Repositorify Angular Demos
149-
condition: and(eq(variables['Build.SourceBranchName'], 'master'), contains(variables['build.reason'], 'CI'), eq(variables['repositoryfy'], 'true'))
152+
condition: and(eq(variables['Build.SourceBranchName'], 'master'), contains(variables['build.reason'], 'CI'), eq(${{ parameters.repositoryfy }}, 'true'))
150153
inputs:
151154
command: custom
152155
workingDir: ${{ parameters.workingDir }}
153156
verbose: false
154-
customCommand: run repositoryfyAngularDemosLob:prod
157+
customCommand: run ${{ parameters.repositoryfyCommand }}:prod
155158

156159
- task: CmdLine@2
157160
displayName: Stage changes
158-
condition: eq(variables['repositoryfy'], 'true')
161+
condition: eq(${{ parameters.repositoryfy }}, 'true')
159162
inputs:
160163
script: git add .
161164
workingDirectory: ${{ parameters.workingDir }}/igniteui-live-editing-samples/${{ parameters.submoduleDir }}
162165

163166
- task: CmdLine@2
164167
displayName: 'Check if there are any changes to be committed'
165-
condition: eq(variables['repositoryfy'], 'true')
168+
condition: eq(${{ parameters.repositoryfy }}, 'true')
166169
inputs:
167170
script: |
168171
# Check for changes
@@ -177,7 +180,7 @@ steps:
177180

178181
- task: CmdLine@2
179182
displayName: Commit changes
180-
condition: and(eq(variables['changesDetected'], 'true'), eq(variables['repositoryfy'], 'true'))
183+
condition: and(eq(variables['changesDetected'], 'true'), eq(${{ parameters.repositoryfy }}, 'true'))
181184
inputs:
182185
script: |
183186
git config user.name "tfsbuild"
@@ -188,7 +191,7 @@ steps:
188191

189192
- task: CmdLine@2
190193
displayName: Push changes
191-
condition: and(eq(variables['changesDetected'], 'true'), eq(variables['repositoryfy'], 'true'))
194+
condition: and(eq(variables['changesDetected'], 'true'), eq(${{ parameters.repositoryfy }}, 'true'))
192195
inputs:
193196
script: git push
194197
workingDirectory: ${{ parameters.workingDir }}/igniteui-live-editing-samples/${{ parameters.submoduleDir }}

gulpfile.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ gulp.task("generate-live-editing", async () => {
3030
}
3131
}
3232
:
33-
(argv.appCrm ?
33+
(argv.appCrm ?
3434
{
3535
platform: 'angular',
3636
projectDir: "./projects/app-crm",
@@ -213,16 +213,18 @@ const processApp = (projectPath, dest, directoriesToExclude) => {
213213
const paths = sampleFile.path.replace("./", "").split("/");
214214
let tempPath = "";
215215
paths.forEach(p => {
216-
tempPath += p + "/";
216+
tempPath += p;
217217
if (p.indexOf(".") !== -1 && p !== codesandboxConfigFolder) {
218218
fs.writeFileSync(sampleAppPath + "/" + tempPath, sampleContent);
219-
} else
219+
} else {
220220
if (p === 'Dockerfile') {
221221
fs.writeFileSync(sampleAppPath + "/" + tempPath, sampleContent);
222222
} else if (!fs.existsSync(sampleAppPath + "/" + tempPath)) {
223223
fs.mkdirSync(sampleAppPath + "/" + tempPath)
224224
}
225-
})
225+
}
226+
tempPath += "/";
227+
});
226228
});
227229
i++;
228230
console.log(`Processing ${fileName}.json with SCSS styling`);

0 commit comments

Comments
 (0)