Skip to content

Commit 97fcaa0

Browse files
authored
Merge pull request #3651 from IgniteUI/vnext
Updating prod with vnext changes
2 parents 1b52e89 + b3c4030 commit 97fcaa0

File tree

66 files changed

+4134
-2893
lines changed

Some content is hidden

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

66 files changed

+4134
-2893
lines changed

angular.json

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
"index": "src/index.html",
1919
"tsConfig": "src/tsconfig.app.json",
2020
"polyfills": [
21-
"zone.js",
22-
"hammerjs"
21+
"zone.js",
22+
"hammerjs"
2323
],
2424
"assets": [
2525
"src/assets",
@@ -35,9 +35,16 @@
3535
"sourceMap": true,
3636
"progress": true,
3737
"stylePreprocessorOptions": {
38-
"includePaths": ["node_modules"]
38+
"includePaths": [
39+
"node_modules"
40+
]
3941
},
40-
"browser": "src/main.ts"
42+
"browser": "src/main.ts",
43+
"server": "src/main.server.ts",
44+
"outputMode": "static",
45+
"ssr": {
46+
"entry": "src/server.ts"
47+
}
4148
},
4249
"configurations": {
4350
"production": {
@@ -152,10 +159,17 @@
152159
"optimization": false,
153160
"namedChunks": true,
154161
"stylePreprocessorOptions": {
155-
"includePaths": ["node_modules"]
162+
"includePaths": [
163+
"node_modules"
164+
]
156165
},
157166
"preserveSymlinks": true,
158-
"browser": "projects/app-lob/src/main.ts"
167+
"browser": "projects/app-lob/src/main.ts",
168+
"server": "projects/app-lob/src/main.server.ts",
169+
"outputMode": "static",
170+
"ssr": {
171+
"entry": "projects/app-lob/src/server.ts"
172+
}
159173
},
160174
"configurations": {
161175
"production": {
@@ -276,9 +290,16 @@
276290
"optimization": false,
277291
"namedChunks": true,
278292
"stylePreprocessorOptions": {
279-
"includePaths": ["node_modules"]
293+
"includePaths": [
294+
"node_modules"
295+
]
280296
},
281-
"browser": "projects/app-crm/src/main.ts"
297+
"browser": "projects/app-crm/src/main.ts",
298+
"server": "projects/app-crm/src/main.server.ts",
299+
"outputMode": "static",
300+
"ssr": {
301+
"entry": "projects/app-crm/src/server.ts"
302+
}
282303
},
283304
"configurations": {
284305
"production": {

azure-devops/app-cd.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@ pool:
1313
vmImage: ubuntu-latest
1414

1515
variables:
16-
githubToken: <value> # Add a GitHub token in Libraries
17-
ReplacementText: '@infragistics/igniteui-angular-extras'
16+
- group: live-editing-samples-pat
17+
- name: ReplacementText
18+
value: '@infragistics/igniteui-angular-extras'
1819

1920
steps:
2021
- checkout: self
22+
persistCredentials: true
2123
clean: true
2224
fetchTags: true
2325

@@ -78,10 +80,12 @@ steps:
7880
- template: templates/cd-template.yml
7981
parameters:
8082
customCommand: run generate-live-editing
83+
gitHubToken: $(GITHUB_TOKEN)
8184
workingDir: $(Build.SourcesDirectory)
8285
submoduleDir: angular-demos
8386
baseHref: \/angular-demos\/
8487
targetFolder: dist/app
8588
findRegex: angular-demos
8689
npmBuildCommand: 'run build-ci'
8790
repositoryfy: true
91+
repositoryfyCommand: 'repositoryfyAngularDemos'

azure-devops/app-crm-cd-yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@ pool:
1313
vmImage: ubuntu-latest
1414

1515
variables:
16-
githubToken: <value> # Add a GitHub token in Libraries
17-
ReplacementText: '@infragistics/igniteui-angular-extras'
16+
- group: live-editing-samples-pat
17+
- name: ReplacementText
18+
value: '@infragistics/igniteui-angular-extras'
1819

1920
steps:
2021
- checkout: self
22+
persistCredentials: true
2123
clean: true
2224
fetchTags: true
2325

@@ -78,6 +80,7 @@ steps:
7880
- template: templates/cd-template.yml
7981
parameters:
8082
customCommand: run generate-live-editing:app-crm
83+
gitHubToken: $(GITHUB_TOKEN)
8184
workingDir: $(Build.SourcesDirectory)
8285
submoduleDir: angular-demos-crm
8386
baseHref: \/angular-demos-grid-crm\/

azure-devops/app-lob-cd.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@ pool:
1313
vmImage: ubuntu-latest
1414

1515
variables:
16-
githubToken: <value> # Add a GitHub token in Libraries
17-
ReplacementText: '@infragistics/igniteui-angular-extras'
16+
- group: live-editing-samples-pat
17+
- name: ReplacementText
18+
value: '@infragistics/igniteui-angular-extras'
1819

1920
steps:
2021
- checkout: self
22+
persistCredentials: true
2123
clean: true
2224
fetchTags: true
2325

@@ -78,10 +80,12 @@ steps:
7880
- template: templates/cd-template.yml
7981
parameters:
8082
customCommand: run generate-live-editing:app-lob
83+
gitHubToken: $(GITHUB_TOKEN)
8184
workingDir: $(Build.SourcesDirectory)
8285
submoduleDir: angular-demos-lob
8386
baseHref: \/angular-demos-lob\/
8487
targetFolder: dist/app-lob
8588
findRegex: angular-demos
8689
npmBuildCommand: 'run build-ci:app-lob'
8790
repositoryfy: true
91+
repositoryfyCommand: 'repositoryfyAngularDemosLob'

azure-devops/templates/cd-template.yml

Lines changed: 29 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
parameters:
33
- name: customCommand
44
type: string
5+
- name: gitHubToken
6+
type: string
57
- name: workingDir
68
type: string
79
- name: submoduleDir
@@ -22,6 +24,9 @@ parameters:
2224
- name: repositoryfy
2325
type: boolean
2426
default: false
27+
- name: repositoryfyCommand
28+
type: string
29+
default: ''
2530

2631
steps:
2732
# - task: CmdLine@2
@@ -121,6 +126,11 @@ steps:
121126
displayName: 'Update web.config file'
122127
workingDirectory: ${{ parameters.workingDir }}
123128
129+
- script: |
130+
mv "$(Build.SourcesDirectory)/${{ parameters.targetFolder }}/browser/index.csr.html" "$(Build.SourcesDirectory)/${{ parameters.targetFolder }}/browser/index.html"
131+
echo "File renamed successfully."
132+
displayName: Rename index.csr.html to index.html
133+
124134
- script: |
125135
sourcePath="$(Build.SourcesDirectory)/${{ parameters.targetFolder }}/browser"
126136
destinationZip="$(Build.ArtifactStagingDirectory)/output.zip"
@@ -137,32 +147,32 @@ steps:
137147

138148
- task: Npm@1
139149
displayName: Staging - Repositorify Angular Demos and LOB Demos
140-
condition: and(eq(variables['Build.SourceBranchName'], 'vNext'), eq(variables['repositoryfy'], 'true'))
150+
condition: and(eq(variables['Build.SourceBranchName'], 'vNext'), eq(${{ parameters.repositoryfy }}, 'true'))
141151
inputs:
142152
command: custom
143153
workingDir: ${{ parameters.workingDir }}
144154
verbose: false
145-
customCommand: run repositoryfyAngularDemosLob
155+
customCommand: run ${{ parameters.repositoryfyCommand }}
146156

147157
- task: Npm@1
148158
displayName: Production - Repositorify Angular Demos
149-
condition: and(eq(variables['Build.SourceBranchName'], 'master'), contains(variables['build.reason'], 'CI'), eq(variables['repositoryfy'], 'true'))
159+
condition: and(eq(variables['Build.SourceBranchName'], 'master'), contains(variables['build.reason'], 'CI'), eq(${{ parameters.repositoryfy }}, 'true'))
150160
inputs:
151161
command: custom
152162
workingDir: ${{ parameters.workingDir }}
153163
verbose: false
154-
customCommand: run repositoryfyAngularDemosLob:prod
164+
customCommand: run ${{ parameters.repositoryfyCommand }}:prod
155165

156166
- task: CmdLine@2
157167
displayName: Stage changes
158-
condition: eq(variables['repositoryfy'], 'true')
168+
condition: eq(${{ parameters.repositoryfy }}, 'true')
159169
inputs:
160170
script: git add .
161171
workingDirectory: ${{ parameters.workingDir }}/igniteui-live-editing-samples/${{ parameters.submoduleDir }}
162172

163173
- task: CmdLine@2
164174
displayName: 'Check if there are any changes to be committed'
165-
condition: eq(variables['repositoryfy'], 'true')
175+
condition: eq(${{ parameters.repositoryfy }}, 'true')
166176
inputs:
167177
script: |
168178
# Check for changes
@@ -171,24 +181,26 @@ steps:
171181
echo "##vso[task.logissue type=warning]No changes to commit."
172182
exit 0
173183
else
174-
echo "##vso[task.setvariable variable=changesDetected;isOutput=true]true"
184+
echo "##vso[task.setvariable variable=changesDetected;]true"
175185
fi
176186
workingDirectory: ${{ parameters.workingDir }}/igniteui-live-editing-samples/${{ parameters.submoduleDir }}
177187

178-
- task: CmdLine@2
188+
- script: |
189+
git config --global user.name "tfsbuild"
190+
git config --global user.email "[email protected]"
191+
git config --global credential.helper store
192+
echo "https://x-access-token:$(GITHUB_TOKEN)@github.com" > ~/.git-credentials
193+
git commit -m "Automated repository update"
179194
displayName: Commit changes
180-
condition: and(eq(variables['changesDetected'], 'true'), eq(variables['repositoryfy'], 'true'))
181-
inputs:
182-
script: |
183-
git config user.name "tfsbuild"
184-
git config user.email "[email protected]"
185-
git add .
186-
git commit -m "Automated repository update"
187-
workingDirectory: ${{ parameters.workingDir }}/igniteui-live-editing-samples/${{ parameters.submoduleDir }}
195+
condition: and(eq(variables['changesDetected'], true), eq(${{ parameters.repositoryfy }}, 'true'))
196+
env:
197+
GITHUB_TOKEN: ${{ parameters.gitHubToken }}
198+
workingDirectory: ${{ parameters.workingDir }}/igniteui-live-editing-samples/${{ parameters.submoduleDir }}
188199
189200
- task: CmdLine@2
190201
displayName: Push changes
191-
condition: and(eq(variables['changesDetected'], 'true'), eq(variables['repositoryfy'], 'true'))
202+
condition: and(eq(variables['changesDetected'], true), eq(${{ parameters.repositoryfy }}, 'true'))
192203
inputs:
193204
script: git push
194205
workingDirectory: ${{ parameters.workingDir }}/igniteui-live-editing-samples/${{ parameters.submoduleDir }}
206+
continueOnError: true

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`);

live-editing/configs/DockManagerConfigGenerator.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import {CUSTOM_ELEMENTS_SCHEMA} from '@angular/core';
2-
import {AppModuleConfig, Config, IConfigGenerator} from 'igniteui-live-editing'
1+
import { Config, IConfigGenerator} from 'igniteui-live-editing'
32
import { BaseAppConfig } from './BaseConfig';
43
export class DockManagerConfigGenerator implements IConfigGenerator {
54

@@ -13,7 +12,9 @@ export class DockManagerConfigGenerator implements IConfigGenerator {
1312
configs.push(new Config({
1413
component: 'DockManagerComponent',
1514
additionalDependencies: ["igniteui-dockmanager"],
16-
appConfig: BaseAppConfig,
15+
appConfig: { ...BaseAppConfig,
16+
additionalAdjustments: [dockManagerImport, defineCustomElements]
17+
},
1718
shortenComponentPathBy: "/layouts/dock-manager/"
1819
}));
1920

live-editing/configs/app-dv-configs/DVGridConfig.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,9 @@ export class DVGridConfigGenerator implements IConfigGenerator {
9999
'/projects/app-lob/src/app/grid-finjs-dock-manager/dock-slot.component.ts',
100100
'/projects/app-lob/src/_app-layout.scss', '/projects/app-lob/src/_variables.scss'
101101
],
102-
appConfig: BaseAppConfig
102+
appConfig: { ...BaseAppConfig,
103+
additionalAdjustments: [dockManagerImport, defineCustomElements]
104+
}
103105
}));
104106

105107
return configs;

0 commit comments

Comments
 (0)