Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Toolchain
sgc
Commits
06c4fc22
Commit
06c4fc22
authored
Aug 22, 2019
by
Stefan Galinski
🎮
Browse files
[TASK] Update node and apply ALL major upgrades
parent
a443f681
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
655 additions
and
331 deletions
+655
-331
core/node.sh
core/node.sh
+1
-1
core/tasks/images.js
core/tasks/images.js
+8
-6
package-lock.json
package-lock.json
+636
-314
package.json
package.json
+10
-10
No files found.
core/node.sh
View file @
06c4fc22
nodeversion
=
"10.
9.0
"
nodeversion
=
"10.
16.3
"
core/tasks/images.js
View file @
06c4fc22
...
...
@@ -108,17 +108,17 @@ module.exports = class Images extends Task {
this
.
_loadingSpinner
=
ora
();
this
.
_loadingSpinner
.
start
(
`Optimizing images...`
);
}
let
q
=
async
.
queue
((
image
,
callback
)
=>
{
let
q
ueue
=
async
.
queue
((
image
,
callback
)
=>
{
this
.
_optimizeImage
(
image
).
then
(
callback
);
},
20
);
_files
.
map
(
async
(
image
)
=>
{
q
.
push
(
image
,
(
_error
)
=>
{
q
ueue
.
push
(
image
,
(
_error
)
=>
{
if
(
_error
)
{
this
.
_handleError
(
_error
.
message
);
}
});
});
q
.
drain
=
()
=>
{
q
ueue
.
drain
(
()
=>
{
if
(
!
this
.
_embedded
)
{
this
.
_loadingSpinner
.
stop
();
}
...
...
@@ -126,7 +126,7 @@ module.exports = class Images extends Task {
if
(
this
.
_failedFiles
.
length
)
{
// emit empty line before
console
.
log
();
this
.
_logger
.
warning
(
chalk
.
bgYellow
(
chalk
.
black
(
'
Please note that the following images have been skipped due to an error:
'
)));
this
.
_logger
.
warning
(
chalk
.
bgYellow
(
chalk
.
black
(
'
Please note that the following images have been skipped due to an error:
'
)));
this
.
_failedFiles
.
forEach
((
file
)
=>
{
this
.
_logger
.
warning
(
chalk
.
white
(
` -
${
file
.
name
}
:`
));
this
.
_logger
.
warning
(
chalk
.
whiteBright
(
`
${
typeof
file
.
error
===
'
string
'
?
file
.
error
:
'
Error unknown
'
}
`
));
...
...
@@ -137,7 +137,9 @@ module.exports = class Images extends Task {
this
.
_logger
.
success
(
`Optimized
${
chalk
.
white
(
this
.
_touchedFiles
)}
of
${
_files
.
length
}
images in
${
_imagesPath
}
`
);
this
.
_logger
.
success
(
`Checked
${
chalk
.
white
(
_files
.
length
)}
images and saved
${
chalk
.
white
(
prettyBytes
(
saved
))}
(~
${
chalk
.
white
(
Math
.
round
((
saved
/
this
.
_totalBefore
)
*
100
)
+
'
%
'
)}
)`
);
_resolve
();
};
});
// or await the end
await
queue
.
drain
();
});
}
...
...
@@ -159,7 +161,7 @@ module.exports = class Images extends Task {
result
=
await
imagemin
.
buffer
(
buffer
,
{
plugins
:
[
imageminJpegtran
(),
imageminPngquant
({
quality
:
'
65-80
'
}),
imageminPngquant
({
quality
:
[
0.65
,
0.8
]
}),
imageminGifsicle
(),
imageminSvgo
({
plugins
:
[
...
...
package-lock.json
View file @
06c4fc22
This diff is collapsed.
Click to expand it.
package.json
View file @
06c4fc22
...
...
@@ -18,30 +18,30 @@
"
@babel/core
"
:
"
^7.5.5
"
,
"
@babel/polyfill
"
:
"
^7.4.4
"
,
"
@babel/preset-env
"
:
"
^7.5.5
"
,
"
@csstools/postcss-sass
"
:
"
^
2
.0.0
"
,
"
@csstools/postcss-sass
"
:
"
^
4
.0.0
"
,
"
@sgalinski/image-dimensions
"
:
"
^1.0.0
"
,
"
@sgalinski/inline-svg
"
:
"
^1.2.1
"
,
"
async
"
:
"
^
2.6.3
"
,
"
async
"
:
"
^
3.1.0
"
,
"
autoprefixer
"
:
"
^9.6.1
"
,
"
babelify
"
:
"
^
9
.0.0
"
,
"
babelify
"
:
"
^
10
.0.0
"
,
"
browser-sync
"
:
"
^2.26.7
"
,
"
browserify
"
:
"
^16.5.0
"
,
"
chalk
"
:
"
^2.4.2
"
,
"
core-js
"
:
"
^3.2.1
"
,
"
eslint
"
:
"
^
5.16.0
"
,
"
eslint
"
:
"
^
6.2.1
"
,
"
exorcist
"
:
"
^1.0.1
"
,
"
freedesktop-notifications
"
:
"
^1.4.0
"
,
"
gaze
"
:
"
^1.1.3
"
,
"
globby
"
:
"
^
8
.0.
2
"
,
"
globby
"
:
"
^
10
.0.
1
"
,
"
hirestime
"
:
"
^3.2.1
"
,
"
imagemin
"
:
"
^
6.1
.0
"
,
"
imagemin
"
:
"
^
7.0
.0
"
,
"
imagemin-gifsicle
"
:
"
^6.0.1
"
,
"
imagemin-jpegtran
"
:
"
^6.0.0
"
,
"
imagemin-pngquant
"
:
"
^
6
.0.
1
"
,
"
imagemin-pngquant
"
:
"
^
8
.0.
0
"
,
"
imagemin-svgo
"
:
"
^7.0.0
"
,
"
inline-source
"
:
"
^7.1.0
"
,
"
inquirer
"
:
"
^6.5.1
"
,
"
log-symbols
"
:
"
^
2.2
.0
"
,
"
log-symbols
"
:
"
^
3.0
.0
"
,
"
merge
"
:
"
^1.2.1
"
,
"
mkdirp
"
:
"
^0.5.1
"
,
"
node-notifier
"
:
"
^5.4.3
"
,
...
...
@@ -52,7 +52,7 @@
"
postcss-clean
"
:
"
^1.1.0
"
,
"
postcss-reporter
"
:
"
^6.0.1
"
,
"
pretty-bytes
"
:
"
^5.3.0
"
,
"
replace-in-file
"
:
"
^
3.4.4
"
,
"
replace-in-file
"
:
"
^
4.1.3
"
,
"
stylelint
"
:
"
^10.1.0
"
,
"
stylelint-declaration-strict-value
"
:
"
^1.1.3
"
,
"
stylelint-images
"
:
"
^2.0.0
"
,
...
...
@@ -63,6 +63,6 @@
"
time-stamp
"
:
"
^2.2.0
"
,
"
tinyify
"
:
"
^2.5.1
"
,
"
uglifyify
"
:
"
^5.0.2
"
,
"
yargs
"
:
"
^1
2
.0.
5
"
"
yargs
"
:
"
^1
4
.0.
0
"
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment