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
baad40b7
Commit
baad40b7
authored
Aug 31, 2018
by
Philipp Nowinski
Browse files
[FEATURE] hardwire the linux switch
parent
eb45a890
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
8 deletions
+17
-8
core/logger.js
core/logger.js
+17
-8
No files found.
core/logger.js
View file @
baad40b7
...
@@ -4,6 +4,7 @@ const logSymbols = require('log-symbols');
...
@@ -4,6 +4,7 @@ const logSymbols = require('log-symbols');
const
timestamp
=
require
(
'
time-stamp
'
);
const
timestamp
=
require
(
'
time-stamp
'
);
const
chalk
=
require
(
'
chalk
'
);
const
chalk
=
require
(
'
chalk
'
);
const
notifier
=
require
(
'
node-notifier
'
);
const
notifier
=
require
(
'
node-notifier
'
);
const
freedesktopNotifier
=
require
(
'
freedesktop-notifications
'
);
const
path
=
require
(
'
path
'
);
const
path
=
require
(
'
path
'
);
const
browserSync
=
require
(
'
browser-sync
'
);
const
browserSync
=
require
(
'
browser-sync
'
);
const
{
argv
}
=
require
(
'
yargs
'
);
const
{
argv
}
=
require
(
'
yargs
'
);
...
@@ -78,15 +79,23 @@ module.exports = class Logger {
...
@@ -78,15 +79,23 @@ module.exports = class Logger {
* @param {String} _message The message for your notification
* @param {String} _message The message for your notification
*/
*/
static
displayNotification
(
_title
,
_message
)
{
static
displayNotification
(
_title
,
_message
)
{
notifier
.
notify
(
if
(
process
.
platform
===
'
linux
'
)
{
{
freedesktopNotifier
.
createNotification
(
{
title
:
_title
,
summary
:
_title
,
message
:
_message
,
body
:
_message
,
icon
:
path
.
join
(
__dirname
,
'
SGC.svg
'
),
icon
:
path
.
join
(
__dirname
,
'
SGC.svg
'
),
sound
:
true
,
}).
push
();
wait
:
false
}
else
{
}
notifier
.
notify
(
);
{
title
:
_title
,
message
:
_message
,
icon
:
path
.
join
(
__dirname
,
'
SGC.svg
'
),
sound
:
true
,
wait
:
false
}
);
}
}
}
/**
/**
...
...
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