Resolver for terminalservice
parent
034fb6c146
commit
8cc9c45db9
|
@ -2,21 +2,38 @@ import vue from 'rollup-plugin-vue';
|
||||||
import postcss from 'rollup-plugin-postcss';
|
import postcss from 'rollup-plugin-postcss';
|
||||||
import { terser } from 'rollup-plugin-terser';
|
import { terser } from 'rollup-plugin-terser';
|
||||||
|
|
||||||
console.log(process.env.NODE_ENV);
|
|
||||||
|
|
||||||
const fs = require('fs-extra');
|
const fs = require('fs-extra');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
|
||||||
let entries = [];
|
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) {
|
function addEntry(folder, inFile, outFile) {
|
||||||
entries.push({
|
entries.push({
|
||||||
input: 'src/components/' + folder + '/' + inFile,
|
input: 'src/components/' + folder + '/' + inFile,
|
||||||
output: [
|
output: [
|
||||||
{
|
{
|
||||||
format: 'umd',
|
format: 'umd',
|
||||||
name: folder,
|
name: 'primevue.' + folder,
|
||||||
file: 'dist/' + folder + '/' + outFile + '.umd.js'
|
file: 'dist/' + folder + '/' + outFile + '.umd.js',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
format: 'esm',
|
format: 'esm',
|
||||||
|
@ -24,9 +41,9 @@ function addEntry(folder, inFile, outFile) {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
format: 'iife',
|
format: 'iife',
|
||||||
name: folder,
|
name: 'primevue.' + folder,
|
||||||
file: 'dist/' + folder + '/' + outFile + '.js',
|
file: 'dist/' + folder + '/' + outFile + '.js',
|
||||||
external: ['Ripple']
|
globals: globalDependencies
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
plugins: [
|
plugins: [
|
||||||
|
@ -35,7 +52,7 @@ function addEntry(folder, inFile, outFile) {
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
entries.push({
|
/*entries.push({
|
||||||
input: 'src/components/' + folder + '/' + inFile,
|
input: 'src/components/' + folder + '/' + inFile,
|
||||||
output: [
|
output: [
|
||||||
{
|
{
|
||||||
|
@ -58,7 +75,7 @@ function addEntry(folder, inFile, outFile) {
|
||||||
postcss(),
|
postcss(),
|
||||||
terser()
|
terser()
|
||||||
]
|
]
|
||||||
});
|
});*/
|
||||||
}
|
}
|
||||||
|
|
||||||
function addSFC() {
|
function addSFC() {
|
||||||
|
@ -93,6 +110,7 @@ function addServices() {
|
||||||
addEntry('toastservice', 'ToastService.js', 'toastservice');
|
addEntry('toastservice', 'ToastService.js', 'toastservice');
|
||||||
addEntry('toasteventbus', 'ToastEventBus.js', 'toasteventbus');
|
addEntry('toasteventbus', 'ToastEventBus.js', 'toasteventbus');
|
||||||
addEntry('usetoast', 'usetoast.js', 'usetoast');
|
addEntry('usetoast', 'usetoast.js', 'usetoast');
|
||||||
|
addEntry('terminalservice', 'TerminalService.js', 'terminalservice');
|
||||||
}
|
}
|
||||||
|
|
||||||
addSFC();
|
addSFC();
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import TerminalService from '../terminalservice/TerminalService';
|
import TerminalService from 'primevue/terminalservice';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import TerminalDoc from './TerminalDoc';
|
import TerminalDoc from './TerminalDoc';
|
||||||
import TerminalService from '../../components/terminalservice/TerminalService';
|
import TerminalService from 'primevue/terminalservice';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -20,6 +20,7 @@ module.exports = {
|
||||||
'primevue/message': path.resolve(__dirname, 'src/components/message/Message.vue'),
|
'primevue/message': path.resolve(__dirname, 'src/components/message/Message.vue'),
|
||||||
'primevue/confirmationeventbus': path.resolve(__dirname, 'src/components/confirmationeventbus/ConfirmationEventBus.js'),
|
'primevue/confirmationeventbus': path.resolve(__dirname, 'src/components/confirmationeventbus/ConfirmationEventBus.js'),
|
||||||
'primevue/toasteventbus': path.resolve(__dirname, 'src/components/toasteventbus/ToastEventBus.js'),
|
'primevue/toasteventbus': path.resolve(__dirname, 'src/components/toasteventbus/ToastEventBus.js'),
|
||||||
|
'primevue/terminalservice': path.resolve(__dirname, 'src/components/terminalservice/TerminalService.js')
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
|
|
Loading…
Reference in New Issue