mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-05-03 18:40:45 -05:00
feat(ui): Task notifs
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
"lowdb": "^1.0.0",
|
||||
"lru-cache": "^4.1.2",
|
||||
"mkdirp": "^0.5.1",
|
||||
"node-notifier": "^5.2.1",
|
||||
"rimraf": "^2.6.2",
|
||||
"semver": "^5.5.0",
|
||||
"shortid": "^2.2.8",
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
@@ -1,5 +1,7 @@
|
||||
const path = require('path')
|
||||
const execa = require('execa')
|
||||
const terminate = require('terminate')
|
||||
const notifier = require('node-notifier')
|
||||
// Subs
|
||||
const channels = require('../channels')
|
||||
// Connectors
|
||||
@@ -295,6 +297,11 @@ function run (id, context) {
|
||||
message: `Task ${task.id} ended with error code ${code}`,
|
||||
type: 'error'
|
||||
}, context)
|
||||
notifier.notify({
|
||||
title: `Task error`,
|
||||
message: `Task ${task.id} ended with error code ${code}`,
|
||||
icon: path.resolve(__dirname, '../../assets/error.png')
|
||||
})
|
||||
} else {
|
||||
updateOne({
|
||||
id: task.id,
|
||||
@@ -305,6 +312,12 @@ function run (id, context) {
|
||||
message: `Task ${task.id} completed`,
|
||||
type: 'done'
|
||||
}, context)
|
||||
notifier.notify({
|
||||
title: `Task completed`,
|
||||
message: `Task ${task.id} completed`,
|
||||
icon: path.resolve(__dirname, '../../assets/done.png')
|
||||
})
|
||||
console.log(path.resolve(__dirname, '../../assets/done.png'))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user