Skip to content

Commit 896f08a

Browse files
committed
Updage sass files to not use deprecated keywords, update webpack configuration to be compatible with latest sass-loader, bump required node version to >= 18.19.0
1 parent 67e20eb commit 896f08a

File tree

8 files changed

+51
-36
lines changed

8 files changed

+51
-36
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888

8989
## Requirements
9090

91-
- `node` : `>=18.12.0`
91+
- `node` : `>=18.19.0`
9292
- `npm`
9393

9494
# Setup

package-lock.json

Lines changed: 5 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"webpack-merge": "^5.8.0"
5656
},
5757
"engines": {
58-
"node": ">=18.12.0"
58+
"node": ">=18.19.0"
5959
},
6060
"keywords": [
6161
"webpack",
@@ -79,6 +79,5 @@
7979
"lint:js": "eslint --ext .js src/js/",
8080
"stats": "webpack --config configuration/webpack.prod.config.js --mode=production --json > dist/stats.json && webpack-bundle-analyzer dist/stats.json"
8181
},
82-
"target": "web",
83-
"dependencies": {}
82+
"target": "web"
8483
}

src/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ <h2 id="features">Features</h2>
160160
</ul>
161161
<h2 id="requirements">Requirements</h2>
162162
<ul>
163-
<li><code>node</code> : <code>&gt;=18.12.0</code></li>
163+
<li><code>node</code> : <code>&gt;=18.19.0</code></li>
164164
<li><code>npm</code></li>
165165
</ul>
166166
<h1 id="setup">Setup</h1>

src/scss/app.scss

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
/* By Athlon Front-End Team */
22

33
/* Core variables */
4-
@import 'base/vars';
4+
@use 'base/vars';
55

66
/* CSS Reset */
7-
@import 'base/reset';
7+
@use 'base/reset';
88

99
/* CSS print */
10-
@import 'base/print';
10+
@use 'base/print';
1111

1212
/* Fonts */
13-
@import 'base/fonts';
13+
@use 'base/fonts';
1414

1515
/* Mixins, helpers and functions */
16-
@import 'base/mixins';
16+
@use 'base/mixins';
1717

1818
/* Vendor */
1919

2020
/* Components */
2121

2222
/* Browser specific styles */
23-
@import 'dirty/hacks';
23+
@use 'dirty/hacks';
2424

2525
/* Demo Page styles */
26-
@import 'demo';
26+
@use 'demo';

src/scss/base/_print.scss

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use "vars";
2+
13
/**
24
* Print Stylesheet
35
*/
@@ -6,8 +8,8 @@
68
@page { margin: 1cm; }
79

810
body {
9-
background: $white;
10-
color: $black;
11+
background: vars.$white;
12+
color: vars.$black;
1113
}
1214

1315
a {

src/scss/demo.scss

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
1+
@use "base/vars";
2+
13
body {
2-
background: $body-background-color;
3-
color: $foreground-color;
4+
background: vars.$body-background-color;
5+
color: vars.$foreground-color;
46
font-family: 'DINP-R', arial, serif;
57
font-size: 1.3em;
68
}
79

810
header {
911
font-size: 2em;
10-
color: $caption-color;
12+
color: vars.$caption-color;
1113
text-align: center;
12-
background: $foreground-color url('../images/design/heading.png') center 20px no-repeat;
14+
background: vars.$foreground-color url('../images/design/heading.png') center 20px no-repeat;
1315
padding: 60px 30px 30px;
1416
background-size: 160px;
1517
width: 90%;
@@ -28,8 +30,8 @@ header {
2830
}
2931

3032
main {
31-
background: $foreground-color;
32-
color: $black;
33+
background: vars.$foreground-color;
34+
color: vars.$black;
3335
margin: 20px auto;
3436
padding: 40px;
3537
width: 90%;
@@ -81,15 +83,15 @@ main {
8183
}
8284

8385
a {
84-
color: $link-color;
86+
color: vars.$link-color;
8587

8688
&:hover {
87-
color: $black;
89+
color: vars.$black;
8890
}
8991
}
9092

9193
address {
92-
color: $accent-color;
94+
color: vars.$accent-color;
9395
}
9496

9597
pre {
@@ -98,10 +100,10 @@ pre {
98100

99101
code {
100102
display: block;
101-
background: $body-background-color;
102-
color: $white;
103+
background: vars.$body-background-color;
104+
color: vars.$white;
103105
padding: 10px;
104-
border-left: 6px solid $link-color;
106+
border-left: 6px solid vars.$link-color;
105107
}
106108
}
107109

@@ -135,17 +137,17 @@ ul ol {
135137
}
136138

137139
blockquote {
138-
background: $light-gray;
139-
border-left: 4px solid $link-color;
140+
background: vars.$light-gray;
141+
border-left: 4px solid vars.$link-color;
140142
border-radius: 5px;
141143
margin: 10px 0;
142144
padding: 10px 10px 10px 20px;
143145
}
144146

145147
code {
146148
font-family: Consolas, 'courier new';
147-
color: $link-color;
148-
background-color: $light-gray;
149+
color: vars.$link-color;
150+
background-color: vars.$light-gray;
149151
padding: 2px;
150152
font-size: 1em;
151153
border-radius: 5px;
@@ -156,7 +158,7 @@ footer {
156158
padding-bottom: 20px;
157159

158160
a:hover {
159-
color: $white;
161+
color: vars.$white;
160162
}
161163
}
162164

webpack.config.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,18 @@ module.exports = {
4242
rules: [
4343
{
4444
test: /\.((c|sa|sc)ss)$/i,
45-
use: [MiniCssExtractPlugin.loader, 'css-loader', 'postcss-loader', 'sass-loader'],
45+
use: [
46+
MiniCssExtractPlugin.loader,
47+
'css-loader',
48+
'postcss-loader',
49+
{
50+
loader: 'sass-loader',
51+
options: {
52+
api: 'modern',
53+
sassOptions: {},
54+
},
55+
},
56+
],
4657
},
4758
{
4859
test: /\.js$/,

0 commit comments

Comments
 (0)