diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/app/app.module.ts | 2 | ||||
-rw-r--r-- | src/assets/.gitkeep | 0 | ||||
-rw-r--r-- | src/browserslist | 9 | ||||
-rw-r--r-- | src/environments/environment.ts | 15 | ||||
-rw-r--r-- | src/karma.conf.js | 31 | ||||
-rw-r--r-- | src/polyfills.ts | 5 | ||||
-rw-r--r-- | src/tsconfig.app.json | 3 | ||||
-rw-r--r-- | src/tsconfig.spec.json | 4 | ||||
-rw-r--r-- | src/tslint.json | 17 | ||||
-rw-r--r-- | src/typings.d.ts | 5 |
10 files changed, 74 insertions, 17 deletions
diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 926975a..f657163 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts | |||
@@ -1,10 +1,8 @@ | |||
1 | import { BrowserModule } from '@angular/platform-browser'; | 1 | import { BrowserModule } from '@angular/platform-browser'; |
2 | import { NgModule } from '@angular/core'; | 2 | import { NgModule } from '@angular/core'; |
3 | 3 | ||
4 | |||
5 | import { AppComponent } from './app.component'; | 4 | import { AppComponent } from './app.component'; |
6 | 5 | ||
7 | |||
8 | @NgModule({ | 6 | @NgModule({ |
9 | declarations: [ | 7 | declarations: [ |
10 | AppComponent | 8 | AppComponent |
diff --git a/src/assets/.gitkeep b/src/assets/.gitkeep new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/assets/.gitkeep | |||
diff --git a/src/browserslist b/src/browserslist new file mode 100644 index 0000000..8e09ab4 --- /dev/null +++ b/src/browserslist | |||
@@ -0,0 +1,9 @@ | |||
1 | # This file is currently used by autoprefixer to adjust CSS to support the below specified browsers | ||
2 | # For additional information regarding the format and rule options, please see: | ||
3 | # https://github.com/browserslist/browserslist#queries | ||
4 | # For IE 9-11 support, please uncomment the last line of the file and adjust as needed | ||
5 | > 0.5% | ||
6 | last 2 versions | ||
7 | Firefox ESR | ||
8 | not dead | ||
9 | # IE 9-11 \ No newline at end of file | ||
diff --git a/src/environments/environment.ts b/src/environments/environment.ts index b7f639a..012182e 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts | |||
@@ -1,8 +1,15 @@ | |||
1 | // The file contents for the current environment will overwrite these during build. | 1 | // This file can be replaced during build by using the `fileReplacements` array. |
2 | // The build system defaults to the dev environment which uses `environment.ts`, but if you do | 2 | // `ng build ---prod` replaces `environment.ts` with `environment.prod.ts`. |
3 | // `ng build --env=prod` then `environment.prod.ts` will be used instead. | 3 | // The list of file replacements can be found in `angular.json`. |
4 | // The list of which env maps to which file can be found in `.angular-cli.json`. | ||
5 | 4 | ||
6 | export const environment = { | 5 | export const environment = { |
7 | production: false | 6 | production: false |
8 | }; | 7 | }; |
8 | |||
9 | /* | ||
10 | * In development mode, to ignore zone related error stack frames such as | ||
11 | * `zone.run`, `zoneDelegate.invokeTask` for easier debugging, you can | ||
12 | * import the following file, but please comment it out in production mode | ||
13 | * because it will have performance impact when throw error | ||
14 | */ | ||
15 | // import 'zone.js/dist/zone-error'; // Included with Angular CLI. | ||
diff --git a/src/karma.conf.js b/src/karma.conf.js new file mode 100644 index 0000000..b6e0042 --- /dev/null +++ b/src/karma.conf.js | |||
@@ -0,0 +1,31 @@ | |||
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'), | ||
20 | reports: ['html', 'lcovonly'], | ||
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 | }); | ||
31 | }; \ No newline at end of file | ||
diff --git a/src/polyfills.ts b/src/polyfills.ts index af84770..d310405 100644 --- a/src/polyfills.ts +++ b/src/polyfills.ts | |||
@@ -47,8 +47,9 @@ import 'core-js/es7/reflect'; | |||
47 | 47 | ||
48 | 48 | ||
49 | /** | 49 | /** |
50 | * Required to support Web Animations `@angular/platform-browser/animations`. | 50 | * Web Animations `@angular/platform-browser/animations` |
51 | * Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation | 51 | * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari. |
52 | * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0). | ||
52 | **/ | 53 | **/ |
53 | // import 'web-animations-js'; // Run `npm install --save web-animations-js`. | 54 | // import 'web-animations-js'; // Run `npm install --save web-animations-js`. |
54 | 55 | ||
diff --git a/src/tsconfig.app.json b/src/tsconfig.app.json index 39ba8db..722c370 100644 --- a/src/tsconfig.app.json +++ b/src/tsconfig.app.json | |||
@@ -2,12 +2,11 @@ | |||
2 | "extends": "../tsconfig.json", | 2 | "extends": "../tsconfig.json", |
3 | "compilerOptions": { | 3 | "compilerOptions": { |
4 | "outDir": "../out-tsc/app", | 4 | "outDir": "../out-tsc/app", |
5 | "baseUrl": "./", | ||
6 | "module": "es2015", | 5 | "module": "es2015", |
7 | "types": [] | 6 | "types": [] |
8 | }, | 7 | }, |
9 | "exclude": [ | 8 | "exclude": [ |
10 | "test.ts", | 9 | "src/test.ts", |
11 | "**/*.spec.ts" | 10 | "**/*.spec.ts" |
12 | ] | 11 | ] |
13 | } | 12 | } |
diff --git a/src/tsconfig.spec.json b/src/tsconfig.spec.json index ac22a29..8f7cede 100644 --- a/src/tsconfig.spec.json +++ b/src/tsconfig.spec.json | |||
@@ -2,7 +2,6 @@ | |||
2 | "extends": "../tsconfig.json", | 2 | "extends": "../tsconfig.json", |
3 | "compilerOptions": { | 3 | "compilerOptions": { |
4 | "outDir": "../out-tsc/spec", | 4 | "outDir": "../out-tsc/spec", |
5 | "baseUrl": "./", | ||
6 | "module": "commonjs", | 5 | "module": "commonjs", |
7 | "types": [ | 6 | "types": [ |
8 | "jasmine", | 7 | "jasmine", |
@@ -10,7 +9,8 @@ | |||
10 | ] | 9 | ] |
11 | }, | 10 | }, |
12 | "files": [ | 11 | "files": [ |
13 | "test.ts" | 12 | "test.ts", |
13 | "polyfills.ts" | ||
14 | ], | 14 | ], |
15 | "include": [ | 15 | "include": [ |
16 | "**/*.spec.ts", | 16 | "**/*.spec.ts", |
diff --git a/src/tslint.json b/src/tslint.json new file mode 100644 index 0000000..52e2c1a --- /dev/null +++ b/src/tslint.json | |||
@@ -0,0 +1,17 @@ | |||
1 | { | ||
2 | "extends": "../tslint.json", | ||
3 | "rules": { | ||
4 | "directive-selector": [ | ||
5 | true, | ||
6 | "attribute", | ||
7 | "app", | ||
8 | "camelCase" | ||
9 | ], | ||
10 | "component-selector": [ | ||
11 | true, | ||
12 | "element", | ||
13 | "app", | ||
14 | "kebab-case" | ||
15 | ] | ||
16 | } | ||
17 | } | ||
diff --git a/src/typings.d.ts b/src/typings.d.ts deleted file mode 100644 index ef5c7bd..0000000 --- a/src/typings.d.ts +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | /* SystemJS module definition */ | ||
2 | declare var module: NodeModule; | ||
3 | interface NodeModule { | ||
4 | id: string; | ||
5 | } | ||