From 5896b4fc95acddee7ad8d6c5c6de7e04fe561de1 Mon Sep 17 00:00:00 2001 From: "Keller, Kraig" Date: Wed, 8 Aug 2018 16:39:50 -0400 Subject: [PATCH 1/5] :camel: Bump project template to Angular 6, removed export to src folder --- .angulardoc.json | 4 + README copy.md | 27 ++++++ README.md | 10 ++- angular.json | 127 +++++++++++++++++++++++++++++ blitz_export.json | 2 +- e2e/app.e2e-spec.ts | 14 ---- e2e/src/app.e2e-spec.ts | 14 ++++ e2e/{ => src}/app.po.ts | 2 +- e2e/tsconfig.e2e.json | 5 +- package.json | 61 +++++++------- protractor.conf.js | 28 ------- src/app/app.component.css | 0 src/app/app.component.html | 20 +++++ src/app/app.component.spec.ts | 27 ++++++ src/app/app.component.ts | 10 +++ src/app/app.module.ts | 16 ++++ src/browserslist | 9 ++ src/environments/environment.ts | 15 +++- src/index.html | 3 +- karma.conf.js => src/karma.conf.js | 16 ++-- src/main.ts | 12 +++ src/polyfills.ts | 36 ++++---- src/test.ts | 14 +--- src/tsconfig.app.json | 3 +- src/tsconfig.spec.json | 5 +- src/tslint.json | 17 ++++ src/typings.d.ts | 5 -- tsconfig.json | 3 +- tslint.json | 24 ++---- 29 files changed, 376 insertions(+), 153 deletions(-) create mode 100644 .angulardoc.json create mode 100644 README copy.md create mode 100644 angular.json delete mode 100644 e2e/app.e2e-spec.ts create mode 100644 e2e/src/app.e2e-spec.ts rename e2e/{ => src}/app.po.ts (84%) delete mode 100644 protractor.conf.js create mode 100644 src/app/app.component.css create mode 100644 src/app/app.component.html create mode 100644 src/app/app.component.spec.ts create mode 100644 src/app/app.component.ts create mode 100644 src/app/app.module.ts create mode 100644 src/browserslist rename karma.conf.js => src/karma.conf.js (68%) create mode 100644 src/main.ts create mode 100644 src/tslint.json delete mode 100644 src/typings.d.ts diff --git a/.angulardoc.json b/.angulardoc.json new file mode 100644 index 0000000..f3ccfed --- /dev/null +++ b/.angulardoc.json @@ -0,0 +1,4 @@ +{ + "repoId": "9b1f792c-4668-4f6d-a83d-24b392681dc6", + "lastSync": 0 +} \ No newline at end of file diff --git a/README copy.md b/README copy.md new file mode 100644 index 0000000..bd6ff1c --- /dev/null +++ b/README copy.md @@ -0,0 +1,27 @@ +# AngularTemplate + +This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 6.0.8. + +## Development server + +Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. + +## Code scaffolding + +Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. + +## Build + +Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build. + +## Running unit tests + +Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). + +## Running end-to-end tests + +Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/). + +## Further help + +To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). diff --git a/README.md b/README.md index 3efc460..b18719e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # {BLITZ_PROJECT_SLUG} -This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.2.1. +# AngularTemplate + +This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 6.0.8. ## Development server @@ -8,11 +10,11 @@ Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app w ## Code scaffolding -Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|module`. +Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. ## Build -Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build. +Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build. ## Running unit tests @@ -21,8 +23,8 @@ Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github. ## Running end-to-end tests Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/). -Before running the tests make sure you are serving the app via `ng serve`. ## Further help To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). + diff --git a/angular.json b/angular.json new file mode 100644 index 0000000..3697d7a --- /dev/null +++ b/angular.json @@ -0,0 +1,127 @@ +{ + "$schema": "./node_modules/@angular/cli/lib/config/schema.json", + "version": 1, + "newProjectRoot": "projects", + "projects": { + "angular-template": { + "root": "", + "sourceRoot": "src", + "projectType": "application", + "prefix": "app", + "schematics": {}, + "architect": { + "build": { + "builder": "@angular-devkit/build-angular:browser", + "options": { + "outputPath": "dist/angular-template", + "index": "src/index.html", + "main": "src/main.ts", + "polyfills": "src/polyfills.ts", + "tsConfig": "src/tsconfig.app.json", + "assets": [ + "src/favicon.ico", + "src/assets" + ], + "styles": [ + "src/styles.css" + ], + "scripts": [] + }, + "configurations": { + "production": { + "fileReplacements": [ + { + "replace": "src/environments/environment.ts", + "with": "src/environments/environment.prod.ts" + } + ], + "optimization": true, + "outputHashing": "all", + "sourceMap": false, + "extractCss": true, + "namedChunks": false, + "aot": true, + "extractLicenses": true, + "vendorChunk": false, + "buildOptimizer": true + } + } + }, + "serve": { + "builder": "@angular-devkit/build-angular:dev-server", + "options": { + "browserTarget": "angular-template:build" + }, + "configurations": { + "production": { + "browserTarget": "angular-template:build:production" + } + } + }, + "extract-i18n": { + "builder": "@angular-devkit/build-angular:extract-i18n", + "options": { + "browserTarget": "angular-template:build" + } + }, + "test": { + "builder": "@angular-devkit/build-angular:karma", + "options": { + "main": "src/test.ts", + "polyfills": "src/polyfills.ts", + "tsConfig": "src/tsconfig.spec.json", + "karmaConfig": "src/karma.conf.js", + "styles": [ + "src/styles.css" + ], + "scripts": [], + "assets": [ + "src/favicon.ico", + "src/assets" + ] + } + }, + "lint": { + "builder": "@angular-devkit/build-angular:tslint", + "options": { + "tsConfig": [ + "src/tsconfig.app.json", + "src/tsconfig.spec.json" + ], + "exclude": [ + "**/node_modules/**" + ] + } + } + } + }, + "angular-template-e2e": { + "root": "e2e/", + "projectType": "application", + "architect": { + "e2e": { + "builder": "@angular-devkit/build-angular:protractor", + "options": { + "protractorConfig": "e2e/protractor.conf.js", + "devServerTarget": "angular-template:serve" + }, + "configurations": { + "production": { + "devServerTarget": "angular-template:serve:production" + } + } + }, + "lint": { + "builder": "@angular-devkit/build-angular:tslint", + "options": { + "tsConfig": "e2e/tsconfig.e2e.json", + "exclude": [ + "**/node_modules/**" + ] + } + } + } + } + }, + "defaultProject": "angular-template" +} \ No newline at end of file diff --git a/blitz_export.json b/blitz_export.json index 9bfa19f..4bd35df 100644 --- a/blitz_export.json +++ b/blitz_export.json @@ -1,5 +1,5 @@ { "htmlTemplate": "src/index.html", -"exportProjectTo": "src", +"exportProjectTo": "./", "ignore": [".angular-cli.json"] } diff --git a/e2e/app.e2e-spec.ts b/e2e/app.e2e-spec.ts deleted file mode 100644 index 6aadc0a..0000000 --- a/e2e/app.e2e-spec.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { AngularTemplatePage } from './app.po'; - -describe('angular-template App', () => { - let page: AngularTemplatePage; - - beforeEach(() => { - page = new AngularTemplatePage(); - }); - - it('should display welcome message', () => { - page.navigateTo(); - expect(page.getParagraphText()).toEqual('Welcome to app!'); - }); -}); diff --git a/e2e/src/app.e2e-spec.ts b/e2e/src/app.e2e-spec.ts new file mode 100644 index 0000000..e76e0ae --- /dev/null +++ b/e2e/src/app.e2e-spec.ts @@ -0,0 +1,14 @@ +import { AppPage } from './app.po'; + +describe('workspace-project App', () => { + let page: AppPage; + + beforeEach(() => { + page = new AppPage(); + }); + + it('should display welcome message', () => { + page.navigateTo(); + expect(page.getParagraphText()).toEqual('Welcome to angular-template!'); + }); +}); diff --git a/e2e/app.po.ts b/e2e/src/app.po.ts similarity index 84% rename from e2e/app.po.ts rename to e2e/src/app.po.ts index 7cc056d..82ea75b 100644 --- a/e2e/app.po.ts +++ b/e2e/src/app.po.ts @@ -1,6 +1,6 @@ import { browser, by, element } from 'protractor'; -export class AngularTemplatePage { +export class AppPage { navigateTo() { return browser.get('/'); } diff --git a/e2e/tsconfig.e2e.json b/e2e/tsconfig.e2e.json index 1d9e5ed..a6dd622 100644 --- a/e2e/tsconfig.e2e.json +++ b/e2e/tsconfig.e2e.json @@ -1,8 +1,7 @@ { "extends": "../tsconfig.json", "compilerOptions": { - "outDir": "../out-tsc/e2e", - "baseUrl": "./", + "outDir": "../out-tsc/app", "module": "commonjs", "target": "es5", "types": [ @@ -11,4 +10,4 @@ "node" ] } -} +} \ No newline at end of file diff --git a/package.json b/package.json index 02fa3b6..702f3c9 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,6 @@ { "name": "angular-template", "version": "0.0.0", - "license": "MIT", "scripts": { "ng": "ng", "start": "ng serve", @@ -12,38 +11,38 @@ }, "private": true, "dependencies": { - "@angular/animations": "^5.0.0", - "@angular/common": "^5.0.0", - "@angular/compiler": "^5.0.0", - "@angular/core": "^5.0.0", - "@angular/forms": "^5.0.0", - "@angular/http": "^5.0.0", - "@angular/platform-browser": "^5.0.0", - "@angular/platform-browser-dynamic": "^5.0.0", - "@angular/router": "^5.0.0", - "core-js": "^2.4.1", - "rxjs": "^5.1.0", - "zone.js": "^0.8.4" + "@angular/animations": "^6.0.3", + "@angular/common": "^6.0.3", + "@angular/compiler": "^6.0.3", + "@angular/core": "^6.0.3", + "@angular/forms": "^6.0.3", + "@angular/http": "^6.0.3", + "@angular/platform-browser": "^6.0.3", + "@angular/platform-browser-dynamic": "^6.0.3", + "@angular/router": "^6.0.3", + "core-js": "^2.5.4", + "rxjs": "^6.0.0", + "zone.js": "^0.8.26" }, "devDependencies": { - "@angular/cli": "1.6.7", - "@angular/compiler-cli": "^5.0.0", - "@angular/language-service": "^5.0.0", - "@types/jasmine": "~2.5.53", - "@types/jasminewd2": "~2.0.2", - "@types/node": "~6.0.60", - "codelyzer": "~3.0.1", - "jasmine-core": "~2.6.2", - "jasmine-spec-reporter": "~4.1.0", - "karma": "~1.7.0", - "karma-chrome-launcher": "~2.1.1", - "karma-cli": "~1.0.1", - "karma-coverage-istanbul-reporter": "^1.2.1", - "karma-jasmine": "~1.1.0", + "@angular/compiler-cli": "^6.0.3", + "@angular-devkit/build-angular": "~0.6.8", + "typescript": "~2.7.2", + "@angular/cli": "~6.0.8", + "@angular/language-service": "^6.0.3", + "@types/jasmine": "~2.8.6", + "@types/jasminewd2": "~2.0.3", + "@types/node": "~8.9.4", + "codelyzer": "~4.2.1", + "jasmine-core": "~2.99.1", + "jasmine-spec-reporter": "~4.2.1", + "karma": "~1.7.1", + "karma-chrome-launcher": "~2.2.0", + "karma-coverage-istanbul-reporter": "~2.0.0", + "karma-jasmine": "~1.1.1", "karma-jasmine-html-reporter": "^0.2.2", - "protractor": "~5.1.2", - "ts-node": "~3.0.4", - "tslint": "~5.3.2", - "typescript": "~2.4.2" + "protractor": "~5.3.0", + "ts-node": "~5.0.1", + "tslint": "~5.9.1" } } diff --git a/protractor.conf.js b/protractor.conf.js deleted file mode 100644 index 7ee3b5e..0000000 --- a/protractor.conf.js +++ /dev/null @@ -1,28 +0,0 @@ -// Protractor configuration file, see link for more information -// https://github.com/angular/protractor/blob/master/lib/config.ts - -const { SpecReporter } = require('jasmine-spec-reporter'); - -exports.config = { - allScriptsTimeout: 11000, - specs: [ - './e2e/**/*.e2e-spec.ts' - ], - capabilities: { - 'browserName': 'chrome' - }, - directConnect: true, - baseUrl: 'http://localhost:4200/', - framework: 'jasmine', - jasmineNodeOpts: { - showColors: true, - defaultTimeoutInterval: 30000, - print: function() {} - }, - onPrepare() { - require('ts-node').register({ - project: 'e2e/tsconfig.e2e.json' - }); - jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); - } -}; diff --git a/src/app/app.component.css b/src/app/app.component.css new file mode 100644 index 0000000..e69de29 diff --git a/src/app/app.component.html b/src/app/app.component.html new file mode 100644 index 0000000..fa2706a --- /dev/null +++ b/src/app/app.component.html @@ -0,0 +1,20 @@ + +
+

+ Welcome to {{ title }}! +

+ Angular Logo +
+

Here are some links to help you start:

+ + diff --git a/src/app/app.component.spec.ts b/src/app/app.component.spec.ts new file mode 100644 index 0000000..f62e407 --- /dev/null +++ b/src/app/app.component.spec.ts @@ -0,0 +1,27 @@ +import { TestBed, async } from '@angular/core/testing'; +import { AppComponent } from './app.component'; +describe('AppComponent', () => { + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ + AppComponent + ], + }).compileComponents(); + })); + it('should create the app', async(() => { + const fixture = TestBed.createComponent(AppComponent); + const app = fixture.debugElement.componentInstance; + expect(app).toBeTruthy(); + })); + it(`should have as title 'app'`, async(() => { + const fixture = TestBed.createComponent(AppComponent); + const app = fixture.debugElement.componentInstance; + expect(app.title).toEqual('app'); + })); + it('should render title in a h1 tag', async(() => { + const fixture = TestBed.createComponent(AppComponent); + fixture.detectChanges(); + const compiled = fixture.debugElement.nativeElement; + expect(compiled.querySelector('h1').textContent).toContain('Welcome to angular-template!'); + })); +}); diff --git a/src/app/app.component.ts b/src/app/app.component.ts new file mode 100644 index 0000000..7b0f672 --- /dev/null +++ b/src/app/app.component.ts @@ -0,0 +1,10 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-root', + templateUrl: './app.component.html', + styleUrls: ['./app.component.css'] +}) +export class AppComponent { + title = 'app'; +} diff --git a/src/app/app.module.ts b/src/app/app.module.ts new file mode 100644 index 0000000..f657163 --- /dev/null +++ b/src/app/app.module.ts @@ -0,0 +1,16 @@ +import { BrowserModule } from '@angular/platform-browser'; +import { NgModule } from '@angular/core'; + +import { AppComponent } from './app.component'; + +@NgModule({ + declarations: [ + AppComponent + ], + imports: [ + BrowserModule + ], + providers: [], + bootstrap: [AppComponent] +}) +export class AppModule { } diff --git a/src/browserslist b/src/browserslist new file mode 100644 index 0000000..8e09ab4 --- /dev/null +++ b/src/browserslist @@ -0,0 +1,9 @@ +# This file is currently used by autoprefixer to adjust CSS to support the below specified browsers +# For additional information regarding the format and rule options, please see: +# https://github.com/browserslist/browserslist#queries +# For IE 9-11 support, please uncomment the last line of the file and adjust as needed +> 0.5% +last 2 versions +Firefox ESR +not dead +# 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 @@ -// The file contents for the current environment will overwrite these during build. -// The build system defaults to the dev environment which uses `environment.ts`, but if you do -// `ng build --env=prod` then `environment.prod.ts` will be used instead. -// The list of which env maps to which file can be found in `.angular-cli.json`. +// This file can be replaced during build by using the `fileReplacements` array. +// `ng build ---prod` replaces `environment.ts` with `environment.prod.ts`. +// The list of file replacements can be found in `angular.json`. export const environment = { production: false }; + +/* + * In development mode, to ignore zone related error stack frames such as + * `zone.run`, `zoneDelegate.invokeTask` for easier debugging, you can + * import the following file, but please comment it out in production mode + * because it will have performance impact when throw error + */ +// import 'zone.js/dist/zone-error'; // Included with Angular CLI. diff --git a/src/index.html b/src/index.html index 45d94b1..44410e1 100644 --- a/src/index.html +++ b/src/index.html @@ -7,9 +7,8 @@ - {BLITZ_RESOURCES} -{BLITZ_TEMPLATE} + diff --git a/karma.conf.js b/src/karma.conf.js similarity index 68% rename from karma.conf.js rename to src/karma.conf.js index 4d9ab9d..b6e0042 100644 --- a/karma.conf.js +++ b/src/karma.conf.js @@ -1,27 +1,25 @@ // Karma configuration file, see link for more information -// https://karma-runner.github.io/0.13/config/configuration-file.html +// https://karma-runner.github.io/1.0/config/configuration-file.html module.exports = function (config) { config.set({ basePath: '', - frameworks: ['jasmine', '@angular/cli'], + frameworks: ['jasmine', '@angular-devkit/build-angular'], plugins: [ require('karma-jasmine'), require('karma-chrome-launcher'), require('karma-jasmine-html-reporter'), require('karma-coverage-istanbul-reporter'), - require('@angular/cli/plugins/karma') + require('@angular-devkit/build-angular/plugins/karma') ], - client:{ + client: { clearContext: false // leave Jasmine Spec Runner output visible in browser }, coverageIstanbulReporter: { - reports: [ 'html', 'lcovonly' ], + dir: require('path').join(__dirname, '../coverage'), + reports: ['html', 'lcovonly'], fixWebpackSourcePaths: true }, - angularCli: { - environment: 'dev' - }, reporters: ['progress', 'kjhtml'], port: 9876, colors: true, @@ -30,4 +28,4 @@ module.exports = function (config) { browsers: ['Chrome'], singleRun: false }); -}; +}; \ No newline at end of file diff --git a/src/main.ts b/src/main.ts new file mode 100644 index 0000000..91ec6da --- /dev/null +++ b/src/main.ts @@ -0,0 +1,12 @@ +import { enableProdMode } from '@angular/core'; +import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; + +import { AppModule } from './app/app.module'; +import { environment } from './environments/environment'; + +if (environment.production) { + enableProdMode(); +} + +platformBrowserDynamic().bootstrapModule(AppModule) + .catch(err => console.log(err)); diff --git a/src/polyfills.ts b/src/polyfills.ts index 7831e97..d310405 100644 --- a/src/polyfills.ts +++ b/src/polyfills.ts @@ -37,21 +37,39 @@ /** IE10 and IE11 requires the following for NgClass support on SVG elements */ // import 'classlist.js'; // Run `npm install --save classlist.js`. +/** IE10 and IE11 requires the following for the Reflect API. */ +// import 'core-js/es6/reflect'; + + /** Evergreen browsers require these. **/ -import 'core-js/es6/reflect'; +// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove. import 'core-js/es7/reflect'; /** - * Required to support Web Animations `@angular/animation`. - * Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation + * Web Animations `@angular/platform-browser/animations` + * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari. + * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0). **/ // import 'web-animations-js'; // Run `npm install --save web-animations-js`. +/** + * By default, zone.js will patch all possible macroTask and DomEvents + * user can disable parts of macroTask/DomEvents patch by setting following flags + */ + + // (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame + // (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick + // (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames + /* + * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js + * with the following flag, it will bypass `zone.js` patch for IE/Edge + */ +// (window as any).__Zone_enable_cross_context_check = true; /*************************************************************************************************** - * Zone JS is required by Angular itself. + * Zone JS is required by default for Angular itself. */ import 'zone.js/dist/zone'; // Included with Angular CLI. @@ -60,13 +78,3 @@ import 'zone.js/dist/zone'; // Included with Angular CLI. /*************************************************************************************************** * APPLICATION IMPORTS */ - -/** - * Date, currency, decimal and percent pipes. - * Needed for: All but Chrome, Firefox, Edge, IE11 and Safari 10 - */ -// import 'intl'; // Run `npm install --save intl`. -/** - * Need to import at least one locale-data with intl. - */ -// import 'intl/locale-data/jsonp/en'; diff --git a/src/test.ts b/src/test.ts index cd612ee..1631789 100644 --- a/src/test.ts +++ b/src/test.ts @@ -1,24 +1,14 @@ // This file is required by karma.conf.js and loads recursively all the .spec and framework files -import 'zone.js/dist/long-stack-trace-zone'; -import 'zone.js/dist/proxy.js'; -import 'zone.js/dist/sync-test'; -import 'zone.js/dist/jasmine-patch'; -import 'zone.js/dist/async-test'; -import 'zone.js/dist/fake-async-test'; +import 'zone.js/dist/zone-testing'; import { getTestBed } from '@angular/core/testing'; import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing'; -// Unfortunately there's no typing for the `__karma__` variable. Just declare it as any. -declare const __karma__: any; declare const require: any; -// Prevent Karma from running prematurely. -__karma__.loaded = function () {}; - // First, initialize the Angular testing environment. getTestBed().initTestEnvironment( BrowserDynamicTestingModule, @@ -28,5 +18,3 @@ getTestBed().initTestEnvironment( const context = require.context('./', true, /\.spec\.ts$/); // And load the modules. context.keys().map(context); -// Finally, start Karma to run the tests. -__karma__.start(); 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 @@ "extends": "../tsconfig.json", "compilerOptions": { "outDir": "../out-tsc/app", - "baseUrl": "./", "module": "es2015", "types": [] }, "exclude": [ - "test.ts", + "src/test.ts", "**/*.spec.ts" ] } diff --git a/src/tsconfig.spec.json b/src/tsconfig.spec.json index 63d89ff..8f7cede 100644 --- a/src/tsconfig.spec.json +++ b/src/tsconfig.spec.json @@ -2,16 +2,15 @@ "extends": "../tsconfig.json", "compilerOptions": { "outDir": "../out-tsc/spec", - "baseUrl": "./", "module": "commonjs", - "target": "es5", "types": [ "jasmine", "node" ] }, "files": [ - "test.ts" + "test.ts", + "polyfills.ts" ], "include": [ "**/*.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 @@ +{ + "extends": "../tslint.json", + "rules": { + "directive-selector": [ + true, + "attribute", + "app", + "camelCase" + ], + "component-selector": [ + true, + "element", + "app", + "kebab-case" + ] + } +} 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 @@ -/* SystemJS module definition */ -declare var module: NodeModule; -interface NodeModule { - id: string; -} diff --git a/tsconfig.json b/tsconfig.json index 1f9b558..ef44e28 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,7 @@ { "compileOnSave": false, "compilerOptions": { + "baseUrl": "./", "outDir": "./dist/out-tsc", "sourceMap": true, "declaration": false, @@ -12,7 +13,7 @@ "node_modules/@types" ], "lib": [ - "es2016", + "es2017", "dom" ] } diff --git a/tslint.json b/tslint.json index 0db5751..3ea984c 100644 --- a/tslint.json +++ b/tslint.json @@ -11,11 +11,14 @@ "check-space" ], "curly": true, + "deprecation": { + "severity": "warn" + }, "eofline": true, "forin": true, "import-blacklist": [ true, - "rxjs" + "rxjs/Rx" ], "import-spacing": true, "indent": [ @@ -103,7 +106,6 @@ "variable-declaration": "nospace" } ], - "typeof-compare": true, "unified-signatures": true, "variable-name": false, "whitespace": [ @@ -114,18 +116,7 @@ "check-separator", "check-type" ], - "directive-selector": [ - true, - "attribute", - "app", - "camelCase" - ], - "component-selector": [ - true, - "element", - "app", - "kebab-case" - ], + "no-output-on-prefix": true, "use-input-property-decorator": true, "use-output-property-decorator": true, "use-host-property-decorator": true, @@ -134,9 +125,6 @@ "use-life-cycle-interface": true, "use-pipe-transform-interface": true, "component-class-suffix": true, - "directive-class-suffix": true, - "no-access-missing-member": true, - "templates-use-public": true, - "invoke-injectable": true + "directive-class-suffix": true } } From 38a13cb8e476a660d3dd90351d86757e4977e908 Mon Sep 17 00:00:00 2001 From: Kraig Keller Date: Fri, 10 Aug 2018 12:18:58 -0400 Subject: [PATCH 2/5] Update README.md --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index b18719e..d8758b9 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ # {BLITZ_PROJECT_SLUG} -# AngularTemplate - This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 6.0.8. ## Development server From 4e9056531627e3999f779cd210f10ffae803ae7a Mon Sep 17 00:00:00 2001 From: Kraig Keller Date: Fri, 10 Aug 2018 12:20:23 -0400 Subject: [PATCH 3/5] Update index.html --- src/index.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/index.html b/src/index.html index 44410e1..e231508 100644 --- a/src/index.html +++ b/src/index.html @@ -7,8 +7,9 @@ + {BLITZ_RESOURCES} - +{BLITZ_TEMPLATE} From 3c4d531614afdee9cfcdac2721611d9c8bf8b91e Mon Sep 17 00:00:00 2001 From: Kraig Keller Date: Fri, 10 Aug 2018 12:20:44 -0400 Subject: [PATCH 4/5] Update index.html --- src/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.html b/src/index.html index e231508..45d94b1 100644 --- a/src/index.html +++ b/src/index.html @@ -7,7 +7,7 @@ - {BLITZ_RESOURCES} + {BLITZ_RESOURCES} {BLITZ_TEMPLATE} From 1eb58dd5e3474024418c436b84e45e5d0d6cbb77 Mon Sep 17 00:00:00 2001 From: Kraig Keller Date: Tue, 14 Aug 2018 11:02:17 -0400 Subject: [PATCH 5/5] Delete README copy.md --- README copy.md | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 README copy.md diff --git a/README copy.md b/README copy.md deleted file mode 100644 index bd6ff1c..0000000 --- a/README copy.md +++ /dev/null @@ -1,27 +0,0 @@ -# AngularTemplate - -This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 6.0.8. - -## Development server - -Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. - -## Code scaffolding - -Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. - -## Build - -Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build. - -## Running unit tests - -Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). - -## Running end-to-end tests - -Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/). - -## Further help - -To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).