Skip to content

Commit deae43d

Browse files
committed
Build modernisations
1 parent d77c588 commit deae43d

File tree

3 files changed

+36
-23
lines changed

3 files changed

+36
-23
lines changed

package.json

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "textpattern-default-theme",
33
"title": "Default theme",
44
"txp-type": "textpattern-theme",
5-
"version": "4.8.4",
5+
"version": "4.8.5",
66
"description": "The default theme that ships as standard with Textpattern CMS.",
77
"author": "Team Textpattern",
88
"homepage": "https://github.com/textpattern/textpattern-default-theme",
@@ -27,21 +27,20 @@
2727
"devDependencies": {
2828
"autoprefixer": "9.8.6",
2929
"clean-webpack-plugin": "3.0.0",
30-
"copy-webpack-plugin": "6.3.2",
31-
"cross-env": "7.0.2",
30+
"copy-webpack-plugin": "7.0.0",
31+
"cross-env": "7.0.3",
3232
"css-loader": "5.0.1",
33-
"fibers": "5.0.0",
34-
"file-loader": "6.2.0",
35-
"mini-css-extract-plugin": "1.3.1",
33+
"mini-css-extract-plugin": "1.3.3",
3634
"postcss-loader": "3.0.0",
37-
"sass": "1.29.0",
35+
"sass": "1.30.0",
3836
"sass-loader": "10.1.0",
3937
"stylelint": "13.8.0",
4038
"stylelint-order": "4.1.0",
4139
"stylelint-scss": "3.18.0",
4240
"stylelint-webpack-plugin": "2.1.1",
43-
"webpack": "5.6.0",
44-
"webpack-cli": "4.2.0"
41+
"webpack": "5.11.0",
42+
"webpack-cli": "4.2.0",
43+
"webpack-manifest-version-sync-plugin": "0.0.4"
4544
},
4645
"browserslist": [
4746
"> 0.5%",

src/templates/manifest.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"title": "Four Point Eight",
33
"txp-type": "textpattern-theme",
4-
"version": "4.8.4",
54
"description": "The default theme shipped with Textpattern CMS 4.8.",
65
"author": "Team Textpattern",
76
"author_uri": "https://github.com/textpattern/textpattern-default-theme"

webpack.config.js

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ const distDir = __dirname + '/dist/four-point-eight';
33
const fs = require('fs');
44
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
55
const CopyWebpackPlugin = require('copy-webpack-plugin');
6+
const ManifestVersionSyncPlugin = require('webpack-manifest-version-sync-plugin');
67
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
78
const StyleLintPlugin = require('stylelint-webpack-plugin');
89

@@ -20,27 +21,38 @@ module.exports = {
2021
test: /\.(scss)$/,
2122
use: [
2223
MiniCssExtractPlugin.loader,
23-
// Translates CSS into CommonJS modules.
24-
{ loader: 'css-loader', options: { importLoaders: 2 } },
25-
// Run postCSS actions.
26-
{ loader: 'postcss-loader', options: { plugins: [require('autoprefixer')] } },
27-
// Compiles Sass to CSS.
24+
{
25+
loader: 'css-loader',
26+
options: {
27+
importLoaders: 2,
28+
},
29+
},
30+
{
31+
loader: 'postcss-loader',
32+
options: {
33+
plugins: [require('autoprefixer')],
34+
},
35+
},
2836
{
2937
loader: 'sass-loader',
3038
options: {
3139
implementation: require('sass'),
3240
sassOptions: {
33-
outputStyle: 'expanded'
34-
}
35-
}
36-
}
41+
outputStyle: 'expanded',
42+
},
43+
},
44+
},
3745
]
3846
},
3947
{
40-
test: /\.woff2?$|\.ttf$|\.eot$|\.svg$|\.png|\.jpe?g|\.gif$/,
41-
loader: 'file-loader'
48+
test: /\.(woff(2)?|svg)$/,
49+
type: 'asset/inline',
4250
},
43-
]
51+
{
52+
test: /\.(?:ico|gif|jpe?g|png|svg|webp)$/i,
53+
type: 'asset/resource',
54+
},
55+
],
4456
},
4557
plugins: [
4658
new CleanWebpackPlugin(),
@@ -55,6 +67,9 @@ module.exports = {
5567
new MiniCssExtractPlugin({
5668
filename: '[name]'
5769
}),
70+
new ManifestVersionSyncPlugin({
71+
manifestPath: 'manifest.json',
72+
}),
5873
new CopyWebpackPlugin({
5974
patterns: [
6075
{
@@ -63,5 +78,5 @@ module.exports = {
6378
},
6479
],
6580
}),
66-
]
81+
],
6782
};

0 commit comments

Comments
 (0)