https://github.com/matthijskamstra/pages-test-angular
Angular test pages
https://github.com/matthijskamstra/pages-test-angular
angular javascript pages ts typescript
Last synced: about 2 months ago
JSON representation
Angular test pages
- Host: GitHub
- URL: https://github.com/matthijskamstra/pages-test-angular
- Owner: MatthijsKamstra
- Created: 2022-09-10T21:54:06.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-10-18T09:46:36.000Z (over 3 years ago)
- Last Synced: 2025-01-22T02:49:00.630Z (over 1 year ago)
- Topics: angular, javascript, pages, ts, typescript
- Language: TypeScript
- Homepage: https://matthijskamstra.github.io/pages-test-angular/home
- Size: 1.83 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# pages test angular
test ci/cd
- gitlab
- ci/cd
- angular
## setup
my "default" project init
```bash
ng new 98_pages --routing true --style scss
cd 98_pages
ng serve --open
```
But if you need to generate directly into the root
```bash
ng new 98_pages --routing true --style scss --directory ./
```
## GITHUB!!! (HUB)
### **(github)** build project
build project with correct "base-href" and in correct output folder
```bash
# build project
ng build --output-path docs --base-href /[projectname]/
# create a production build
ng build --prod --output-path docs --base-href /[projectname]/
# the literal version
ng build --output-path docs --base-href /pages-test-angular/
```
### **(github)** build project (optional)
change `package.json`
```json
{
"name": "pages-test-angular",
"version": "0.0.0",
"scripts": {
"deploy": "ng build --output-path docs --base-href /pages-test-angular/ && cp docs/index.html docs/404.html && npm run git:deploy",
"git:deploy": "npm run git:commit && npm run git:push",
"git:commit": "git add -A . && git commit -a -m 'update docs'",
"git:push": "git push",
...
```
Run next command, to generate and automaticly deploy to github
```bash
npm run deploy
```
## resource
- (github) https://angular.io/guide/deployment
- (github) https://medium.com/swlh/how-to-deploy-an-angular-app-to-github-pages-without-using-any-libraries-step-by-step-guide-cfe96fb0c879