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

Commit 62123dc

Browse files
Bobby EarlBlackbaud-PaulCrowder
Bobby Earl
authored andcommitted
Merging rc branch into master (#213)
* Update angular (#189) * Updated dependencies * Updated skyux2 version * Updated dependencies * Using template branch for testing * Reverted protractor config * Pointing to dev branch for local testing * Updated package json * Using explicit types * Updated version of skyux * Updated dependencies * Fixed linting errors * Added fontfaceobserver to types * Fixed tslint errors * Fixed tslint errors * Ensure that the files are not directories * Update tests for file processor * Update plugin-file-processor.js * Update plugin-file-processor.spec.js * Updated version of skyux * Updated config * Added specific version of firefox * Updated tsconfig * Updating travis version * Updated version of firefox * Updated directconnect * Updated protractor * Added firfox launcher * Removed directConnect * Reverting back to directConnect * Removed firefox * Re-added firefox * Accepting insecure certs * Enabled directconnect * use chrome with chromOptions in protractor-dev.conf.js * add sources to travis.yml * add dist: trusty * Removed tsconfig paths * Update typescript-loader * Simpler method for avoiding directories * As ts-node option and fix e2e test * updates for rc.0 release (#190) * Omnibar config (#193) * Using omnibarConfigMap for envid/svcid * Fixing implicit any * Fixed codelyzer path (#192) * Fixed codelyzer path * Added node_modules to excludes * Readded node_modules * Ignore public directory when generating components (#187) * Added ignore pattern to component generator * Component generator should ignore public folder * Updated ignore pattern * Plugin File Processor should not check directories (#186) * Do not check directories * Added nodir option * Updated CHANGELOG.md and package.json for 1.0.0-rc.1 (#194) * Updated template branch, bug fix for component pattern (#195) * Updated branch to master * Fixed bug with ignore components pattern * Updated unit tests * Release 1.0.0 rc.2 (#196) * Update CHANGELOG.md * Update package.json * Remove extra s. (#197) * Fixed type error, updated SKY UX (#199) * Fixed type error * Updated skyux * Updated skyux * Release 1.0.0 rc.3 (#200) * Fixed type error * Updated skyux * Updated skyux * Update package.json * Update CHANGELOG.md * Param functionality (#201) * Fixed typo in OmnibarConfigMap. Allowing querystring params to be case insensitive * Test cleanup * Removed unnecessary mapping functionality * Fixed `skyux test/watch` performance (#202) * Removed tslint-loader * Created custom sky-tslint loader * Release 1.0.0-rc.4 (#207) * Updated changelog, version * Update CHANGELOG.md * Update CHANGELOG.md * Added to skyux builder (#204) * Updated package dependencies (#208) * Updated package dependencies * Update skyux version * use appropriate template branch * Add hash routing option for easy mode. (#206) * Updates rc5 (#209) * Updates for rc.5 * Capitalize Angular. (#211) * Wrote failing test. Then made config property public for template (#212)
1 parent a4294b9 commit 62123dc

35 files changed

+495
-155
lines changed

.travis.yml

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
language: node_js
22
sudo: required
3+
dist: trusty
4+
5+
addons:
6+
apt:
7+
sources:
8+
- google-chrome
9+
packages:
10+
- google-chrome-stable
311

412
branches:
513
only:

CHANGELOG.md

+31
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,34 @@
1+
# 1.0.0-rc.5 (2017-07-03)
2+
3+
- Added web-animations polyfill to support Angular animations in more browsers. [#204](https://github.com/blackbaud/skyux-builder/pull/204)
4+
- Added support for Angular v4.2.5 and SKY UX 2.0.0-rc.4. [#208](https://github.com/blackbaud/skyux-builder/pull/208)
5+
- Added support for `useHashRouting` in `skyuxconfig.json`. [#206](https://github.com/blackbaud/skyux-builder/pull/206)
6+
7+
# 1.0.0-rc.4 (2017-06-29)
8+
9+
- Added support for SKY UX 2.0.0-rc.2.
10+
- Fixed typo when passing `svcid` to `auth-client`. [#201](https://github.com/blackbaud/skyux-builder/pull/201)
11+
- Improved execution time for `skyux test` and `skyux watch`. [#202](https://github.com/blackbaud/skyux-builder/pull/202)
12+
13+
# 1.0.0-rc.3 (2017-06-23)
14+
15+
- Added support for SKY UX 2.0.0-rc.1.
16+
- Fixed a typings bug with `SkyAuthHttp`.
17+
18+
# 1.0.0-rc.2 (2017-06-21)
19+
20+
- Fixed invalid glob pattern (and unit tests) for ignored auto-generated components.
21+
22+
# 1.0.0-rc.1 (2017-06-20)
23+
24+
- Ignoring `src/app/public` directory when auto-generating components. [#187](https://github.com/blackbaud/skyux-builder/pull/187)
25+
- Updated path and rules related to Codelyzer. [#192](https://github.com/blackbaud/skyux-builder/pull/192)
26+
- Correctly setting `envId` and `svcId` for `auth-client`. [#193](https://github.com/blackbaud/skyux-builder/pull/193)
27+
28+
# 1.0.0-rc.0 (2017-06-16)
29+
30+
- Added support for Angular v4.1.3 and SKY UX 2.0.0-rc.0.
31+
132
# 1.0.0-beta.33 (2017-06-15)
233

334
- Bugfix to stop `SkyAuthHttp` from adding duplicate `envid` or `svcid` params. [#182](https://github.com/blackbaud/skyux-builder/pull/182)

config/protractor/protractor-dev.conf.js

+18-4
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,22 @@ let config = {
1515
defaultTimeoutInterval: 480000 // git clone, npm install, and skyux build can be slow
1616
},
1717
onPrepare: () => {
18-
19-
const url = 'https://github.com/blackbaud/skyux-template';
2018
jasmine.getEnv().addReporter(new SpecReporter());
2119

2220
return new Promise((resolve, reject) => {
21+
const url = 'https://github.com/blackbaud/skyux-template';
22+
const branch = 'update-angular425';
2323
common.exec(`rm`, [`-rf`, `${common.tmp}`])
24-
.then(() => common.exec(`git`, [`clone`, `${url}`, `${common.tmp}`]))
24+
25+
.then(() => common.exec(`git`, [
26+
`clone`,
27+
`-b`,
28+
branch,
29+
`--single-branch`,
30+
url,
31+
common.tmp
32+
]))
33+
2534
.then(() => common.exec(`npm`, [`i`, '--only=prod'], common.cwdOpts))
2635
.then(() => common.exec(`npm`, [`i`, `../`], common.cwdOpts))
2736
.then(resolve)
@@ -44,7 +53,12 @@ let config = {
4453

4554
// In CI, use firefox
4655
if (process.env.TRAVIS) {
47-
config.capabilities = { browserName: 'firefox' };
56+
config.capabilities = {
57+
browserName: 'chrome',
58+
'chromeOptions': {
59+
'args': ['--disable-extensions --ignore-certificate-errors']
60+
}
61+
};
4862
}
4963

5064
exports.config = merge(commonConfig.config, config);

config/protractor/protractor.conf.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ exports.config = {
2929
},
3030
useAllAngular2AppRoots: true,
3131
beforeLaunch: function () {
32-
require('ts-node').register();
32+
require('ts-node').register({ ignore: false });
3333
},
3434

3535
onPrepare: function () {

config/sky-pages/sky-pages.config.js

+1
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ module.exports = {
7171
},
7272
command: command,
7373
componentsPattern: '**/*.component.ts',
74+
componentsIgnorePattern: './public/**/*',
7475
includeRouteModule: true,
7576
routesPattern: '**/index.html',
7677
runtimeAlias: 'sky-pages-internal/runtime',

config/webpack/build.webpack.config.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ function getWebpackConfig(skyPagesConfig) {
2626
// Ignore the "Cannot find module" error that occurs when referencing
2727
// an aliased file. Webpack will still throw an error when a module
2828
// cannot be resolved via a file path or alias.
29-
ignoreDiagnostics: [2307]
29+
ignoreDiagnostics: [2307],
30+
transpileOnly: true
3031
}
3132
},
3233
{

config/webpack/common.webpack.config.js

+2-5
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ const ProgressBarPlugin = require('progress-bar-webpack-plugin');
77
const LoaderOptionsPlugin = require('webpack/lib/LoaderOptionsPlugin');
88
const CommonsChunkPlugin = require('webpack/lib/optimize/CommonsChunkPlugin');
99
const ContextReplacementPlugin = require('webpack/lib/ContextReplacementPlugin');
10-
const ForkCheckerPlugin = require('awesome-typescript-loader').ForkCheckerPlugin;
1110
const ProcessExitCode = require('../../plugin/process-exit-code');
1211
const skyPagesConfigUtil = require('../sky-pages/sky-pages.config');
1312
const aliasBuilder = require('./alias-builder');
@@ -107,8 +106,6 @@ function getWebpackConfig(skyPagesConfig) {
107106
]
108107
},
109108
plugins: [
110-
new ForkCheckerPlugin(),
111-
112109
// Some properties are required on the root object passed to HtmlWebpackPlugin
113110
new HtmlWebpackPlugin({
114111
template: skyPagesConfig.runtime.app.template,
@@ -136,8 +133,8 @@ function getWebpackConfig(skyPagesConfig) {
136133

137134
new ContextReplacementPlugin(
138135
// The (\\|\/) piece accounts for path separators in *nix and Windows
139-
/angular(\\|\/)core(\\|\/)(esm(\\|\/)src|src)(\\|\/)linker/,
140-
spaPath('src'), // location of your src
136+
/angular(\\|\/)core(\\|\/)@angular/,
137+
spaPath('src'),
141138
{}
142139
),
143140

config/webpack/serve.webpack.config.js

+5-10
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ const LoaderOptionsPlugin = require('webpack/lib/LoaderOptionsPlugin');
1313
const skyPagesConfigUtil = require('../sky-pages/sky-pages.config');
1414
const hostUtils = require('../../utils/host-utils');
1515

16-
const moduleLoader = skyPagesConfigUtil.outPath('loader', 'sky-pages-module');
17-
1816
/**
1917
* Returns the querystring base for parameters allowed to be passed through.
2018
* PLEASE NOTE: The method is nearly duplicated in `runtime/params.ts`.
@@ -120,11 +118,6 @@ function getWebpackConfig(argv, skyPagesConfig) {
120118
watch: true,
121119
module: {
122120
rules: [
123-
{
124-
enforce: 'pre',
125-
test: /sky-pages\.module\.ts$/,
126-
loader: moduleLoader
127-
},
128121
{
129122
test: /\.ts$/,
130123
use: [
@@ -134,15 +127,17 @@ function getWebpackConfig(argv, skyPagesConfig) {
134127
// Ignore the "Cannot find module" error that occurs when referencing
135128
// an aliased file. Webpack will still throw an error when a module
136129
// cannot be resolved via a file path or alias.
137-
ignoreDiagnostics: [2307]
130+
ignoreDiagnostics: [2307],
131+
transpileOnly: true
138132
}
139133
},
140134
{
141135
loader: 'angular2-template-loader'
142136
}
143-
]
137+
],
138+
exclude: [/\.e2e\.ts$/]
144139
}
145-
],
140+
]
146141
},
147142
devServer: {
148143
compress: true,

config/webpack/test.webpack.config.js

+36-50
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,29 @@
11
/*jslint node: true */
22
'use strict';
33

4-
function getWebpackConfig(skyPagesConfig, argv) {
5-
6-
function spaPath() {
7-
return skyPagesConfigUtil.spaPath.apply(skyPagesConfigUtil, arguments);
8-
}
9-
10-
function outPath() {
11-
return skyPagesConfigUtil.outPath.apply(skyPagesConfigUtil, arguments);
12-
}
13-
14-
const path = require('path');
4+
const path = require('path');
5+
const DefinePlugin = require('webpack/lib/DefinePlugin');
6+
const LoaderOptionsPlugin = require('webpack/lib/LoaderOptionsPlugin');
7+
const ContextReplacementPlugin = require('webpack/lib/ContextReplacementPlugin');
8+
const ProcessExitCode = require('../../plugin/process-exit-code');
9+
const SkyTsLintCheckerPlugin = require('../../loader/sky-tslint/checker-plugin');
10+
const skyPagesConfigUtil = require('../sky-pages/sky-pages.config');
11+
const aliasBuilder = require('./alias-builder');
12+
13+
function spaPath() {
14+
return skyPagesConfigUtil.spaPath.apply(skyPagesConfigUtil, arguments);
15+
}
1516

16-
const DefinePlugin = require('webpack/lib/DefinePlugin');
17-
const LoaderOptionsPlugin = require('webpack/lib/LoaderOptionsPlugin');
18-
const ContextReplacementPlugin = require('webpack/lib/ContextReplacementPlugin');
19-
const ProcessExitCode = require('../../plugin/process-exit-code');
20-
const skyPagesConfigUtil = require('../sky-pages/sky-pages.config');
21-
const aliasBuilder = require('./alias-builder');
17+
function outPath() {
18+
return skyPagesConfigUtil.outPath.apply(skyPagesConfigUtil, arguments);
19+
}
2220

21+
function getWebpackConfig(skyPagesConfig, argv) {
2322
const runCoverage = (!argv || argv.coverage !== false);
2423
skyPagesConfig.runtime.includeRouteModule = false;
2524

2625
const ENV = process.env.ENV = process.env.NODE_ENV = 'test';
2726
const srcPath = path.resolve(process.cwd(), 'src', 'app');
28-
const moduleLoader = outPath('loader', 'sky-pages-module');
2927

3028
const resolves = [
3129
process.cwd(),
@@ -53,7 +51,7 @@ function getWebpackConfig(skyPagesConfig, argv) {
5351
extensions: [
5452
'.js',
5553
'.ts'
56-
],
54+
]
5755
},
5856

5957
module: {
@@ -66,17 +64,7 @@ function getWebpackConfig(skyPagesConfig, argv) {
6664
{
6765
enforce: 'pre',
6866
test: /sky-pages\.module\.ts$/,
69-
loader: moduleLoader
70-
},
71-
{
72-
enforce: 'pre',
73-
test: /\.ts$/,
74-
loader: 'tslint-loader',
75-
exclude: excludes,
76-
options: {
77-
emitErrors: true,
78-
failOnHint: true
79-
}
67+
loader: outPath('loader', 'sky-pages-module')
8068
},
8169
{
8270
enforce: 'pre',
@@ -87,7 +75,13 @@ function getWebpackConfig(skyPagesConfig, argv) {
8775
{
8876
enforce: 'pre',
8977
loader: outPath('loader', 'sky-processor', 'preload'),
90-
exclude: /node_modules/
78+
exclude: excludes
79+
},
80+
{
81+
enforce: 'pre',
82+
test: /\.ts$/,
83+
loader: outPath('loader', 'sky-tslint'),
84+
exclude: excludes
9185
},
9286
{
9387
test: /\.ts$/,
@@ -98,7 +92,9 @@ function getWebpackConfig(skyPagesConfig, argv) {
9892
// Ignore the "Cannot find module" error that occurs when referencing
9993
// an aliased file. Webpack will still throw an error when a module
10094
// cannot be resolved via a file path or alias.
101-
ignoreDiagnostics: [2307]
95+
ignoreDiagnostics: [2307],
96+
// Linting is handled by the sky-tslint loader.
97+
transpileOnly: true
10298
}
10399
},
104100
{
@@ -108,19 +104,12 @@ function getWebpackConfig(skyPagesConfig, argv) {
108104
exclude: [/\.e2e\.ts$/]
109105
},
110106
{
111-
test: /\.css$/,
112-
loader: 'raw-loader'
107+
test: /\.s?css$/,
108+
use: ['raw-loader', 'sass-loader']
113109
},
114110
{
115111
test: /\.html$/,
116112
loader: 'raw-loader'
117-
},
118-
{
119-
test: /\.scss$/,
120-
use: [
121-
'raw-loader',
122-
'sass-loader'
123-
]
124113
}
125114
]
126115
},
@@ -130,13 +119,7 @@ function getWebpackConfig(skyPagesConfig, argv) {
130119
debug: true,
131120
options: {
132121
context: __dirname,
133-
skyPagesConfig: skyPagesConfig,
134-
tslint: {
135-
emitErrors: false,
136-
failOnHint: false,
137-
resourcePath: 'src',
138-
typeCheck: true
139-
}
122+
skyPagesConfig: skyPagesConfig
140123
}
141124
}),
142125

@@ -154,11 +137,14 @@ function getWebpackConfig(skyPagesConfig, argv) {
154137

155138
new ContextReplacementPlugin(
156139
// The (\\|\/) piece accounts for path separators in *nix and Windows
157-
/angular(\\|\/)core(\\|\/)(esm(\\|\/)src|src)(\\|\/)linker/,
158-
skyPagesConfigUtil.spaPath('src'), // location of your src
140+
/angular(\\|\/)core(\\|\/)@angular/,
141+
skyPagesConfigUtil.spaPath('src'),
159142
{}
160143
),
161144

145+
// Handles watch-mode maintenance for TSLint.
146+
new SkyTsLintCheckerPlugin(),
147+
162148
// Webpack 2 behavior does not correctly return non-zero exit code.
163149
new ProcessExitCode()
164150
]

e2e/skyux-serve.e2e-spec.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,12 @@ describe('skyux serve', () => {
6161
common.bindServe().then(() => {
6262
browser.get(url)
6363
.then(() => {
64-
expect($$('#ts').getText()).toEqual(timestamp);
65-
fs.writeFileSync(file, content, 'utf8');
66-
done();
64+
$$('#ts').getText().then((tsResult) => {
65+
expect(tsResult[0]).toEqual(timestamp.toString());
66+
fs.writeFileSync(file, content, 'utf8');
67+
done();
68+
});
69+
6770
})
6871
.catch(err => {
6972
console.log(err);

lib/plugin-file-processor.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ const skyPagesConfigUtil = require('../config/sky-pages/sky-pages.config');
88
const processor = require('../loader/sky-processor');
99

1010
const processFiles = (skyPagesConfig) => {
11-
const filePaths = glob.sync(skyPagesConfigUtil.spaPathTempSrc('app', '**', '*.*'));
11+
const filePaths = glob.sync(skyPagesConfigUtil.spaPathTempSrc('app', '**', '*.*'), {
12+
nodir: true
13+
});
1214

1315
filePaths.forEach(filePath => {
1416
const contents = fs.readFileSync(filePath);

lib/sky-pages-component-generator.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,11 @@ function generateComponents(skyAppConfig) {
4444
// Prepend the alias and remove the file extension,
4545
// since the file extension causes a TypeScript error.
4646
return glob
47-
.sync(path.join(skyAppConfig.runtime.srcPath, skyAppConfig.runtime.componentsPattern))
47+
.sync(path.join(skyAppConfig.runtime.srcPath, skyAppConfig.runtime.componentsPattern), {
48+
ignore: [
49+
path.join(skyAppConfig.runtime.srcPath, skyAppConfig.runtime.componentsIgnorePattern)
50+
]
51+
})
4852
.map(file => ({
4953
importPath: skyAppConfig.runtime.spaPathAlias + '/' + file.replace(/\.[^\.]+$/, ''),
5054
componentName: extractComponentName(file)

lib/sky-pages-module-generator.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ BBAuth.mock = true;
101101
break;
102102
}
103103

104+
let useHashRouting = skyAppConfig.skyux.useHashRouting === true;
105+
104106
let moduleSource =
105107
`${useMockAuth}
106108
import '${skyAppConfig.runtime.skyPagesOutAlias}/src/main';
@@ -144,7 +146,7 @@ ${routes.definitions}
144146
// Routes need to be defined after their corresponding components
145147
const appRoutingProviders: any[] = [${routes.providers}];
146148
const routes: Routes = ${routes.declarations};
147-
const routing = RouterModule.forRoot(routes);
149+
const routing = RouterModule.forRoot(routes, { useHash: ${useHashRouting} });
148150
149151
${enableProdMode}
150152

0 commit comments

Comments
 (0)