@studyportals/webpack-helper 2.4.4-beta.0 → 2.5.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +201 -201
- package/assets/.babelrc +10 -10
- package/assets/.browserslistrc +2 -2
- package/package.json +58 -58
- package/src/defaults/development.config.js +7 -7
- package/src/defaults/production.config.js +58 -58
- package/src/enums/mode.js +7 -7
- package/src/enums/preset.js +8 -8
- package/src/factories/configuration-factory.js +12 -9
- package/src/interfaces/bob.interface.js +2 -2
- package/src/interfaces/entry.interface.js +2 -2
- package/src/interfaces/entrypoint.interface.js +2 -2
- package/src/interfaces/output.interface.js +2 -2
- package/src/interfaces/preset.interface.js +2 -2
- package/src/model/configuration.js +119 -116
- package/src/model/entry.js +12 -11
- package/src/model/module.js +18 -16
- package/src/model/output.js +45 -44
- package/src/model/plugins.js +17 -15
- package/src/presets/javascript.preset.js +49 -46
- package/src/presets/typescript.preset.js +62 -59
- package/src/presets/vue-typescript.preset.js +85 -82
- package/src/main.js +0 -5
|
@@ -1,46 +1,49 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
'
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
exports.__esModule = true;
|
|
3
|
+
var MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
4
|
+
var JavascriptPreset = /** @class */ (function () {
|
|
5
|
+
function JavascriptPreset() {
|
|
6
|
+
}
|
|
7
|
+
JavascriptPreset.prototype.getPlugins = function (filename) {
|
|
8
|
+
return [
|
|
9
|
+
new MiniCssExtractPlugin({
|
|
10
|
+
filename: filename
|
|
11
|
+
})
|
|
12
|
+
];
|
|
13
|
+
};
|
|
14
|
+
JavascriptPreset.prototype.getModule = function () {
|
|
15
|
+
return {
|
|
16
|
+
rules: [
|
|
17
|
+
{
|
|
18
|
+
test: /\.css$/,
|
|
19
|
+
use: [
|
|
20
|
+
MiniCssExtractPlugin.loader,
|
|
21
|
+
'css-loader'
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
test: /\.scss$/,
|
|
26
|
+
use: [
|
|
27
|
+
MiniCssExtractPlugin.loader,
|
|
28
|
+
'css-loader',
|
|
29
|
+
'sass-loader'
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
test: /\.jsx?$/,
|
|
34
|
+
loader: 'babel-loader',
|
|
35
|
+
exclude: /node_modules\/(?!@studyportals\/).*/
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
JavascriptPreset.prototype.getExtensions = function () {
|
|
41
|
+
return [
|
|
42
|
+
'*',
|
|
43
|
+
'.js',
|
|
44
|
+
'.json'
|
|
45
|
+
];
|
|
46
|
+
};
|
|
47
|
+
return JavascriptPreset;
|
|
48
|
+
}());
|
|
49
|
+
exports.JavascriptPreset = JavascriptPreset;
|
|
@@ -1,59 +1,62 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
'
|
|
55
|
-
'.
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
exports.__esModule = true;
|
|
3
|
+
var MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
4
|
+
var TypeScriptPreset = /** @class */ (function () {
|
|
5
|
+
function TypeScriptPreset() {
|
|
6
|
+
}
|
|
7
|
+
TypeScriptPreset.prototype.getPlugins = function (filename) {
|
|
8
|
+
return [
|
|
9
|
+
new MiniCssExtractPlugin({
|
|
10
|
+
filename: filename
|
|
11
|
+
})
|
|
12
|
+
];
|
|
13
|
+
};
|
|
14
|
+
TypeScriptPreset.prototype.getModule = function () {
|
|
15
|
+
return {
|
|
16
|
+
rules: [
|
|
17
|
+
{
|
|
18
|
+
test: /\.css$/,
|
|
19
|
+
use: [
|
|
20
|
+
MiniCssExtractPlugin.loader,
|
|
21
|
+
'css-loader'
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
test: /\.scss$/,
|
|
26
|
+
use: [
|
|
27
|
+
MiniCssExtractPlugin.loader,
|
|
28
|
+
'css-loader',
|
|
29
|
+
'sass-loader'
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
test: /\.tsx?$/,
|
|
34
|
+
loader: 'ts-loader',
|
|
35
|
+
exclude: /node_modules\/(?!@studyportals\/).*/
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
test: /\.js$/,
|
|
39
|
+
loader: 'babel-loader',
|
|
40
|
+
exclude: /node_modules\/(?!@studyportals\/).*/
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
test: /\.(png|jpg|gif|svg)$/,
|
|
44
|
+
loader: 'file-loader',
|
|
45
|
+
options: {
|
|
46
|
+
name: '[name].[ext]?[hash]'
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
TypeScriptPreset.prototype.getExtensions = function () {
|
|
53
|
+
return [
|
|
54
|
+
'*',
|
|
55
|
+
'.ts',
|
|
56
|
+
'.js',
|
|
57
|
+
'.json'
|
|
58
|
+
];
|
|
59
|
+
};
|
|
60
|
+
return TypeScriptPreset;
|
|
61
|
+
}());
|
|
62
|
+
exports.TypeScriptPreset = TypeScriptPreset;
|
|
@@ -1,82 +1,85 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
'
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
'
|
|
77
|
-
'.
|
|
78
|
-
'.
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
exports.__esModule = true;
|
|
3
|
+
var webpack = require("webpack");
|
|
4
|
+
var MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
5
|
+
var VueLoaderPlugin = require('vue-loader').VueLoaderPlugin;
|
|
6
|
+
var VueTypeScriptPreset = /** @class */ (function () {
|
|
7
|
+
function VueTypeScriptPreset() {
|
|
8
|
+
}
|
|
9
|
+
VueTypeScriptPreset.prototype.getPlugins = function (filename) {
|
|
10
|
+
return [
|
|
11
|
+
new webpack.DllReferencePlugin({
|
|
12
|
+
manifest: require("@studyportals/vue-config/dist/library.json")
|
|
13
|
+
}),
|
|
14
|
+
new MiniCssExtractPlugin({
|
|
15
|
+
filename: filename
|
|
16
|
+
}),
|
|
17
|
+
new VueLoaderPlugin()
|
|
18
|
+
];
|
|
19
|
+
};
|
|
20
|
+
VueTypeScriptPreset.prototype.getModule = function () {
|
|
21
|
+
return {
|
|
22
|
+
rules: [
|
|
23
|
+
{
|
|
24
|
+
test: /\.css$/,
|
|
25
|
+
use: [
|
|
26
|
+
MiniCssExtractPlugin.loader,
|
|
27
|
+
'css-loader'
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
test: /\.scss$/,
|
|
32
|
+
use: [
|
|
33
|
+
MiniCssExtractPlugin.loader,
|
|
34
|
+
'css-loader',
|
|
35
|
+
'sass-loader'
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
test: /\.vue$/,
|
|
40
|
+
loader: 'vue-loader',
|
|
41
|
+
options: {
|
|
42
|
+
loaders: {
|
|
43
|
+
'scss': [
|
|
44
|
+
'vue-style-loader',
|
|
45
|
+
'css-loader',
|
|
46
|
+
'sass-loader'
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
test: /\.tsx?$/,
|
|
53
|
+
loader: 'ts-loader',
|
|
54
|
+
exclude: /node_modules\/(?!@studyportals\/).*/,
|
|
55
|
+
options: {
|
|
56
|
+
appendTsSuffixTo: [/\.vue$/]
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
test: /\.js$/,
|
|
61
|
+
loader: 'babel-loader',
|
|
62
|
+
exclude: /node_modules\/(?!@studyportals\/).*/
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
test: /\.(png|jpg|gif|svg)$/,
|
|
66
|
+
loader: 'file-loader',
|
|
67
|
+
options: {
|
|
68
|
+
name: '[name].[ext]?[hash]'
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
]
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
VueTypeScriptPreset.prototype.getExtensions = function () {
|
|
75
|
+
return [
|
|
76
|
+
'*',
|
|
77
|
+
'.ts',
|
|
78
|
+
'.js',
|
|
79
|
+
'.vue',
|
|
80
|
+
'.json'
|
|
81
|
+
];
|
|
82
|
+
};
|
|
83
|
+
return VueTypeScriptPreset;
|
|
84
|
+
}());
|
|
85
|
+
exports.VueTypeScriptPreset = VueTypeScriptPreset;
|
package/src/main.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const configuration_factory_1 = require("./factories/configuration-factory");
|
|
4
|
-
const configurationFactory = new configuration_factory_1.ConfigurationFactory();
|
|
5
|
-
module.exports = configurationFactory;
|