Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yarn@4.1.0 .bash/osx/uglifyjs.sh #222

Merged
merged 2 commits into from
Mar 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .bash/osx/uglifyjs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env bash
# -*- coding: UTF-8 -*-
#
# author : JV-conseil
# credits : JV-conseil
# copyright : Copyright (c) 2019-2024 JV-conseil
# All rights reserved
#====================================================
set -Eeou pipefail
shopt -s failglob

_jvcl_::_uglifyjs() {
local _file
while IFS= read -rd '' _file; do
(
printf "yarn run uglifyjs %s -cmo %s\n" "${_file}" "${_file/.js/.min.js}" &&
yarn run uglifyjs "${_file}" -cmo "${_file/.js/.min.js}"
) || :
done < <(find _includes/scripts -type f -name "*.js" ! -name "*.min.js" -print0)
}

_jvcl_::_uglifyjs
25 changes: 15 additions & 10 deletions .bash/osx/yarn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,18 @@
# shellcheck source=/dev/null
. ".bash/incl/all.sh"

_jvcl_::npm_audit() {
_jvcl_::yarn_audit() {
_jvcl_::h1 "npm audit..."
yarn npm audit || :
_jvcl_::h1 "depcheck..."
npx depcheck --detailed || :
_jvcl_::h1 "yarn upgrade-interactive..."
printf "Exit the terminal to allow the command to continue\n"
yarn upgrade-interactive || :
}

_jvcl_::webpack() {
_jvcl_::h1 "yarn run format..."
_jvcl_::h1 "webpack..."
yarn run format
if [ "${WEBPACK_MODE}" == "production" ]; then
yarn run build
Expand All @@ -32,7 +36,7 @@ _jvcl_::npm_package_version() {
}

_jvcl_::_sass_bootstrap() {
_jvcl_::h1 "copy node_modules..."
_jvcl_::h1 "node_modules copying..."
cp -pvrf "./node_modules/bootstrap/scss/"{_functions,_variables,_maps,_mixins,_utilities,_grid,_forms,_buttons,forms,mixins,vendor}* "./_sass/bootstrap"
}

Expand All @@ -47,19 +51,20 @@ _jvcl_::_sass_tippyjs() {

_jvcl_::yarn_update() {
if ! type "yarn" &>/dev/null; then
printf "\nERROR: yarn is not installed\n"
printf "\nERROR: yarn is not installed\n\n"
return
fi
_jvcl_::h1 "yarn update..."
yarn set version stable &&
yarn install &&
yarn up &&
yarn upgrade-interactive
(
yarn set version stable &&
yarn install &&
yarn up
) || :
}

_jvcl_::main() {
_jvcl_::yarn_update || :
_jvcl_::npm_audit
_jvcl_::yarn_update
_jvcl_::yarn_audit || :
_jvcl_::_sass_bootstrap
# _jvcl_::_sass_tippyjs
_jvcl_::webpack
Expand Down
4 changes: 2 additions & 2 deletions .bash/settings.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

BASH_STRICT_MODE=1
DEBUG=3
JEKYLL_ENV=production #development
WEBPACK_MODE=production #development
JEKYLL_ENV=production # development
WEBPACK_MODE=production # development

# GitHub Metadata
# <https://jekyll.github.io/github-metadata/configuration/>
Expand Down
7 changes: 1 addition & 6 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,10 @@
"command": ".bash/osx/jekyll.sh",
"detail": "Run server jekyll serve --config '_config-dev.yml' --livereload",
},
{
"label": "npm",
"command": ".bash/osx/npm.sh",
"detail": "Update your Node.js packages for this repository",
},
{
"label": "yarn",
"command": ".bash/osx/yarn.sh",
"detail": "Upgrade package.json"
},
]
}
}
Binary file modified .yarn/install-state.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion _data/authors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ JV-conseil:

# This photo will be used in the about section
picture:
path: /assets/img/logo.png
path: /assets/img/logo.png
# srcset is optional, but can be used to provide higher res versions for retina displays
# srcset:
# 1x: https://via.placeholder.com/128x128
Expand Down
2 changes: 1 addition & 1 deletion _includes/scripts/custom.min.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
!function(){"use strict";$("a[href^='http']").each(function(){$(this).attr("target","_blank")})}();
!function(){"use strict";$("a[href^='http']").each(function(){$(this).attr("target","_blank")})}();
2 changes: 1 addition & 1 deletion _includes/scripts/dark-mode-fix.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion _includes/scripts/load-js.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion _includes/scripts/nomodule.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified assets/icomoon/fonts/icomoon.eot
Binary file not shown.
Binary file modified assets/icomoon/fonts/icomoon.ttf
Binary file not shown.
Binary file modified assets/icomoon/fonts/icomoon.woff
Binary file not shown.
2 changes: 1 addition & 1 deletion assets/icomoon/selection.json

Large diffs are not rendered by default.

Loading
Loading