Skip to content

Commit

Permalink
matching default project name to github repo for github pages
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjeetkumaritoutlook committed Dec 14, 2024
1 parent 3255d76 commit ef8a36b
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 18 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,18 @@ jobs:
run: npm ci

- name: Build Angular app
run: npm run build -- --base-href "/angular-cop/"
run: npm run build -- --base-href "/angular-local-stenciljs/"
#base-href in an Angular app defines the root path for resolving relative URLs to assets (CSS, JS, etc.).
#By default, Angular apps assume they are hosted at the root (/).
#The trailing slash at the end of base-href is important.
- name: Upload build artifacts
uses: actions/upload-pages-artifact@v3
with:
name: github-pages
path: ./dist/angular-cop
path: ./dist/angular-local-stenciljs
#Check outputPath in angular.json file
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist/angular-cop
publish_dir: ./dist/angular-local-stenciljs
12 changes: 6 additions & 6 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": 1,
"newProjectRoot": "projects",
"projects": {
"angular-cop": {
"angular-local-stenciljs": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
Expand All @@ -20,7 +20,7 @@
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/angular-cop",
"outputPath": "dist/angular-local-stenciljs",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
Expand Down Expand Up @@ -72,18 +72,18 @@
"builder": "@angular-devkit/build-angular:dev-server",
"configurations": {
"production": {
"browserTarget": "angular-cop:build:production"
"browserTarget": "angular-local-stenciljs:build:production"
},
"development": {
"browserTarget": "angular-cop:build:development"
"browserTarget": "angular-local-stenciljs:build:development"
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "angular-cop:build"
"browserTarget": "angular-local-stenciljs:build"
}
},
"test": {
Expand All @@ -107,5 +107,5 @@
}
}
},
"defaultProject": "angular-cop"
"defaultProject": "angular-local-stenciljs"
}
2 changes: 1 addition & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module.exports = function (config) {
suppressAll: true // removes the duplicated traces
},
coverageReporter: {
dir: require('path').join(__dirname, './coverage/angular-cop'),
dir: require('path').join(__dirname, './coverage/angular-local-stenciljs'),
subdir: '.',
reporters: [
{ type: 'html' },
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package-old-cg-lock.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "angular-cop",
"name": "angular-local-stenciljs",
"version": "0.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "angular-cop",
"name": "angular-local-stenciljs",
"version": "0.0.0",
"dependencies": {
"@angular/animations": "~12.1.2",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "angular-cop",
"name": "angular-local-stenciljs",
"version": "0.0.0",
"scripts": {
"ng": "ng",
Expand Down
6 changes: 3 additions & 3 deletions src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ describe('AppComponent', () => {
expect(app).toBeTruthy();
});

// it(`should have as title 'angular-cop'`, () => {
// it(`should have as title 'angular-local-stenciljs'`, () => {
// const fixture = TestBed.createComponent(AppComponent);
// const app = fixture.componentInstance;
// expect(app.title).toEqual('angular-cop');
// expect(app.title).toEqual('angular-local-stenciljs');
// });

it('should render title', () => {
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
const compiled = fixture.nativeElement as HTMLElement;
expect(compiled.querySelector('.content span')?.textContent).toContain('angular-cop app is running!');
expect(compiled.querySelector('.content span')?.textContent).toContain('angular-local-stenciljs app is running!');
});
});

0 comments on commit ef8a36b

Please sign in to comment.