Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

Commit

Permalink
[rc] Added support for Angular 9, TypeScript ~3.6 (#181)
Browse files Browse the repository at this point in the history
  • Loading branch information
Blackbaud-SteveBrush committed Feb 12, 2020
1 parent 83c99f3 commit b4baae4
Show file tree
Hide file tree
Showing 13 changed files with 4,221 additions and 4,952 deletions.
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"prefer-arrow-callback": "off",
"prefer-const": "off",
"prefer-destructuring": "off",
"prefer-object-spread": "off",
"prefer-rest-params": "off",
"prefer-spread": "off",
"prefer-template": "off",
Expand Down
6 changes: 4 additions & 2 deletions cli/utils/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,16 @@ function browser(argv, skyPagesConfig, stats, port) {

logger.info(`Launching Local URL: ${localUrl}`);
open(localUrl, {
app: argv.browser
app: argv.browser,
url: true
});
break;

case 'host':
logger.info(`Launching Host URL: ${hostUrl}`);
open(hostUrl, {
app: argv.browser
app: argv.browser,
url: true
});
break;

Expand Down
7 changes: 6 additions & 1 deletion cli/utils/run-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,12 @@ function writeTSConfig(skyPagesConfig) {
'**/*.fixture.ts'
],
'compileOnSave': false,
'buildOnSave': false
'buildOnSave': false,
'angularCompilerOptions': {
'enableIvy': false,
'fullTemplateTypeCheck': true,
'strictInjectionParameters': true
}
};

fs.writeJSONSync(skyPagesConfigUtil.spaPathTempSrc('tsconfig.json'), config);
Expand Down
2 changes: 1 addition & 1 deletion config/protractor/protractor-dev.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ let config = {
} else {

const url = 'https://github.com/blackbaud/skyux-sdk-template';
const branch = 'master';
const branch = 'rc-4.0.0';

console.log('Running command using full install.');
common.rimrafPromise(common.tmp)
Expand Down
6 changes: 5 additions & 1 deletion config/webpack/common.webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,12 @@ function getWebpackConfig(skyPagesConfig, argv = {}) {
skyux: skyPagesConfig.skyux
}),

// The `ngDevMode` property is defined by Angular CLI during a production build.
// We need to set it to 'false' to get the build to pass.
// See: https://github.com/angular/angular/issues/31595#issuecomment-519083266
new webpack.DefinePlugin({
'skyPagesConfig': JSON.stringify(skyPagesConfig)
'skyPagesConfig': JSON.stringify(skyPagesConfig),
'ngDevMode': false
}),

new LoaderOptionsPlugin({
Expand Down
12 changes: 0 additions & 12 deletions lib/sky-pages-module-generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ function getSource(skyAppConfig) {
let nodeModuleImports = [
`import { NgModule } from '@angular/core';`,
`import { CommonModule } from '@angular/common';`,
`import { HttpModule } from '@angular/http';`,
`import { FormsModule, ReactiveFormsModule } from '@angular/forms';`,
`import { RouterModule } from '@angular/router';`,
`import { SkyAppAssetsService } from '@skyux/assets';`,
Expand All @@ -94,7 +93,6 @@ function getSource(skyAppConfig) {

let runtimeModuleImports = [
'CommonModule',
'HttpModule',
'FormsModule',
'ReactiveFormsModule',
'AppExtrasModule',
Expand Down Expand Up @@ -124,16 +122,6 @@ function getSource(skyAppConfig) {

runtimeProviders.push(authTokenProvider);

if (skyAppConfig.skyux.auth) {
nodeModuleImports.push(`import { XHRBackend, RequestOptions } from '@angular/http';`);
nodeModuleImports.push(`import { SkyAuthHttp } from '@skyux/http';`);
runtimeProviders.push(`{
provide: SkyAuthHttp,
useClass: SkyAuthHttp,
deps: [XHRBackend, RequestOptions, SkyAuthTokenProvider, SkyAppConfig]
}`);
}

if (skyAppConfig.skyux.help) {
nodeModuleImports.push(`import { BBHelpModule } from '@blackbaud/skyux-lib-help';`);
runtimeModuleImports.push('BBHelpModule');
Expand Down
Loading

0 comments on commit b4baae4

Please sign in to comment.