Skip to content

Commit a136336

Browse files
authored
build: use webpack (#10)
1 parent 75f1e45 commit a136336

31 files changed

+93
-256
lines changed

.gitignore

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
.sass-cache/
2-
css/
3-
!css/images/
4-
!css/skel.css
5-
!css/font-awesome.min.css
2+
dist/
63
node_modules/
74
index.html
85
package-lock.json

Dockerfile

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,30 @@
11
FROM node:20.19.0
22

3-
RUN apt-get update \
4-
&& apt-get --no-install-recommends -y install ruby-full \
5-
&& gem install sass \
6-
&& apt-get clean
3+
ARG DART_SASS_VERSION=1.89.1
4+
5+
RUN curl -sSLodart-sass-linux-x64.tar.gz \
6+
"https://github.com/sass/dart-sass/releases/download/${DART_SASS_VERSION}/dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz" \
7+
&& tar xzf dart-sass-linux-x64.tar.gz dart-sass/sass \
8+
&& mv dart-sass/sass /usr/local/bin/sass \
9+
&& rm -rf dart-sass-linux-x64.tar.gz
710

811
WORKDIR /build
912

10-
COPY . ./
13+
COPY package.json .
14+
15+
RUN npm install
1116

12-
RUN npm install \
13-
&& npm install -g grunt-cli \
14-
&& grunt
17+
COPY src/ ./src
18+
COPY webpack.config.js ./
19+
20+
RUN npm run build
1521

1622
FROM nginx:1.27.4-alpine
1723

1824
WORKDIR /usr/share/nginx/html
1925

2026
COPY config/nginx.conf /etc/nginx/conf.d/default.conf
21-
2227
COPY favicon.ico ./
28+
COPY --from=0 /build/dist ./
2329

24-
COPY --from=0 /build/css ./css
25-
COPY --from=0 /build/js ./js
26-
COPY --from=0 /build/fonts ./fonts
27-
COPY --from=0 /build/index.html ./
30+
EXPOSE 80

Gruntfile.js

Lines changed: 0 additions & 62 deletions
This file was deleted.

css/ie/PIE.htc

Lines changed: 0 additions & 96 deletions
This file was deleted.

css/ie/html5shiv.js

Lines changed: 0 additions & 8 deletions
This file was deleted.

css/ie/images/footer.png

-424 Bytes
Binary file not shown.

css/ie/images/footer.svg

Lines changed: 0 additions & 9 deletions
This file was deleted.

package.json

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,19 @@
22
"name": "personalsite",
33
"version": "1.1.0",
44
"description": "Personal site for Oliver Radwell",
5-
"main": "Gruntfile.js",
6-
"dependencies": {
7-
"grunt": "^1.4.0",
8-
"grunt-contrib-htmlmin": "^3.1.0",
9-
"grunt-contrib-sass": "^2.0.0",
10-
"grunt-inline": "^0.3.7"
11-
},
5+
"dependencies": {},
126
"devDependencies": {
13-
"grunt-contrib-watch": "^1.1.0"
7+
"css-loader": "^7.1.2",
8+
"html-webpack-plugin": "^5.6.3",
9+
"sass": "^1.87.0",
10+
"sass-loader": "^16.0.5",
11+
"style-loader": "^4.0.0",
12+
"webpack": "^5.99.8",
13+
"webpack-cli": "^6.0.1"
1414
},
1515
"scripts": {
16-
"test": "echo \"Error: no test specified\" && exit 1"
16+
"test": "echo \"Error: no test specified\" && exit 1",
17+
"build": "webpack"
1718
},
1819
"author": "Oliver Radwell",
1920
"private": true
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/index.html

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,8 @@
33
<head>
44
<title>Oliver Radwell - Software Developer | System Admin | DevOps</title>
55
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
6-
<meta name="description" content="" />
7-
<meta name="keywords" content="" />
8-
<noscript>
9-
<link rel="stylesheet" href="css/skel.css" />
10-
</noscript>
11-
<link rel="stylesheet" href="css/font-awesome.min.css" type="text/css" />
12-
<link rel="stylesheet" href="css/style.css" type="text/css" />
13-
<noscript>
14-
<link rel="stylesheet" href="css/style-wide.css" type="text/css" />
15-
<link rel="stylesheet" href="css/style-noscript.css" type="text/css" />
16-
</noscript>
17-
<!--[if lte IE 9]><link rel="stylesheet" href="css/ie/v9.css" /><![endif]-->
18-
<!--[if lte IE 8]><link rel="stylesheet" href="css/ie/v8.css" /><![endif]-->
19-
<link rel="stylesheet" href="css/simptip.css" type="text/css" />
20-
<!--[if lte IE 8]><script src="css/ie/html5shiv.js"></script><![endif]-->
21-
<script type="text/javascript" src="js/skel.min.js"></script>
6+
<meta name="description" content="Software Developer, System Admin, DevOps" />
7+
<meta name="keywords" content="software developer, system admin, devops, php, mariadb, git, javascript, go, linux, kubernetes, apache, docker, bash" />
228
</head>
239
<body class="loading">
2410
<div id="wrapper">
@@ -56,7 +42,5 @@ <h1>Oliver Radwell</h1>
5642
</footer>
5743
</div>
5844
</div>
59-
<script type="text/javascript" src="js/init.js?__inline=true"></script>
60-
<script type="text/javascript" src="js/ga.js?__inline=true"></script>
6145
</body>
6246
</html>

src/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import "./css/skel.css";
2+
import "./css/font-awesome.min.css";
3+
import "./sass/style.scss";
4+
import "./sass/simptip.scss";
5+
import "./js/skel.min.js";
File renamed without changes.

src/sass/_vars.scss

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use "mixins";
2+
13
//
24
// Aerial by HTML5 UP
35
// html5up.net | @n33co
@@ -18,9 +20,9 @@ $size-nav-icon-wrapper: 5.35em;
1820
$size-nav-icon: 1.75em;
1921

2022
@mixin bg($width) {
21-
@include vendor-keyframes('bg') {
22-
0% { @include vendor-property('transform', 'translate3d(0,0,0)'); }
23-
100% { @include vendor-property('transform', 'translate3d(#{$width * -1},0,0)'); }
23+
@include mixins.vendor-keyframes('bg') {
24+
0% { @include mixins.vendor-property('transform', 'translate3d(0,0,0)'); }
25+
100% { @include mixins.vendor-property('transform', 'translate3d(#{$width * -1},0,0)'); }
2426
}
2527

2628
#bg {
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/sass/style-mobile.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
55
*/
66

7-
@import 'vars';
8-
@import 'mixins';
7+
@use 'vars';
8+
@use 'mixins';
99

1010
/* Basic */
1111

@@ -19,7 +19,7 @@
1919

2020
/* BG */
2121

22-
@include bg($bg-width * 0.2);
22+
@include vars.bg(vars.$bg-width * 0.2);
2323

2424
/* Header */
2525

src/sass/style-mobilep.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
55
*/
66

7-
@import 'vars';
8-
@import 'mixins';
7+
@use 'vars';
8+
@use 'mixins';
99

1010
/* BG */
1111

12-
@include bg($bg-width * 0.275);
12+
@include vars.bg(vars.$bg-width * 0.275);
1313

1414
/* Header */
1515

src/sass/style-normal.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
55
*/
66

7-
@import 'vars';
8-
@import 'mixins';
7+
@use 'vars';
8+
@use 'mixins';
99

1010
/* Basic */
1111

@@ -15,4 +15,4 @@
1515

1616
/* BG */
1717

18-
@include bg($bg-width * 0.5);
18+
@include vars.bg(vars.$bg-width * 0.5);

src/sass/style-noscript.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
55
*/
66

7-
@import 'vars';
8-
@import 'mixins';
7+
@use 'vars';
8+
@use 'mixins';
99

1010
/* Wrapper */
1111

src/sass/style-wide.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
55
*/
66

7-
@import 'vars';
8-
@import 'mixins';
7+
@use 'vars';
8+
@use 'mixins';
99

1010
/* Basic */
1111

@@ -15,4 +15,4 @@
1515

1616
/* BG */
1717

18-
@include bg($bg-width);
18+
@include vars.bg(vars.$bg-width);

0 commit comments

Comments
 (0)