Skip to content

Commit

Permalink
Merge RC into master (blackbaud#1)
Browse files Browse the repository at this point in the history
* RC > Removed all references to SKY UX, changed dependency structure (blackbaud#419)

* RC > Updated TSLint rules (blackbaud#422)

* Removed legacy omnibar (blackbaud#420)

* RC > Config params as an object; always decode URL params (blackbaud#421)

* RC > Always provide `envId` regardless of permission scope (blackbaud#427)

* RC > Allow SPAs to bundle stylesheets that live outside of `src/app` (blackbaud#428)

* RC > Adjusted dev dependencies (blackbaud#429)

* RC > Fixed ts-helpers for build (blackbaud#434)

* RC > Update from master (blackbaud#425)

* RC > Removed global RxJS imports (blackbaud#438)

* RC > Replaced error component with iframe (blackbaud#436)

* RC > Removed SKY CSS import (blackbaud#443)

* RC > Instrument different directory for libraries (blackbaud#448)

* RC > Do not ignore Protractor Error 199 (blackbaud#435)

* RC > Merged master (blackbaud#444)

* RC > Merge master (blackbaud#454)

* RC > Upgrade Angular, RxJS, TypeScript (blackbaud#495)

* RC > Moved auth-client to peer dependency; fixed `skyux watch` (blackbaud#503)

* Disabled webpack host check (blackbaud#505)

* Replaced JSHint with ESLint. (blackbaud#506)

* RC > Merge master (blackbaud#508)

* RC > Changed name of NPM package (blackbaud#501)
  • Loading branch information
Blackbaud-SteveBrush authored and Blackbaud-PaulCrowder committed Jan 16, 2019
1 parent e29d5a3 commit 8e51f26
Show file tree
Hide file tree
Showing 107 changed files with 1,020 additions and 1,024 deletions.
42 changes: 42 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"extends": "airbnb-base",
"env": {
"jasmine": true
},
"rules": {
"arrow-body-style": "off",
"arrow-parens": "off",
"comma-dangle": "off",
"consistent-return": "off",
"default-case": "off",
"func-names": "off",
"global-require": "off",
"import/newline-after-import": "off",
"import/no-dynamic-require": "off",
"import/order": "off",
"lines-around-directive": "off",
"no-console": "off",
"no-multi-assign": "off",
"no-param-reassign": "off",
"no-plusplus": "off",
"no-use-before-define": "off",
"no-useless-escape": "off",
"object-curly-newline": "off",
"object-shorthand": "off",
"operator-linebreak": "off",
"padded-blocks": "off",
"prefer-arrow-callback": "off",
"prefer-const": "off",
"prefer-destructuring": "off",
"prefer-rest-params": "off",
"prefer-spread": "off",
"prefer-template": "off",
"quote-props": "off",
"quotes": ["error", "single", {
"allowTemplateLiterals": true,
"avoidEscape": true
}],
"spaced-comment": "off",
"strict": "off"
}
}
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
lts/carbon
lts/dubnium
4 changes: 0 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ env:
- TEST_COMMAND=coverage
- TEST_COMMAND=e2e

node_js:
- "8"
- "6"

script: "npm run lint && npm run $TEST_COMMAND"

addons:
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 1.30.0 (2018-11-26)

- Added `SkyAuthHttpClientModule` that can be used in conjunction with Angular's `HttpClient` to make authenticated calls to services backed by Blackbaud ID. (blackbaud/skyux-http#11)[https://github.com/blackbaud/skyux-http/pull/11]
- Added `SkyAuthHttpClientModule` that can be used in conjunction with Angular's `HttpClient` to make authenticated calls to services backed by Blackbaud ID. [blackbaud/skyux-http#11](https://github.com/blackbaud/skyux-http/pull/11)
- Fixed coverage reports to accurately match against configured thresholds. [#499](https://github.com/blackbaud/skyux-builder/pull/499)

# 1.29.0 (2018-11-09)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# @blackbaud/skyux-builder
# @skyux-sdk/builder

[![npm](https://img.shields.io/npm/v/@blackbaud/skyux-builder.svg)](https://www.npmjs.com/package/@blackbaud/skyux-builder)
[![npm](https://img.shields.io/npm/v/@skyux-sdk/builder.svg)](https://www.npmjs.com/package/@skyux-sdk/builder)
[![status](https://travis-ci.org/blackbaud/skyux-builder.svg?branch=master)](https://travis-ci.org/blackbaud/skyux-builder)

Builds the output of a SKY UX application. See [skyux-cli](https://github.com/blackbaud/skyux-cli) for more information.
6 changes: 4 additions & 2 deletions cli/build-public-library.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function getEntryPointFiles() {
}

function writeTSConfig() {
var config = {
const config = {
'compilerOptions': {
'target': 'es5',
'module': 'es2015',
Expand All @@ -66,6 +66,8 @@ function writeTSConfig() {
'experimentalDecorators': true,
'allowSyntheticDefaultImports': true,
'sourceMap': true,
'importHelpers': true,
'noEmitHelpers': true,
'noImplicitAny': true,
'declaration': true,
'skipLibCheck': true,
Expand All @@ -81,7 +83,7 @@ function writeTSConfig() {
'rootDir': skyPagesConfigUtil.spaPathTemp(),
'baseUrl': '.',
'paths': {
'@blackbaud/skyux-builder/*': [
'@skyux-sdk/builder/*': [
'*'
],
'.skypageslocales/*': [
Expand Down
6 changes: 0 additions & 6 deletions cli/e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,6 @@ function killServers(exitCode) {
seleniumServer = null;
}

// Catch protractor's "Kitchen Sink" error.
if (exitCode === 199) {
logger.warn('Supressing protractor\'s "kitchen sink" error 199');
exitCode = 0;
}

server.stop();
logger.info(`Execution Time: ${(new Date().getTime() - start) / 1000} seconds`);
logger.info(`Exiting process with ${exitCode}`);
Expand Down
2 changes: 1 addition & 1 deletion cli/generate.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ function generateComponentSpec(pathParts, fileName, name, nameSnakeCase, force)
import {
expect,
SkyAppTestModule
} from '@blackbaud/skyux-builder/runtime/testing/browser';
} from '@skyux-sdk/testing';
import {
${name}
Expand Down
2 changes: 1 addition & 1 deletion cli/pact.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ function pact(command, argv) {
.on('connect', () => {
logger
.info(
`Pact proxy server successfully started on http://localhost:${ports[ports.length - 1]}`
`Pact proxy server successfully started on http://localhost:${ports[ports.length - 1]}`
);
})
.listen(ports[ports.length - 1], 'localhost');
Expand Down
10 changes: 7 additions & 3 deletions cli/utils/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
'use strict';

const util = require('util');
const open = require('open');
const open = require('opn');
const logger = require('@blackbaud/skyux-logger');
const hostUtils = require('../../utils/host-utils');
const skyPagesConfigUtil = require('../../config/sky-pages/sky-pages.config');
Expand Down Expand Up @@ -79,12 +79,16 @@ function browser(argv, skyPagesConfig, stats, port) {
localUrl += queryStringBase;

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

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

default:
Expand Down
61 changes: 37 additions & 24 deletions cli/utils/run-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,44 +16,40 @@ const runCompiler = require('./run-compiler');
const tsLinter = require('./ts-linter');

function writeTSConfig() {
var config = {
const config = {
'compilerOptions': {
'target': 'es5',
'module': 'es2015',
'moduleResolution': 'node',
'emitDecoratorMetadata': true,
'experimentalDecorators': true,
'sourceMap': true,
'importHelpers': true,
'noEmitHelpers': true,
'noImplicitAny': true,
'rootDir': '.',
'inlineSources': true,
'declaration': true,
'skipLibCheck': true,
'lib': [
'es2015',
'dom'
],
'types': [
'jasmine',
'node'
'typeRoots': [
skyPagesConfigUtil.spaPath('node_modules/@types')
]
},
'files': [
'./app/app.module.ts'
'include': [
skyPagesConfigUtil.outPath('runtime', '**', '*'),
skyPagesConfigUtil.outPath('src', '**', '*'),
skyPagesConfigUtil.spaPathTempSrc('**', '*')
],
'exclude': [
'node_modules',
skyPagesConfigUtil.outPath('node_modules'),
'**/*.spec.ts'
],
'compileOnSave': false,
'buildOnSave': false,
'angularCompilerOptions': {
'debug': true,
'genDir': './ngfactory',
'skipMetadataEmit': true
}
'buildOnSave': false
};

fs.writeJSONSync(skyPagesConfigUtil.spaPathTempSrc('tsconfig.json'), config);
Expand All @@ -69,15 +65,11 @@ function stageAot(skyPagesConfig, assetsBaseUrl, assetsRel) {
// Node package name rather than a local path; otherwise TypeScript will treat them as
// different types and Angular will throw an error when trying to inject an instance
// of a class (such as SkyAuthHttp) by its type.
runtimeAlias: '@blackbaud/skyux-builder/runtime',
runtimeAlias: '@skyux-sdk/builder/runtime',
useTemplateUrl: true
}
};

if (skyPagesConfig && skyPagesConfig.skyux && skyPagesConfig.skyux.importPath) {
skyPagesConfigOverrides.runtime.skyuxPathAlias = '../../' + skyPagesConfig.skyux.importPath;
}

const spaPathTempSrc = skyPagesConfigUtil.spaPathTempSrc();

fs.ensureDirSync(spaPathTempSrc);
Expand All @@ -92,7 +84,23 @@ function stageAot(skyPagesConfig, assetsBaseUrl, assetsRel) {
// before writing the file to disk.
skyPagesModuleSource = assetsProcessor.processAssets(
skyPagesModuleSource,
assetsProcessor.getAssetsUrl(skyPagesConfig, assetsBaseUrl, assetsRel)
assetsProcessor.getAssetsUrl(skyPagesConfig, assetsBaseUrl, assetsRel),
(filePathWithHash, physicalFilePath) => {

// File contents are not respected by @ngtools/webpack,
// so we need to write the locale files ourselves.
// See: https://github.com/angular/angular-cli/issues/6701
// See: https://github.com/angular/angular-cli/issues/8870
const path = require('path');
const newPath = path.resolve(
skyPagesConfigUtil.spaPath('dist'),
filePathWithHash
);

fs.ensureFileSync(newPath);
const contents = fs.readFileSync(physicalFilePath, { encoding: 'utf-8' });
fs.writeFileSync(newPath, contents);
}
);

fs.copySync(
Expand Down Expand Up @@ -121,6 +129,10 @@ function cleanupAot() {
fs.removeSync(skyPagesConfigUtil.spaPathTemp());
}

function cleanupDist() {
fs.removeSync(skyPagesConfigUtil.spaPath('dist'));
}

function buildServe(argv, skyPagesConfig, webpack, isAot) {
const base = skyPagesConfigUtil.getAppBase(skyPagesConfig);
return server
Expand Down Expand Up @@ -170,6 +182,7 @@ function buildCompiler(argv, skyPagesConfig, webpack, isAot) {
* @param {*} cancelProcessExit
*/
function build(argv, skyPagesConfig, webpack) {
cleanupDist();

const lintResult = tsLinter.lintSync();
const isAot = skyPagesConfig &&
Expand All @@ -178,12 +191,12 @@ function build(argv, skyPagesConfig, webpack) {

if (lintResult.exitCode > 0) {
return Promise.reject(lintResult.errors);
} else {
localeAssetsProcessor.prepareLocaleFiles();
const name = argv.serve ? buildServe : buildCompiler;

return name(argv, skyPagesConfig, webpack, isAot);
}

localeAssetsProcessor.prepareLocaleFiles();
const name = argv.serve ? buildServe : buildCompiler;

return name(argv, skyPagesConfig, webpack, isAot);
}

module.exports = build;
1 change: 0 additions & 1 deletion cli/utils/ts-linter.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const logger = require('@blackbaud/skyux-logger');
const skyPagesConfigUtil = require('../../config/sky-pages/sky-pages.config');

const flags = [
'--type-check',
'--project',
skyPagesConfigUtil.spaPath('tsconfig.json'),
'--config',
Expand Down
2 changes: 1 addition & 1 deletion cli/version.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const logger = require('@blackbaud/skyux-logger');
*/
function version() {
const packageJson = require(path.resolve(__dirname, '..', 'package.json'));
logger.info('@blackbaud/skyux-builder: %s', packageJson.version);
logger.info('@skyux-sdk/builder: %s', packageJson.version);
}

module.exports = version;
2 changes: 1 addition & 1 deletion config/karma/dev-runtime.karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
'use strict';

function addRuntimeAlias(webpackConfig, runtimePath, path) {
webpackConfig.resolve.alias['@blackbaud/skyux-builder/runtime' + path] = runtimePath + path;
webpackConfig.resolve.alias['@skyux-sdk/builder/runtime' + path] = runtimePath + path;
}

/**
Expand Down
6 changes: 1 addition & 5 deletions config/karma/dev-src-app.karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,7 @@ function getConfig(config) {
// This is needed exclusively for internal runtime unit tests,
// which is why it's here instead of alias-builder or the shared test.webpack.config.js
// It's relative from src/app/
webpackConfig.resolve.alias['@blackbaud/skyux-builder/runtime'] = runtimePath;

// Instead of adding skyux2 as a dependency of skyux-builder
webpackConfig.resolve.alias['@skyux/theme/css/sky.css'] =
'../../utils/runtime-test-skyux.css';
webpackConfig.resolve.alias['@skyux-sdk/builder/runtime'] = runtimePath;

// Remove sky-style-loader
delete config.preprocessors['../../utils/spec-styles.js'];
Expand Down
10 changes: 5 additions & 5 deletions config/karma/pact.karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,25 @@ function getConfig(config) {
skyPagesConfig.runtime.pactConfig.pactProxyServer = pactServers.getPactProxyServer();

if (skyPagesConfig.skyux.pacts) {
var i = 0;
skyPagesConfig.skyux.pacts.forEach((pact) => {
// set pact settings not specified in config file
pact.log = pact.log || path.resolve(process.cwd(), 'logs', `pact-${pact.provider}.log`);
pact.dir = pact.dir || path.resolve(process.cwd(), 'pacts');
pact.host = pactServers.getPactServer(pact.provider).host;
pact.port = pactServers.getPactServer(pact.provider).port;
pact.pactFileWriteMode = pact.pactFileWriteMode || 'overwrite';

i++;
});
} else {
logger.error('No pact entry in configuration!');
}

config.set({
frameworks: config.frameworks.concat('pact'),
files: config.files.concat(path.resolve(process.cwd(), 'node_modules/@pact-foundation/pact-web',
`pact-web.js`)),
files: config.files.concat(path.resolve(
process.cwd(),
'node_modules/@pact-foundation/pact-web',
`pact-web.js`
)),
pact: skyPagesConfig.skyux.pacts,
plugins: config.plugins.concat('@pact-foundation/karma-pact'),
webpack: testWebpackConfig.getWebpackConfig(skyPagesConfig, argv)
Expand Down
6 changes: 3 additions & 3 deletions 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-template';
const branch = 'builder-dev';
const branch = 'builder-dev-rc-rename-package';

console.log('Running command using full install.');
common.rimrafPromise(common.tmp)
Expand All @@ -62,7 +62,7 @@ let config = {
});

// Remove any installed versions of Builder.
delete spaPkgJson.devDependencies['@blackbaud/skyux-builder'];
delete spaPkgJson.devDependencies['@skyux-sdk/builder'];

fs.writeJsonSync(spaPkgPath, spaPkgJson, { spaces: 2 });
})
Expand Down Expand Up @@ -92,7 +92,7 @@ let config = {
file,
path.resolve(
common.tmp,
`node_modules/@blackbaud/skyux-builder/${file}`
`node_modules/@skyux-sdk/builder/${file}`
)
);
});
Expand Down
Loading

0 comments on commit 8e51f26

Please sign in to comment.