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

Fixed skyux test/watch performance #202

Merged
merged 16 commits into from
Jun 29, 2017
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,6 @@ jspm_packages
.DS_Store
.e2e-tmp
yarn.lock

# Awesome Typescript Loader cache
.awcache
12 changes: 3 additions & 9 deletions config/webpack/serve.webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ const LoaderOptionsPlugin = require('webpack/lib/LoaderOptionsPlugin');
const skyPagesConfigUtil = require('../sky-pages/sky-pages.config');
const hostUtils = require('../../utils/host-utils');

const moduleLoader = skyPagesConfigUtil.outPath('loader', 'sky-pages-module');

/**
* Returns the querystring base for parameters allowed to be passed through.
* PLEASE NOTE: The method is nearly duplicated in `runtime/params.ts`.
Expand Down Expand Up @@ -120,11 +118,6 @@ function getWebpackConfig(argv, skyPagesConfig) {
watch: true,
module: {
rules: [
{
enforce: 'pre',
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed this rule because it is already listed in "common" config.

test: /sky-pages\.module\.ts$/,
loader: moduleLoader
},
{
test: /\.ts$/,
use: [
Expand All @@ -140,9 +133,10 @@ function getWebpackConfig(argv, skyPagesConfig) {
{
loader: 'angular2-template-loader'
}
]
],
exclude: [/\.e2e\.ts$/]
}
],
]
},
devServer: {
compress: true,
Expand Down
51 changes: 14 additions & 37 deletions config/webpack/test.webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ function getWebpackConfig(skyPagesConfig, argv) {

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

const resolves = [
process.cwd(),
Expand Down Expand Up @@ -66,17 +65,7 @@ function getWebpackConfig(skyPagesConfig, argv) {
{
enforce: 'pre',
test: /sky-pages\.module\.ts$/,
loader: moduleLoader
},
{
enforce: 'pre',
test: /\.ts$/,
loader: 'tslint-loader',
exclude: excludes,
options: {
emitErrors: true,
failOnHint: true
}
loader: outPath('loader', 'sky-pages-module')
},
{
enforce: 'pre',
Expand All @@ -87,7 +76,16 @@ function getWebpackConfig(skyPagesConfig, argv) {
{
enforce: 'pre',
loader: outPath('loader', 'sky-processor', 'preload'),
exclude: /node_modules/
exclude: excludes
},
{
test: /\.s?css$/,
use: ['raw-loader', 'sass-loader']
},
{
test: /\.html$/,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated CSS, SCSS, and HTML rules to look just like common config (no affect on output).

loader: 'raw-loader',
exclude: excludes
},
{
test: /\.ts$/,
Expand All @@ -98,28 +96,13 @@ function getWebpackConfig(skyPagesConfig, argv) {
// Ignore the "Cannot find module" error that occurs when referencing
// an aliased file. Webpack will still throw an error when a module
// cannot be resolved via a file path or alias.
ignoreDiagnostics: [2307]
ignoreDiagnostics: [2307],
useCache: true
}
},
{
loader: 'angular2-template-loader'
}
],
exclude: [/\.e2e\.ts$/]
},
{
test: /\.css$/,
loader: 'raw-loader'
},
{
test: /\.html$/,
loader: 'raw-loader'
},
{
test: /\.scss$/,
use: [
'raw-loader',
'sass-loader'
]
}
]
Expand All @@ -130,13 +113,7 @@ function getWebpackConfig(skyPagesConfig, argv) {
debug: true,
options: {
context: __dirname,
skyPagesConfig: skyPagesConfig,
tslint: {
emitErrors: false,
failOnHint: false,
resourcePath: 'src',
typeCheck: true
}
skyPagesConfig: skyPagesConfig
}
}),

Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
},
"homepage": "https://github.com/blackbaud/skyux-builder#readme",
"peerDependencies": {
"@blackbaud/skyux": "2.0.0-rc.1"
"@blackbaud/skyux": "2.0.0-rc.2"
},
"dependencies": {
"@angular/common": "4.1.3",
Expand Down Expand Up @@ -86,7 +86,6 @@
"ts-helpers": "1.1.2",
"ts-node": "3.0.4",
"tslint": "5.2.0",
"tslint-loader": "3.5.3",
"typescript": "2.3.2",
"webpack": "2.5.1",
"webpack-dev-server": "2.4.5",
Expand Down