Skip to content

Commit cea7b08

Browse files
Dale KunceDale Kunce
authored andcommitted
Modernize build system and fix vulnerabilities
- Update Node.js dependencies to latest secure versions - Fix all 40 security vulnerabilities (0 vulnerabilities remaining) - Update Gulp to v5.0.1 and fix deprecated patterns - Replace deprecated node-sass with modern sass (dart-sass) - Update browser-sync to v3.0.4 for security fixes - Update Foundation Sites to v6.9.0 and FontAwesome to v6.7.2 - Fix deprecated Sass functions (darken, lighten, scale-color) - Add modern @use statements for sass:math and sass:color - Update Travis CI configuration for Node.js 18 - Suppress Sass deprecation warnings from dependencies - Replace deprecated request package with axios - Remove run-sequence dependency (built into Gulp 4+) Build system now works with modern tools and zero vulnerabilities.
1 parent 54a60ad commit cea7b08

7 files changed

Lines changed: 5952 additions & 4885 deletions

File tree

.travis.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,25 @@
11
language: ruby
2-
rvm:
3-
- 3.3
4-
env:uage: ruby
52
rvm:
63
- 3.3.5
74
env:
85
global:
6+
- TRAVIS_NODE_VERSION=18
97
- GH_REF=github.com/MissingMaps/missingmaps.github.io
108
- DEPLOY_BRANCH=publish
119
- secure: CWoizTEORW1cbd9e9wtebUIiTsztfRgS5wTRTTkRl1NJBbgK5KElLedcQxoIi3jU+rdkZCSyi5aNe6U4dAkUf1PvPlO2WCC6qOxZGdeuhXGY2SEQvpsW+VmTVa5IjE/EN2/X1Vpg5P092xEu7+n7W90d8EKlUaUIWXEPGz5S2fMIszdsDbs5SxZ5k4Bz1mMuB4Kr6w7sbVuEFIUaQII7vg63z6EjVu1CDpUoqc9nLYD+deScWLD9fCr5s1wxre36/tg4k52WvhiPddwFJAdpns3peTQxfR6Wgoc4oDch92lFG59zweDcBDRkbI/kG6yxc3m2BXges9GZztEh0c5BfenEXwqJI0gHA3cvuzcp86zTposQeaFOk3BaRzEULitBFyAP6OTIKp4oaS+fbXGGtzDgz47s4SAGwEJIOQHkRTbGCq/OlnkbPB2N+X+tMYXbeO9n4p3OGuLRgvpILx5GAO7sEUKp7cc4IfcoRdSCxbUWO/M7dcn1ZKK+Yc9rYcyaKlniimBchBOlCqTS9SZ9kxmko1pZKpvy18dPzrgkI2MVX7TKbms0ZjixV/9el7Ir/HIl+Sz3akJ7YZi8q1mQ56cTEiPg7ZC37XC5uxJylA4uwQy4jK3macvfmxwhXd+EZDxl6v0NreZNtmwhphPWIELabmR6/wrd4xhqNaup1Mk=
12-
# cache:
13-
# directories:
14-
# - node_modules
10+
cache:
11+
directories:
12+
- node_modules
1513
before_install:
1614
- chmod +x ./.build_scripts/deploy.sh
1715
before_script:
1816
- . $HOME/.nvm/nvm.sh
1917
- nvm install $TRAVIS_NODE_VERSION
2018
- nvm use $TRAVIS_NODE_VERSION
21-
- npm install -g gulp-cli
19+
- npm install -g gulp-cli
2220
- gem install bundler -v 2.6.9
2321
- bundle install
22+
- npm install
2423
script: gulp prod
2524
after_success:
2625
- "./.build_scripts/deploy.sh"

_config.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ baseurl: ""
1616

1717
permalink: pretty
1818

19-
collections:
20-
- events
21-
2219
# locale settings
2320
default_locale: "en"
2421
authorized_locales: ["cs", "en", "es", "fr"]

