├── .gitignore ├── README.md ├── skaffold-angular ├── .dockerignore ├── .editorconfig ├── .gitignore ├── README.md ├── angular.json ├── browserslist ├── dev.Dockerfile ├── e2e │ ├── protractor.conf.js │ ├── src │ │ ├── app.e2e-spec.ts │ │ └── app.po.ts │ └── tsconfig.json ├── karma.conf.js ├── package-lock.json ├── package.json ├── src │ ├── app │ │ ├── app-routing.module.ts │ │ ├── app.component.html │ │ ├── app.component.scss │ │ ├── app.component.spec.ts │ │ ├── app.component.ts │ │ └── app.module.ts │ ├── assets │ │ └── .gitkeep │ ├── environments │ │ ├── environment.prod.ts │ │ └── environment.ts │ ├── favicon.ico │ ├── index.html │ ├── main.ts │ ├── polyfills.ts │ ├── styles.scss │ └── test.ts ├── tsconfig.app.json ├── tsconfig.json ├── tsconfig.spec.json └── tslint.json ├── skaffold-kubernetes ├── _docker-example.json ├── _secrets-example.yaml ├── angular-deployment.yaml ├── nestjs-deployment.yaml ├── skaffold-kaniko.yaml ├── skaffold-local.yaml └── skaffold-remote.yaml └── skaffold-nestjs ├── .dockerignore ├── .eslintrc.js ├── .gitignore ├── .prettierrc ├── README.md ├── dev.Dockerfile ├── nest-cli.json ├── package-lock.json ├── package.json ├── src ├── app.controller.spec.ts ├── app.controller.ts ├── app.module.ts ├── app.service.ts └── main.ts ├── test ├── app.e2e-spec.ts └── jest-e2e.json ├── tsconfig.build.json └── tsconfig.json /.gitignore: -------------------------------------------------------------------------------- 1 | # project files 2 | .env 3 | *.env 4 | *.env.* 5 | .idea 6 | 7 | # compiled output 8 | /dist 9 | /node_modules 10 | 11 | # Logs 12 | logs 13 | *.log 14 | npm-debug.log* 15 | yarn-debug.log* 16 | yarn-error.log* 17 | lerna-debug.log* 18 | 19 | # OS 20 | .DS_Store 21 | 22 | # Tests 23 | /coverage 24 | /.nyc_output 25 | 26 | # IDEs and editors 27 | /.idea 28 | .project 29 | .classpath 30 | .c9/ 31 | *.launch 32 | .settings/ 33 | *.sublime-workspace 34 | 35 | # IDE - VSCode 36 | .vscode/* 37 | !.vscode/settings.json 38 | !.vscode/tasks.json 39 | !.vscode/launch.json 40 | !.vscode/extensions.json 41 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Skaffold NestJS Angular 2 | 3 | Skaffold NestJS Angular example with local remote and kaniko configurations 4 | 5 | ## How to use 6 | 7 | ```sh 8 | git clone https://github.com/svtslv/skaffold-nestjs-angular 9 | ``` 10 | 11 | ```sh 12 | cd skaffold-nestjs-angular/skaffold-kubernetes 13 | ``` 14 | 15 | ```sh 16 | kubectl create ns skaffold-nestjs-angular-namespace 17 | ``` 18 | 19 | Update `deploy.kubeContext` -> `skaffold-kubernetes/skaffold-(local|remote|kaniko).yaml` 20 | 21 | ### Skaffold Local 22 | 23 | Local docker and local kubernetes 24 | 25 | ```sh 26 | skaffold dev -f skaffold-local.yaml --port-forward 27 | ``` 28 | 29 | Open `http://localhost:3000` and `http://localhost:4200` change the code and enjoy. 30 | 31 | ### Skaffold Remote 32 | 33 | Local docker and remote kubernetes 34 | 35 | ``` 36 | skaffold dev \ 37 | -f skaffold-remote.yaml \ 38 | --port-forward \ 39 | --default-repo=registry.gitlab.com/USERNAME/PROJECT 40 | ``` 41 | 42 | ### Skaffold Kaniko 43 | 44 | Remote builder and remote kubernetes 45 | 46 | 1. Update `AUTH_SECRET_KEY` -> `skaffold-kubernetes/_secret-example.yaml` 47 | 2. Update `build.cluster.dockerConfig.path` -> `skaffold-kubernetes/skaffold-kaniko.yaml` 48 | 49 | ``` 50 | skaffold dev \ 51 | -f skaffold-kaniko.yaml \ 52 | --port-forward \ 53 | --default-repo=registry.gitlab.com/USERNAME/PROJECT 54 | ``` 55 | 56 | ### Generate auth from username and password 57 | 58 | ```sh 59 | echo -n 'username:password' | base64 60 | ``` 61 | 62 | # License 63 | 64 | MIT 65 | 66 | 67 | -------------------------------------------------------------------------------- /skaffold-angular/.dockerignore: -------------------------------------------------------------------------------- 1 | .env 2 | *.env 3 | *.env* 4 | .git 5 | .idea 6 | dist 7 | node_modules -------------------------------------------------------------------------------- /skaffold-angular/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see https://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /skaffold-angular/.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /tmp 6 | /out-tsc 7 | # Only exists if Bazel was run 8 | /bazel-out 9 | 10 | # dependencies 11 | /node_modules 12 | 13 | # profiling files 14 | chrome-profiler-events*.json 15 | speed-measure-plugin*.json 16 | 17 | # IDEs and editors 18 | /.idea 19 | .project 20 | .classpath 21 | .c9/ 22 | *.launch 23 | .settings/ 24 | *.sublime-workspace 25 | 26 | # IDE - VSCode 27 | .vscode/* 28 | !.vscode/settings.json 29 | !.vscode/tasks.json 30 | !.vscode/launch.json 31 | !.vscode/extensions.json 32 | .history/* 33 | 34 | # misc 35 | /.sass-cache 36 | /connect.lock 37 | /coverage 38 | /libpeerconnection.log 39 | npm-debug.log 40 | yarn-error.log 41 | testem.log 42 | /typings 43 | 44 | # System Files 45 | .DS_Store 46 | Thumbs.db 47 | -------------------------------------------------------------------------------- /skaffold-angular/README.md: -------------------------------------------------------------------------------- 1 | # Skaffold Angular 2 | -------------------------------------------------------------------------------- /skaffold-angular/angular.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json", 3 | "version": 1, 4 | "newProjectRoot": "projects", 5 | "projects": { 6 | "skaffold-angular": { 7 | "projectType": "application", 8 | "schematics": { 9 | "@schematics/angular:component": { 10 | "style": "scss" 11 | } 12 | }, 13 | "root": "", 14 | "sourceRoot": "src", 15 | "prefix": "app", 16 | "architect": { 17 | "build": { 18 | "builder": "@angular-devkit/build-angular:browser", 19 | "options": { 20 | "outputPath": "dist/skaffold-angular", 21 | "index": "src/index.html", 22 | "main": "src/main.ts", 23 | "polyfills": "src/polyfills.ts", 24 | "tsConfig": "tsconfig.app.json", 25 | "aot": true, 26 | "assets": [ 27 | "src/favicon.ico", 28 | "src/assets" 29 | ], 30 | "styles": [ 31 | "src/styles.scss" 32 | ], 33 | "scripts": [] 34 | }, 35 | "configurations": { 36 | "production": { 37 | "fileReplacements": [ 38 | { 39 | "replace": "src/environments/environment.ts", 40 | "with": "src/environments/environment.prod.ts" 41 | } 42 | ], 43 | "optimization": true, 44 | "outputHashing": "all", 45 | "sourceMap": false, 46 | "extractCss": true, 47 | "namedChunks": false, 48 | "extractLicenses": true, 49 | "vendorChunk": false, 50 | "buildOptimizer": true, 51 | "budgets": [ 52 | { 53 | "type": "initial", 54 | "maximumWarning": "2mb", 55 | "maximumError": "5mb" 56 | }, 57 | { 58 | "type": "anyComponentStyle", 59 | "maximumWarning": "6kb", 60 | "maximumError": "10kb" 61 | } 62 | ] 63 | } 64 | } 65 | }, 66 | "serve": { 67 | "builder": "@angular-devkit/build-angular:dev-server", 68 | "options": { 69 | "browserTarget": "skaffold-angular:build" 70 | }, 71 | "configurations": { 72 | "production": { 73 | "browserTarget": "skaffold-angular:build:production" 74 | } 75 | } 76 | }, 77 | "extract-i18n": { 78 | "builder": "@angular-devkit/build-angular:extract-i18n", 79 | "options": { 80 | "browserTarget": "skaffold-angular:build" 81 | } 82 | }, 83 | "test": { 84 | "builder": "@angular-devkit/build-angular:karma", 85 | "options": { 86 | "main": "src/test.ts", 87 | "polyfills": "src/polyfills.ts", 88 | "tsConfig": "tsconfig.spec.json", 89 | "karmaConfig": "karma.conf.js", 90 | "assets": [ 91 | "src/favicon.ico", 92 | "src/assets" 93 | ], 94 | "styles": [ 95 | "src/styles.scss" 96 | ], 97 | "scripts": [] 98 | } 99 | }, 100 | "lint": { 101 | "builder": "@angular-devkit/build-angular:tslint", 102 | "options": { 103 | "tsConfig": [ 104 | "tsconfig.app.json", 105 | "tsconfig.spec.json", 106 | "e2e/tsconfig.json" 107 | ], 108 | "exclude": [ 109 | "**/node_modules/**" 110 | ] 111 | } 112 | }, 113 | "e2e": { 114 | "builder": "@angular-devkit/build-angular:protractor", 115 | "options": { 116 | "protractorConfig": "e2e/protractor.conf.js", 117 | "devServerTarget": "skaffold-angular:serve" 118 | }, 119 | "configurations": { 120 | "production": { 121 | "devServerTarget": "skaffold-angular:serve:production" 122 | } 123 | } 124 | } 125 | } 126 | }}, 127 | "defaultProject": "skaffold-angular" 128 | } 129 | -------------------------------------------------------------------------------- /skaffold-angular/browserslist: -------------------------------------------------------------------------------- 1 | # This file is used by the build system to adjust CSS and JS output to support the specified browsers below. 2 | # For additional information regarding the format and rule options, please see: 3 | # https://github.com/browserslist/browserslist#queries 4 | 5 | # You can see what browsers were selected by your queries by running: 6 | # npx browserslist 7 | 8 | > 0.5% 9 | last 2 versions 10 | Firefox ESR 11 | not dead 12 | not IE 9-11 # For IE 9-11 support, remove 'not'. -------------------------------------------------------------------------------- /skaffold-angular/dev.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:12-alpine 2 | 3 | WORKDIR /app 4 | EXPOSE 4200 5 | 6 | COPY package* ./ 7 | RUN apk update && apk add --no-cache --virtual .build-deps make gcc g++ python \ 8 | && npm ci \ 9 | && npm run ngcc \ 10 | && apk del .build-deps 11 | COPY . . 12 | 13 | CMD ["npm", "run", "ng", "serve"] 14 | # CMD ["npm", "run", "ng", "serve", "--", "--host=0.0.0.0", "--disable-host-check"] 15 | -------------------------------------------------------------------------------- /skaffold-angular/e2e/protractor.conf.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | // Protractor configuration file, see link for more information 3 | // https://github.com/angular/protractor/blob/master/lib/config.ts 4 | 5 | const { SpecReporter } = require('jasmine-spec-reporter'); 6 | 7 | /** 8 | * @type { import("protractor").Config } 9 | */ 10 | exports.config = { 11 | allScriptsTimeout: 11000, 12 | specs: [ 13 | './src/**/*.e2e-spec.ts' 14 | ], 15 | capabilities: { 16 | browserName: 'chrome' 17 | }, 18 | directConnect: true, 19 | baseUrl: 'http://localhost:4200/', 20 | framework: 'jasmine', 21 | jasmineNodeOpts: { 22 | showColors: true, 23 | defaultTimeoutInterval: 30000, 24 | print: function() {} 25 | }, 26 | onPrepare() { 27 | require('ts-node').register({ 28 | project: require('path').join(__dirname, './tsconfig.json') 29 | }); 30 | jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); 31 | } 32 | }; -------------------------------------------------------------------------------- /skaffold-angular/e2e/src/app.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | import { AppPage } from './app.po'; 2 | import { browser, logging } from 'protractor'; 3 | 4 | describe('workspace-project App', () => { 5 | let page: AppPage; 6 | 7 | beforeEach(() => { 8 | page = new AppPage(); 9 | }); 10 | 11 | it('should display welcome message', () => { 12 | page.navigateTo(); 13 | expect(page.getTitleText()).toEqual('skaffold-angular app is running!'); 14 | }); 15 | 16 | afterEach(async () => { 17 | // Assert that there are no errors emitted from the browser 18 | const logs = await browser.manage().logs().get(logging.Type.BROWSER); 19 | expect(logs).not.toContain(jasmine.objectContaining({ 20 | level: logging.Level.SEVERE, 21 | } as logging.Entry)); 22 | }); 23 | }); 24 | -------------------------------------------------------------------------------- /skaffold-angular/e2e/src/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor'; 2 | 3 | export class AppPage { 4 | navigateTo(): Promise { 5 | return browser.get(browser.baseUrl) as Promise; 6 | } 7 | 8 | getTitleText(): Promise { 9 | return element(by.css('app-root .content span')).getText() as Promise; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /skaffold-angular/e2e/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/e2e", 5 | "module": "commonjs", 6 | "target": "es5", 7 | "types": [ 8 | "jasmine", 9 | "jasminewd2", 10 | "node" 11 | ] 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /skaffold-angular/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration file, see link for more information 2 | // https://karma-runner.github.io/1.0/config/configuration-file.html 3 | 4 | module.exports = function (config) { 5 | config.set({ 6 | basePath: '', 7 | frameworks: ['jasmine', '@angular-devkit/build-angular'], 8 | plugins: [ 9 | require('karma-jasmine'), 10 | require('karma-chrome-launcher'), 11 | require('karma-jasmine-html-reporter'), 12 | require('karma-coverage-istanbul-reporter'), 13 | require('@angular-devkit/build-angular/plugins/karma') 14 | ], 15 | client: { 16 | clearContext: false // leave Jasmine Spec Runner output visible in browser 17 | }, 18 | coverageIstanbulReporter: { 19 | dir: require('path').join(__dirname, './coverage/skaffold-angular'), 20 | reports: ['html', 'lcovonly', 'text-summary'], 21 | fixWebpackSourcePaths: true 22 | }, 23 | reporters: ['progress', 'kjhtml'], 24 | port: 9876, 25 | colors: true, 26 | logLevel: config.LOG_INFO, 27 | autoWatch: true, 28 | browsers: ['Chrome'], 29 | singleRun: false, 30 | restartOnFileChange: true 31 | }); 32 | }; 33 | -------------------------------------------------------------------------------- /skaffold-angular/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "skaffold-angular", 3 | "version": "0.0.0", 4 | "scripts": { 5 | "ng": "ng", 6 | "start": "ng serve", 7 | "build": "ng build", 8 | "test": "ng test", 9 | "lint": "ng lint", 10 | "e2e": "ng e2e", 11 | "ngcc": "ngcc --properties es2015 browser module main --first-only --create-ivy-entry-points" 12 | }, 13 | "private": true, 14 | "dependencies": { 15 | "@angular/animations": "^10.0.9", 16 | "@angular/common": "^10.0.9", 17 | "@angular/compiler": "^10.0.9", 18 | "@angular/core": "^10.2.5", 19 | "@angular/forms": "^10.0.9", 20 | "@angular/platform-browser": "^10.0.9", 21 | "@angular/platform-browser-dynamic": "^10.0.9", 22 | "@angular/router": "^10.0.9", 23 | "rxjs": "^6.5.5", 24 | "tslib": "^2.0.1", 25 | "zone.js": "^0.10.3" 26 | }, 27 | "devDependencies": { 28 | "@angular-devkit/build-angular": "^15.0.0", 29 | "@angular/cli": "^15.1.4", 30 | "@angular/compiler-cli": "^10.0.9", 31 | "@angular/language-service": "^10.0.9", 32 | "@types/jasmine": "^3.5.12", 33 | "@types/jasminewd2": "~2.0.3", 34 | "@types/node": "^14.0.27", 35 | "codelyzer": "^6.0.0", 36 | "jasmine-core": "^3.6.0", 37 | "jasmine-spec-reporter": "^5.0.2", 38 | "karma": "^6.3.16", 39 | "karma-chrome-launcher": "~3.1.0", 40 | "karma-coverage-istanbul-reporter": "^3.0.3", 41 | "karma-jasmine": "^4.0.1", 42 | "karma-jasmine-html-reporter": "^1.5.4", 43 | "protractor": "^7.0.0", 44 | "ts-node": "^8.10.2", 45 | "tslint": "^6.1.3", 46 | "typescript": "^3.9.7" 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /skaffold-angular/src/app/app-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { Routes, RouterModule } from '@angular/router'; 3 | 4 | 5 | const routes: Routes = []; 6 | 7 | @NgModule({ 8 | imports: [RouterModule.forRoot(routes)], 9 | exports: [RouterModule] 10 | }) 11 | export class AppRoutingModule { } 12 | -------------------------------------------------------------------------------- /skaffold-angular/src/app/app.component.html: -------------------------------------------------------------------------------- 1 |

