From 8cc9c45db99b20cfe1a3a26e8144be1020ba4483 Mon Sep 17 00:00:00 2001 From: Cagatay Civici Date: Mon, 18 Jan 2021 17:35:36 +0300 Subject: [PATCH] Resolver for terminalservice --- rollup.config.js | 34 +++++++++++++++++++++------- src/components/terminal/Terminal.vue | 2 +- src/views/terminal/TerminalDemo.vue | 2 +- vue.config.js | 1 + 4 files changed, 29 insertions(+), 10 deletions(-) diff --git a/rollup.config.js b/rollup.config.js index cb6fca82f..a74b97097 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -2,21 +2,38 @@ import vue from 'rollup-plugin-vue'; import postcss from 'rollup-plugin-postcss'; import { terser } from 'rollup-plugin-terser'; -console.log(process.env.NODE_ENV); - const fs = require('fs-extra'); const path = require('path'); let entries = []; +let globalDependencies = { + 'vue': 'Vue', + 'primevue/ripple': 'primevue.ripple', + 'primevue/utils': 'primevue.utils', + 'primevue/button': 'primevue.button', + 'primevue/inputtext': 'primevue.inputtext', + 'primevue/dialog': 'primevue.dialog', + 'primevue/paginator': 'primevue.paginator', + 'primevue/confirmationeventbus': 'primevue.confirmationeventbus', + 'primevue/toasteventbus': 'primevue.toasteventbus', + 'primevue/useconfirm': 'primevue.useconfirm', + 'primevue/usetoast': 'primevue.usetoast', + 'primevue/progressbar': 'primevue.progressbar', + 'primevue/message': 'primevue.message', + 'primevue/dropdown': 'primevue.dropdown', + 'primevue/menu': 'primevue.menu', + '@fullcalendar/core': 'FullCalendar' +} + function addEntry(folder, inFile, outFile) { entries.push({ input: 'src/components/' + folder + '/' + inFile, output: [ { format: 'umd', - name: folder, - file: 'dist/' + folder + '/' + outFile + '.umd.js' + name: 'primevue.' + folder, + file: 'dist/' + folder + '/' + outFile + '.umd.js', }, { format: 'esm', @@ -24,9 +41,9 @@ function addEntry(folder, inFile, outFile) { }, { format: 'iife', - name: folder, + name: 'primevue.' + folder, file: 'dist/' + folder + '/' + outFile + '.js', - external: ['Ripple'] + globals: globalDependencies } ], plugins: [ @@ -35,7 +52,7 @@ function addEntry(folder, inFile, outFile) { ] }); - entries.push({ + /*entries.push({ input: 'src/components/' + folder + '/' + inFile, output: [ { @@ -58,7 +75,7 @@ function addEntry(folder, inFile, outFile) { postcss(), terser() ] - }); + });*/ } function addSFC() { @@ -93,6 +110,7 @@ function addServices() { addEntry('toastservice', 'ToastService.js', 'toastservice'); addEntry('toasteventbus', 'ToastEventBus.js', 'toasteventbus'); addEntry('usetoast', 'usetoast.js', 'usetoast'); + addEntry('terminalservice', 'TerminalService.js', 'terminalservice'); } addSFC(); diff --git a/src/components/terminal/Terminal.vue b/src/components/terminal/Terminal.vue index bd0364779..c2cbaa493 100755 --- a/src/components/terminal/Terminal.vue +++ b/src/components/terminal/Terminal.vue @@ -16,7 +16,7 @@