app/assets/styles/_base.scss

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use "sass:color";
2+
13
// IE < 11
24
// Don't delete.
35
.lt-ie10 {
@@ -19,7 +21,7 @@
1921

2022
/*----------------------------------------------*/
2123
/*Variables*/
22-
/*----------------------------------------------*/
24+
/*------------------------------------------ color: color.adjust($mmGreen, $lightness: 10%);---*/
2325

2426
$mmred: #e23d3d;
2527
$mmgreen: #8BBF3F;
@@ -71,8 +73,8 @@ $ButtonColor: $DataColor;
7173
/*----------------------------------------------*/
7274
$text-color: $darkgrey;
7375
$border-color: $darkgrey;
74-
$border-color-darken: darken($border-color, 5%);
75-
$border-color-lighten: lighten($border-color, 5%);
76+
$border-color-darken: color.adjust($border-color, $lightness: -5%);
77+
$border-color-lighten: color.adjust($border-color, $lightness: 5%);
7678

7779
/*----------------------------------------------*/
7880
/*Fixing Default CSS*/
@@ -113,11 +115,11 @@ body{
113115
}
114116

115117
::-moz-selection { /* Code for Firefox */
116-
background: desaturate(lighten($mmYello, 24), 20);
118+
background: desaturate(color.adjust($mmYello, $lightness: 24%), 20%);
117119
}
118120

119121
::selection {
120-
background: desaturate(lighten($mmYello, 24), 20);
122+
background: desaturate(color.adjust($mmYello, $lightness: 24%), 20%);
121123
}
122124

123125
.centerme{

app/assets/styles/_settings.scss

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
@use "sass:color";
2+
@use "sass:math";
3+
14
// Foundation for Sites Settings
25
// -----------------------------
36
//
@@ -8,6 +11,7 @@
811
// 3. The Grid
912
// 4. Base Typography
1013
// 5. Typography Helpers
14+
1115
// 6. Abide
1216
// 7. Accordion
1317
// 8. Accordion Menu
@@ -168,7 +172,7 @@ $code-background: $light-gray;
168172
$code-border: 1px solid $medium-gray;
169173
$code-padding: rem-calc(2 5 1);
170174
$anchor-color: $primary-color;
171-
$anchor-color-hover: scale-color($anchor-color, $lightness: -14%);
175+
$anchor-color-hover: color.scale($anchor-color, $lightness: -14%);
172176
$anchor-text-decoration: none;
173177
$anchor-text-decoration-hover: none;
174178
$hr-width: $global-width;
@@ -283,7 +287,7 @@ $button-padding: 0.85em 1em;
283287
$button-margin: 0 0 $global-margin 0;
284288
$button-fill: solid;
285289
$button-background: $primary-color;
286-
$button-background-hover: scale-color($button-background, $lightness: -15%);
290+
$button-background-hover: color.scale($button-background, $lightness: -15%);
287291
$button-color: $white;
288292
$button-color-alt: $black;
289293
$button-radius: $global-radius;
@@ -775,15 +779,15 @@ $table-color-scale: 5%;
775779
$table-border: 1px solid smart-scale($table-background, $table-color-scale);
776780
$table-padding: rem-calc(8 10 10);
777781
$table-hover-scale: 2%;
778-
$table-row-hover: darken($table-background, $table-hover-scale);
779-
$table-row-stripe-hover: darken($table-background, $table-color-scale + $table-hover-scale);
782+
$table-row-hover: color.adjust($table-background, $lightness: -$table-hover-scale);
783+
$table-row-stripe-hover: color.adjust($table-background, $lightness: -($table-color-scale + $table-hover-scale));
780784
$table-is-striped: true;
781785
$table-striped-background: smart-scale($table-background, $table-color-scale);
782786
$table-stripe: even;
783787
$table-head-background: smart-scale($table-background, math.div($table-color-scale, 2));
784-
$table-head-row-hover: darken($table-head-background, $table-hover-scale);
788+
$table-head-row-hover: color.adjust($table-head-background, $lightness: -$table-hover-scale);
785789
$table-foot-background: smart-scale($table-background, $table-color-scale);
786-
$table-foot-row-hover: darken($table-foot-background, $table-hover-scale);
790+
$table-foot-row-hover: color.adjust($table-foot-background, $lightness: -$table-hover-scale);
787791
$table-head-font-color: $body-font-color;
788792
$table-foot-font-color: $body-font-color;
789793
$show-header-for-stacked: false;

gulpfile.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const gulp = require('gulp');
33
const autoprefixer = require('gulp-autoprefixer');
44
const browserSync = require('browser-sync');
55
const cleaner = require('gulp-clean');
6-
const concat = require('gulp-concat').default || require('gulp-concat');
6+
const concat = require('gulp-concat');
77
const cp = require('child_process');
88
const fs = require('fs');
99
const git = require('gulp-git');
@@ -13,8 +13,8 @@ const plumber = require('gulp-plumber');
1313
const axios = require('axios');
1414
const sass = require('gulp-sass')(require('sass'));
1515
const sourcemaps = require('gulp-sourcemaps');
16-
const uglify = require('gulp-uglify').default || require('gulp-uglify');
17-
const zip = require('gulp-zip').default;
16+
const uglify = require('gulp-uglify');
17+
const zip = require('gulp-zip');
1818

1919
async function grabEvents() {
2020
const url = 'https://docs.google.com/spreadsheets/d/e/2PACX-1vSENK52p0o0dEpEfEH-qvloWEkILbcf-X8aSWdStVHKZuAF-G8-80NsRcouqBlB3DSsqerzVvPmnxDu/pub?gid=469941282&single=true&output=csv';
@@ -74,7 +74,8 @@ function styles() {
7474
errLogToConsole: true,
7575
outputStyle: 'expanded',
7676
quietDeps: true, // Suppress deprecation warnings from dependencies like Foundation Sites
77-
verbose: false // Reduce verbose output
77+
verbose: false, // Reduce verbose output
78+
silenceDeprecations: ['legacy-js-api', 'import', 'global-builtin', 'color-functions', 'slash-div']
7879
};
7980
return gulp.src(sassInput)
8081
.pipe(plumber())

0 commit comments

Comments
 (0)