mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-04-22 04:18:33 -05:00
feat(ui): project/plugin notifs
This commit is contained in:
@@ -16,6 +16,7 @@ const {
|
||||
updatePackage
|
||||
} = require('@vue/cli/lib/util/installDeps')
|
||||
const invoke = require('@vue/cli/lib/invoke')
|
||||
const notifier = require('node-notifier')
|
||||
// Subs
|
||||
const channels = require('../channels')
|
||||
// Connectors
|
||||
@@ -206,6 +207,13 @@ function install (id, context) {
|
||||
await installPackage(cwd.get(), getCommand(), null, id)
|
||||
await initPrompts(id, context)
|
||||
installationStep = 'config'
|
||||
|
||||
notifier.notify({
|
||||
title: `Plugin installed`,
|
||||
message: `Plugin ${id} installed, next step is configuration`,
|
||||
icon: path.resolve(__dirname, '../../assets/done.png')
|
||||
})
|
||||
|
||||
return getInstallation(context)
|
||||
})
|
||||
}
|
||||
@@ -221,6 +229,13 @@ function uninstall (id, context) {
|
||||
await uninstallPackage(cwd.get(), getCommand(), null, id)
|
||||
currentPluginId = null
|
||||
installationStep = null
|
||||
|
||||
notifier.notify({
|
||||
title: `Plugin uninstalled`,
|
||||
message: `Plugin ${id} uninstalled`,
|
||||
icon: path.resolve(__dirname, '../../assets/done.png')
|
||||
})
|
||||
|
||||
return getInstallation(context)
|
||||
})
|
||||
}
|
||||
@@ -239,6 +254,13 @@ function runInvoke (id, context) {
|
||||
// Run plugin api
|
||||
runPluginApi(id, context)
|
||||
installationStep = 'diff'
|
||||
|
||||
notifier.notify({
|
||||
title: `Plugin invoke sucess`,
|
||||
message: `Plugin ${id} invoked successfully`,
|
||||
icon: path.resolve(__dirname, '../../assets/done.png')
|
||||
})
|
||||
|
||||
return getInstallation(context)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ const { getFeatures } = require('@vue/cli/lib/util/features')
|
||||
const { defaults } = require('@vue/cli/lib/options')
|
||||
const { toShortPluginId } = require('@vue/cli-shared-utils')
|
||||
const { progress: installProgress } = require('@vue/cli/lib/util/installDeps')
|
||||
const notifier = require('node-notifier')
|
||||
// Connectors
|
||||
const progress = require('./progress')
|
||||
const cwd = require('./cwd')
|
||||
@@ -273,6 +274,12 @@ async function create (input, context) {
|
||||
await creator.create({}, preset)
|
||||
removeCreator()
|
||||
|
||||
notifier.notify({
|
||||
title: `Project created`,
|
||||
message: `Project ${cwd.get()} created`,
|
||||
icon: path.resolve(__dirname, '../../assets/done.png')
|
||||
})
|
||||
|
||||
return importProject({
|
||||
path: targetDir
|
||||
}, context)
|
||||
|
||||
Reference in New Issue
Block a user