Skip to content

Commit a5307ae

Browse files
committed
Merge branch 'feature/webpack-beta-25' into develop
2 parents 5e5c169 + 974854c commit a5307ae

File tree

14 files changed

+145
-8960
lines changed

14 files changed

+145
-8960
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ addons:
22
firefox: latest
33
language: node_js
44
node_js:
5-
- "5.9.0"
5+
- "6.9.1"
66
before_install:
77
- "export DISPLAY=:99.0"
88
- "sh -e /etc/init.d/xvfb start"

config/config-aurelia-linter.js

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,37 @@
11
"use strict";
2+
const path = require('path');
23

34
/**
45
* AureliaTemplateLinter config
56
*/
67
const aureliaTemplateLinter = function (options) {
7-
return {
8-
module: {
9-
preLoaders: [
10-
{
11-
test: /\.html$/,
12-
loader: 'aurelia-template-lint-loader'
13-
}
14-
]
15-
},
16-
aureliaTemplateLinter: {
17-
configuration: options && options.config,
8+
return {
9+
module: {
10+
rules: [
11+
{
12+
test: /\.html$/,
13+
loader: 'aurelia-template-lint-loader',
14+
enforce: 'pre',
15+
exclude: [path.join(options.rootDir, 'node_modules')]
16+
}
17+
]
18+
},
19+
aureliaTemplateLinter: {
20+
configuration: options && options.config,
1821

19-
// aurelia errors are displayed by default as warnings
20-
// set emitErrors to true to display them as errors
21-
emitErrors: false,
22+
// aurelia errors are displayed by default as warnings
23+
// set emitErrors to true to display them as errors
24+
emitErrors: false,
2225

23-
// aurelia does not interrupt the compilation by default
24-
// if you want any file with aurelia errors to fail
25-
// set failOnHint to true
26-
failOnHint: options.failOnHint,
26+
// aurelia does not interrupt the compilation by default
27+
// if you want any file with aurelia errors to fail
28+
// set failOnHint to true
29+
failOnHint: options.failOnHint,
2730

28-
typeChecking: options.typeChecking,
29-
fileGlob: options.sourceDir
30-
}
31-
};
31+
typeChecking: options.typeChecking,
32+
fileGlob: options.sourceDir
33+
}
34+
};
3235
};
36+
3337
module.exports = aureliaTemplateLinter;

config/config-ignore.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
const configIgnore = function (options) {
77
return {
88
module: {
9-
loaders: [
9+
rules: [
1010
{ test: /\.html$/, loader: 'ignore-loader' },
1111
{ test: /\.ejs$/, loader: 'ignore-loader' },
1212
{ test: /\.scss$/, loader: 'ignore-loader' }

config/config-loader-options.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
"use strict";
2+
const core_1 = require('@easy-webpack/core');
3+
const webpack = require('webpack');
4+
5+
module.exports = function LoaderOptions(initalConfig = {}, extractOptions = []) {
6+
return function LoaderOptions() {
7+
let options = {};
8+
extractOptions.forEach(k => {
9+
if (this[k]) {
10+
options[k] = this[k];
11+
}
12+
delete this[k];
13+
});
14+
Object.assign(initalConfig, options);
15+
return {
16+
plugins: [
17+
new webpack.LoaderOptionsPlugin({
18+
options: initalConfig
19+
})
20+
].concat(core_1.get(this, 'plugins', []))
21+
};
22+
};
23+
};

config/config-node.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const configNode = function (level) {
1717
* See: https://webpack.github.io/docs/configuration.html#node
1818
*/
1919
node: {
20-
global: 'window',
20+
global: true,
2121
crypto: 'empty',
2222
fs: 'empty',
2323
process: true,

0 commit comments

Comments
 (0)