Skaffold Angular

2 |
{{ this.data$ }}
3 | -------------------------------------------------------------------------------- /skaffold-angular/src/app/app.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svtslv/skaffold-nestjs-angular/e8629c949058f45ef065c89946d9e3975017fa4a/skaffold-angular/src/app/app.component.scss -------------------------------------------------------------------------------- /skaffold-angular/src/app/app.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed, async } from '@angular/core/testing'; 2 | import { RouterTestingModule } from '@angular/router/testing'; 3 | import { AppComponent } from './app.component'; 4 | 5 | describe('AppComponent', () => { 6 | beforeEach(async(() => { 7 | TestBed.configureTestingModule({ 8 | imports: [ 9 | RouterTestingModule 10 | ], 11 | declarations: [ 12 | AppComponent 13 | ], 14 | }).compileComponents(); 15 | })); 16 | 17 | it('should create the app', () => { 18 | const fixture = TestBed.createComponent(AppComponent); 19 | const app = fixture.componentInstance; 20 | expect(app).toBeTruthy(); 21 | }); 22 | 23 | it(`should have as title 'skaffold-angular'`, () => { 24 | const fixture = TestBed.createComponent(AppComponent); 25 | const app = fixture.componentInstance; 26 | expect(app.title).toEqual('skaffold-angular'); 27 | }); 28 | 29 | it('should render title', () => { 30 | const fixture = TestBed.createComponent(AppComponent); 31 | fixture.detectChanges(); 32 | const compiled = fixture.nativeElement; 33 | expect(compiled.querySelector('.content span').textContent).toContain('skaffold-angular app is running!'); 34 | }); 35 | }); 36 | -------------------------------------------------------------------------------- /skaffold-angular/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { HttpClient } from '@angular/common/http'; 3 | 4 | @Component({ 5 | selector: 'app-root', 6 | templateUrl: './app.component.html', 7 | styleUrls: ['./app.component.scss'] 8 | }) 9 | export class AppComponent implements OnInit { 10 | data$ = null; 11 | 12 | constructor( 13 | private readonly http: HttpClient 14 | ) {} 15 | 16 | ngOnInit(): any { 17 | this.http.get<{ data: string }>('http://localhost:3000').subscribe(res => { 18 | this.data$ = res.data; 19 | }); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /skaffold-angular/src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { BrowserModule } from '@angular/platform-browser'; 2 | import { NgModule } from '@angular/core'; 3 | import { HttpClientModule } from '@angular/common/http'; 4 | 5 | import { AppRoutingModule } from './app-routing.module'; 6 | import { AppComponent } from './app.component'; 7 | 8 | @NgModule({ 9 | declarations: [ 10 | AppComponent 11 | ], 12 | imports: [ 13 | BrowserModule, 14 | HttpClientModule, 15 | AppRoutingModule 16 | ], 17 | providers: [], 18 | bootstrap: [AppComponent] 19 | }) 20 | export class AppModule { } 21 | -------------------------------------------------------------------------------- /skaffold-angular/src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svtslv/skaffold-nestjs-angular/e8629c949058f45ef065c89946d9e3975017fa4a/skaffold-angular/src/assets/.gitkeep -------------------------------------------------------------------------------- /skaffold-angular/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /skaffold-angular/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // This file can be replaced during build by using the `fileReplacements` array. 2 | // `ng build --prod` replaces `environment.ts` with `environment.prod.ts`. 3 | // The list of file replacements can be found in `angular.json`. 4 | 5 | export const environment = { 6 | production: false 7 | }; 8 | 9 | /* 10 | * For easier debugging in development mode, you can import the following file 11 | * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. 12 | * 13 | * This import should be commented out in production mode because it will have a negative impact 14 | * on performance if an error is thrown. 15 | */ 16 | // import 'zone.js/dist/zone-error'; // Included with Angular CLI. 17 | -------------------------------------------------------------------------------- /skaffold-angular/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/svtslv/skaffold-nestjs-angular/e8629c949058f45ef065c89946d9e3975017fa4a/skaffold-angular/src/favicon.ico -------------------------------------------------------------------------------- /skaffold-angular/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SkaffoldAngular 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /skaffold-angular/src/main.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './app/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic().bootstrapModule(AppModule) 12 | .catch(err => console.error(err)); 13 | -------------------------------------------------------------------------------- /skaffold-angular/src/polyfills.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file includes polyfills needed by Angular and is loaded before the app. 3 | * You can add your own extra polyfills to this file. 4 | * 5 | * This file is divided into 2 sections: 6 | * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. 7 | * 2. Application imports. Files imported after ZoneJS that should be loaded before your main 8 | * file. 9 | * 10 | * The current setup is for so-called "evergreen" browsers; the last versions of browsers that 11 | * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), 12 | * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. 13 | * 14 | * Learn more in https://angular.io/guide/browser-support 15 | */ 16 | 17 | /*************************************************************************************************** 18 | * BROWSER POLYFILLS 19 | */ 20 | 21 | /** IE10 and IE11 requires the following for NgClass support on SVG elements */ 22 | // import 'classlist.js'; // Run `npm install --save classlist.js`. 23 | 24 | /** 25 | * Web Animations `@angular/platform-browser/animations` 26 | * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari. 27 | * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0). 28 | */ 29 | // import 'web-animations-js'; // Run `npm install --save web-animations-js`. 30 | 31 | /** 32 | * By default, zone.js will patch all possible macroTask and DomEvents 33 | * user can disable parts of macroTask/DomEvents patch by setting following flags 34 | * because those flags need to be set before `zone.js` being loaded, and webpack 35 | * will put import in the top of bundle, so user need to create a separate file 36 | * in this directory (for example: zone-flags.ts), and put the following flags 37 | * into that file, and then add the following code before importing zone.js. 38 | * import './zone-flags'; 39 | * 40 | * The flags allowed in zone-flags.ts are listed here. 41 | * 42 | * The following flags will work for all browsers. 43 | * 44 | * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame 45 | * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick 46 | * (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames 47 | * 48 | * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js 49 | * with the following flag, it will bypass `zone.js` patch for IE/Edge 50 | * 51 | * (window as any).__Zone_enable_cross_context_check = true; 52 | * 53 | */ 54 | 55 | /*************************************************************************************************** 56 | * Zone JS is required by default for Angular itself. 57 | */ 58 | import 'zone.js/dist/zone'; // Included with Angular CLI. 59 | 60 | 61 | /*************************************************************************************************** 62 | * APPLICATION IMPORTS 63 | */ 64 | -------------------------------------------------------------------------------- /skaffold-angular/src/styles.scss: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | -------------------------------------------------------------------------------- /skaffold-angular/src/test.ts: -------------------------------------------------------------------------------- 1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files 2 | 3 | import 'zone.js/dist/zone-testing'; 4 | import { getTestBed } from '@angular/core/testing'; 5 | import { 6 | BrowserDynamicTestingModule, 7 | platformBrowserDynamicTesting 8 | } from '@angular/platform-browser-dynamic/testing'; 9 | 10 | declare const require: { 11 | context(path: string, deep?: boolean, filter?: RegExp): { 12 | keys(): string[]; 13 | (id: string): T; 14 | }; 15 | }; 16 | 17 | // First, initialize the Angular testing environment. 18 | getTestBed().initTestEnvironment( 19 | BrowserDynamicTestingModule, 20 | platformBrowserDynamicTesting() 21 | ); 22 | // Then we find all the tests. 23 | const context = require.context('./', true, /\.spec\.ts$/); 24 | // And load the modules. 25 | context.keys().map(context); 26 | -------------------------------------------------------------------------------- /skaffold-angular/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "./out-tsc/app", 5 | "types": [] 6 | }, 7 | "files": [ 8 | "src/main.ts", 9 | "src/polyfills.ts" 10 | ], 11 | "include": [ 12 | "src/**/*.d.ts" 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /skaffold-angular/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "baseUrl": "./", 5 | "outDir": "./dist/out-tsc", 6 | "sourceMap": true, 7 | "declaration": false, 8 | "downlevelIteration": true, 9 | "experimentalDecorators": true, 10 | "module": "esnext", 11 | "moduleResolution": "node", 12 | "importHelpers": true, 13 | "target": "es2015", 14 | "lib": [ 15 | "es2018", 16 | "dom" 17 | ] 18 | }, 19 | "angularCompilerOptions": { 20 | "fullTemplateTypeCheck": true, 21 | "strictInjectionParameters": true 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /skaffold-angular/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "./out-tsc/spec", 5 | "types": [ 6 | "jasmine", 7 | "node" 8 | ] 9 | }, 10 | "files": [ 11 | "src/test.ts", 12 | "src/polyfills.ts" 13 | ], 14 | "include": [ 15 | "src/**/*.spec.ts", 16 | "src/**/*.d.ts" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /skaffold-angular/tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "tslint:recommended", 3 | "rules": { 4 | "array-type": false, 5 | "arrow-parens": false, 6 | "deprecation": { 7 | "severity": "warning" 8 | }, 9 | "component-class-suffix": true, 10 | "contextual-lifecycle": true, 11 | "directive-class-suffix": true, 12 | "directive-selector": [ 13 | true, 14 | "attribute", 15 | "app", 16 | "camelCase" 17 | ], 18 | "component-selector": [ 19 | true, 20 | "element", 21 | "app", 22 | "kebab-case" 23 | ], 24 | "import-blacklist": [ 25 | true, 26 | "rxjs/Rx" 27 | ], 28 | "interface-name": false, 29 | "max-classes-per-file": false, 30 | "max-line-length": [ 31 | true, 32 | 140 33 | ], 34 | "member-access": false, 35 | "member-ordering": [ 36 | true, 37 | { 38 | "order": [ 39 | "static-field", 40 | "instance-field", 41 | "static-method", 42 | "instance-method" 43 | ] 44 | } 45 | ], 46 | "no-consecutive-blank-lines": false, 47 | "no-console": [ 48 | true, 49 | "debug", 50 | "info", 51 | "time", 52 | "timeEnd", 53 | "trace" 54 | ], 55 | "no-empty": false, 56 | "no-inferrable-types": [ 57 | true, 58 | "ignore-params" 59 | ], 60 | "no-non-null-assertion": true, 61 | "no-redundant-jsdoc": true, 62 | "no-switch-case-fall-through": true, 63 | "no-var-requires": false, 64 | "object-literal-key-quotes": [ 65 | true, 66 | "as-needed" 67 | ], 68 | "object-literal-sort-keys": false, 69 | "ordered-imports": false, 70 | "quotemark": [ 71 | true, 72 | "single" 73 | ], 74 | "trailing-comma": false, 75 | "no-conflicting-lifecycle": true, 76 | "no-host-metadata-property": true, 77 | "no-input-rename": true, 78 | "no-inputs-metadata-property": true, 79 | "no-output-native": true, 80 | "no-output-on-prefix": true, 81 | "no-output-rename": true, 82 | "no-outputs-metadata-property": true, 83 | "template-banana-in-box": true, 84 | "template-no-negated-async": true, 85 | "use-lifecycle-interface": true, 86 | "use-pipe-transform-interface": true 87 | }, 88 | "rulesDirectory": [ 89 | "codelyzer" 90 | ] 91 | } -------------------------------------------------------------------------------- /skaffold-kubernetes/_docker-example.json: -------------------------------------------------------------------------------- 1 | {"auths":{"registry.gitlab.com":{"auth":"AUTH_SECRET_KEY"}}} 2 | -------------------------------------------------------------------------------- /skaffold-kubernetes/_secrets-example.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Secret 3 | metadata: 4 | name: registry-secret 5 | stringData: 6 | .dockerconfigjson: | 7 | {"auths":{"registry.gitlab.com":{"auth":"AUTH_SECRET_KEY"}}} 8 | type: kubernetes.io/dockerconfigjson 9 | -------------------------------------------------------------------------------- /skaffold-kubernetes/angular-deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: skaffold-angular-service 5 | spec: 6 | type: LoadBalancer 7 | ports: 8 | - port: 4200 9 | targetPort: 4200 10 | selector: 11 | app: skaffold-angular 12 | --- 13 | apiVersion: apps/v1 14 | kind: Deployment 15 | metadata: 16 | name: skaffold-angular-deployment 17 | spec: 18 | replicas: 1 19 | selector: 20 | matchLabels: 21 | app: skaffold-angular 22 | template: 23 | metadata: 24 | labels: 25 | app: skaffold-angular 26 | spec: 27 | imagePullSecrets: 28 | - name: registry-secret 29 | containers: 30 | - name: skaffold-angular 31 | image: registry.gitlab.com/svtslv/skaffold-nestjs-angular/dev-skaffold-angular 32 | ports: 33 | - containerPort: 4200 34 | -------------------------------------------------------------------------------- /skaffold-kubernetes/nestjs-deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: skaffold-nestjs-service 5 | spec: 6 | type: LoadBalancer 7 | ports: 8 | - port: 3000 9 | targetPort: 3000 10 | selector: 11 | app: skaffold-nestjs 12 | --- 13 | apiVersion: apps/v1 14 | kind: Deployment 15 | metadata: 16 | name: skaffold-nestjs-deployment 17 | spec: 18 | replicas: 1 19 | selector: 20 | matchLabels: 21 | app: skaffold-nestjs 22 | template: 23 | metadata: 24 | labels: 25 | app: skaffold-nestjs 26 | spec: 27 | imagePullSecrets: 28 | - name: registry-secret 29 | containers: 30 | - name: skaffold-nestjs 31 | image: registry.gitlab.com/svtslv/skaffold-nestjs-angular/dev-skaffold-nestjs 32 | ports: 33 | - containerPort: 3000 34 | -------------------------------------------------------------------------------- /skaffold-kubernetes/skaffold-kaniko.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: skaffold/v1 2 | kind: Config 3 | metadata: 4 | name: dev-skaffold-nestjs-angular 5 | build: 6 | cluster: 7 | dockerConfig: 8 | path: ~/.docker/config4.json 9 | artifacts: 10 | - image: registry.gitlab.com/svtslv/skaffold-nestjs-angular/dev-skaffold-nestjs 11 | context: ../skaffold-nestjs 12 | kaniko: 13 | cache: {} 14 | dockerfile: dev.Dockerfile 15 | sync: 16 | manual: 17 | - src: 'src/**/*.*' 18 | dest: . 19 | - image: registry.gitlab.com/svtslv/skaffold-nestjs-angular/dev-skaffold-angular 20 | context: ../skaffold-angular 21 | kaniko: 22 | cache: {} 23 | dockerfile: dev.Dockerfile 24 | sync: 25 | manual: 26 | - src: 'src/**/*.*' 27 | dest: . 28 | deploy: 29 | kubeContext: docker-desktop 30 | kubectl: 31 | flags: 32 | global: [--namespace=skaffold-nestjs-angular-namespace] 33 | manifests: 34 | - ./_secrets-example.yaml 35 | - ./nestjs-deployment.yaml 36 | - ./angular-deployment.yaml 37 | -------------------------------------------------------------------------------- /skaffold-kubernetes/skaffold-local.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: skaffold/v1 2 | kind: Config 3 | metadata: 4 | name: dev-skaffold-nestjs-angular 5 | build: 6 | local: 7 | push: false 8 | artifacts: 9 | - image: registry.gitlab.com/svtslv/skaffold-nestjs-angular/dev-skaffold-nestjs 10 | context: ../skaffold-nestjs 11 | docker: 12 | dockerfile: dev.Dockerfile 13 | sync: 14 | manual: 15 | - src: 'src/**/*.*' 16 | dest: . 17 | - image: registry.gitlab.com/svtslv/skaffold-nestjs-angular/dev-skaffold-angular 18 | context: ../skaffold-angular 19 | docker: 20 | dockerfile: dev.Dockerfile 21 | sync: 22 | manual: 23 | - src: 'src/**/*.*' 24 | dest: . 25 | deploy: 26 | kubeContext: docker-desktop 27 | kubectl: 28 | flags: 29 | global: [--namespace=skaffold-nestjs-angular-namespace] 30 | manifests: 31 | - ./_secrets-example.yaml 32 | - ./nestjs-deployment.yaml 33 | - ./angular-deployment.yaml 34 | -------------------------------------------------------------------------------- /skaffold-kubernetes/skaffold-remote.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: skaffold/v1 2 | kind: Config 3 | metadata: 4 | name: dev-skaffold-nestjs-angular 5 | build: 6 | local: 7 | push: true 8 | artifacts: 9 | - image: registry.gitlab.com/svtslv/skaffold-nestjs-angular/dev-skaffold-nestjs 10 | context: ../skaffold-nestjs 11 | docker: 12 | dockerfile: dev.Dockerfile 13 | sync: 14 | manual: 15 | - src: 'src/**/*.*' 16 | dest: . 17 | - image: registry.gitlab.com/svtslv/skaffold-nestjs-angular/dev-skaffold-angular 18 | context: ../skaffold-angular 19 | docker: 20 | dockerfile: dev.Dockerfile 21 | sync: 22 | manual: 23 | - src: 'src/**/*.*' 24 | dest: . 25 | deploy: 26 | kubeContext: docker-desktop 27 | kubectl: 28 | flags: 29 | global: [--namespace=skaffold-nestjs-angular-namespace] 30 | manifests: 31 | - ./_secrets-example.yaml 32 | - ./nestjs-deployment.yaml 33 | - ./angular-deployment.yaml 34 | -------------------------------------------------------------------------------- /skaffold-nestjs/.dockerignore: -------------------------------------------------------------------------------- 1 | .env 2 | *.env 3 | *.env* 4 | .git 5 | .idea 6 | dist 7 | node_modules -------------------------------------------------------------------------------- /skaffold-nestjs/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | parser: '@typescript-eslint/parser', 3 | parserOptions: { 4 | project: 'tsconfig.json', 5 | sourceType: 'module', 6 | }, 7 | plugins: ['@typescript-eslint/eslint-plugin'], 8 | extends: [ 9 | 'plugin:@typescript-eslint/eslint-recommended', 10 | 'plugin:@typescript-eslint/recommended', 11 | 'prettier', 12 | 'prettier/@typescript-eslint', 13 | ], 14 | root: true, 15 | env: { 16 | node: true, 17 | jest: true, 18 | }, 19 | rules: { 20 | '@typescript-eslint/interface-name-prefix': 'off', 21 | '@typescript-eslint/explicit-function-return-type': 'off', 22 | '@typescript-eslint/no-explicit-any': 'off', 23 | }, 24 | }; 25 | -------------------------------------------------------------------------------- /skaffold-nestjs/.gitignore: -------------------------------------------------------------------------------- 1 | # compiled output 2 | /dist 3 | /node_modules 4 | 5 | # Logs 6 | logs 7 | *.log 8 | npm-debug.log* 9 | yarn-debug.log* 10 | yarn-error.log* 11 | lerna-debug.log* 12 | 13 | # OS 14 | .DS_Store 15 | 16 | # Tests 17 | /coverage 18 | /.nyc_output 19 | 20 | # IDEs and editors 21 | /.idea 22 | .project 23 | .classpath 24 | .c9/ 25 | *.launch 26 | .settings/ 27 | *.sublime-workspace 28 | 29 | # IDE - VSCode 30 | .vscode/* 31 | !.vscode/settings.json 32 | !.vscode/tasks.json 33 | !.vscode/launch.json 34 | !.vscode/extensions.json -------------------------------------------------------------------------------- /skaffold-nestjs/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "all" 4 | } -------------------------------------------------------------------------------- /skaffold-nestjs/README.md: -------------------------------------------------------------------------------- 1 | # Skaffold NestJS 2 | -------------------------------------------------------------------------------- /skaffold-nestjs/dev.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:12-alpine 2 | 3 | WORKDIR /app 4 | EXPOSE 3000 5 | 6 | COPY package* ./ 7 | RUN apk update && apk add --no-cache --virtual .build-deps make gcc g++ python \ 8 | && npm ci \ 9 | && apk del .build-deps 10 | COPY . . 11 | 12 | ENV NODE_ENV=development 13 | CMD ["npm", "run", "start:dev"] 14 | -------------------------------------------------------------------------------- /skaffold-nestjs/nest-cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "collection": "@nestjs/schematics", 3 | "sourceRoot": "src" 4 | } 5 | -------------------------------------------------------------------------------- /skaffold-nestjs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "skaffold-nestjs", 3 | "version": "0.0.1", 4 | "description": "", 5 | "author": "", 6 | "license": "MIT", 7 | "scripts": { 8 | "prebuild": "rimraf dist", 9 | "build": "nest build", 10 | "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"", 11 | "start": "nest start", 12 | "start:dev": "nest start --watch", 13 | "start:debug": "nest start --debug --watch", 14 | "start:prod": "node dist/main", 15 | "lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix", 16 | "test": "jest", 17 | "test:watch": "jest --watch", 18 | "test:cov": "jest --coverage", 19 | "test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand", 20 | "test:e2e": "jest --config ./test/jest-e2e.json" 21 | }, 22 | "dependencies": { 23 | "@nestjs/common": "^9.2.1", 24 | "@nestjs/core": "^9.0.5", 25 | "@nestjs/platform-express": "^9.2.1", 26 | "reflect-metadata": "^0.1.13", 27 | "rimraf": "^3.0.2", 28 | "rxjs": "^6.6.2" 29 | }, 30 | "devDependencies": { 31 | "@nestjs/cli": "^9.3.0", 32 | "@nestjs/schematics": "^7.3.1", 33 | "@nestjs/testing": "^7.4.2", 34 | "@types/express": "^4.17.7", 35 | "@types/jest": "^26.0.10", 36 | "@types/node": "^14.0.27", 37 | "@types/supertest": "^2.0.10", 38 | "@typescript-eslint/eslint-plugin": "^3.9.0", 39 | "@typescript-eslint/parser": "^3.9.0", 40 | "eslint": "^7.7.0", 41 | "eslint-config-prettier": "^6.11.0", 42 | "eslint-plugin-import": "^2.22.0", 43 | "jest": "^26.4.0", 44 | "prettier": "^2.0.5", 45 | "supertest": "^4.0.2", 46 | "ts-jest": "^26.2.0", 47 | "ts-loader": "^8.4.0", 48 | "ts-node": "^8.10.2", 49 | "tsconfig-paths": "^3.10.1", 50 | "typescript": "^3.9.7" 51 | }, 52 | "jest": { 53 | "moduleFileExtensions": [ 54 | "js", 55 | "json", 56 | "ts" 57 | ], 58 | "rootDir": "src", 59 | "testRegex": ".spec.ts$", 60 | "transform": { 61 | "^.+\\.(t|j)s$": "ts-jest" 62 | }, 63 | "coverageDirectory": "../coverage", 64 | "testEnvironment": "node" 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /skaffold-nestjs/src/app.controller.spec.ts: -------------------------------------------------------------------------------- 1 | import { Test, TestingModule } from '@nestjs/testing'; 2 | import { AppController } from './app.controller'; 3 | import { AppService } from './app.service'; 4 | 5 | describe('AppController', () => { 6 | let appController: AppController; 7 | 8 | beforeEach(async () => { 9 | const app: TestingModule = await Test.createTestingModule({ 10 | controllers: [AppController], 11 | providers: [AppService], 12 | }).compile(); 13 | 14 | appController = app.get(AppController); 15 | }); 16 | 17 | describe('root', () => { 18 | it('should return "Hello World!"', () => { 19 | expect(appController.getHello()).toBe('Hello World!'); 20 | }); 21 | }); 22 | }); 23 | -------------------------------------------------------------------------------- /skaffold-nestjs/src/app.controller.ts: -------------------------------------------------------------------------------- 1 | import { Controller, Get } from '@nestjs/common'; 2 | import { AppService } from './app.service'; 3 | 4 | @Controller() 5 | export class AppController { 6 | constructor(private readonly appService: AppService) {} 7 | 8 | @Get() 9 | getHello(): object { 10 | return { data:this.appService.getHello() }; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /skaffold-nestjs/src/app.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { AppController } from './app.controller'; 3 | import { AppService } from './app.service'; 4 | 5 | @Module({ 6 | imports: [], 7 | controllers: [AppController], 8 | providers: [AppService], 9 | }) 10 | export class AppModule {} 11 | -------------------------------------------------------------------------------- /skaffold-nestjs/src/app.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@nestjs/common'; 2 | 3 | @Injectable() 4 | export class AppService { 5 | getHello(): string { 6 | return 'Hello from NestJS!'; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /skaffold-nestjs/src/main.ts: -------------------------------------------------------------------------------- 1 | import { NestFactory } from '@nestjs/core'; 2 | import { AppModule } from './app.module'; 3 | 4 | async function bootstrap() { 5 | const app = await NestFactory.create(AppModule); 6 | app.enableCors(); 7 | await app.listen(3000); 8 | } 9 | bootstrap(); 10 | -------------------------------------------------------------------------------- /skaffold-nestjs/test/app.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | import { Test, TestingModule } from '@nestjs/testing'; 2 | import { INestApplication } from '@nestjs/common'; 3 | import * as request from 'supertest'; 4 | import { AppModule } from './../src/app.module'; 5 | 6 | describe('AppController (e2e)', () => { 7 | let app: INestApplication; 8 | 9 | beforeEach(async () => { 10 | const moduleFixture: TestingModule = await Test.createTestingModule({ 11 | imports: [AppModule], 12 | }).compile(); 13 | 14 | app = moduleFixture.createNestApplication(); 15 | await app.init(); 16 | }); 17 | 18 | it('/ (GET)', () => { 19 | return request(app.getHttpServer()) 20 | .get('/') 21 | .expect(200) 22 | .expect('Hello World!'); 23 | }); 24 | }); 25 | -------------------------------------------------------------------------------- /skaffold-nestjs/test/jest-e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "moduleFileExtensions": ["js", "json", "ts"], 3 | "rootDir": ".", 4 | "testEnvironment": "node", 5 | "testRegex": ".e2e-spec.ts$", 6 | "transform": { 7 | "^.+\\.(t|j)s$": "ts-jest" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /skaffold-nestjs/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "exclude": ["node_modules", "test", "dist", "**/*spec.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /skaffold-nestjs/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "declaration": true, 5 | "removeComments": true, 6 | "emitDecoratorMetadata": true, 7 | "experimentalDecorators": true, 8 | "target": "es2017", 9 | "sourceMap": true, 10 | "outDir": "./dist", 11 | "baseUrl": "./", 12 | "incremental": true 13 | }, 14 | "exclude": ["node_modules", "dist"] 15 | } 16 | --------------------------------------------------------------------------------