import pkg from '../../../package.json'; import { services } from './services'; const PrimeVue = { version: '^4.0.0-beta.4', description: 'PrimeVue is an open source UI library for Vue featuring a rich set of 80+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with PrimeBlock, which has 400+ ready to use UI blocks to build spectacular applications in no time.' }; const app_dependencies = pkg ? pkg.devDependencies : {}; const core_dependencies = { vue: '^3.2.45', '@vitejs/plugin-vue': '^4.0.0', vite: '^4.0.0', primevue: PrimeVue.version || 'latest', primeicons: app_dependencies['primeicons'] || 'latest', tailwindcss: app_dependencies['tailwindcss'] || 'latest', autoprefixer: app_dependencies['autoprefixer'] || 'latest', postcss: app_dependencies['postcss'] || 'latest', 'tailwindcss-primeui': app_dependencies['tailwindcss-primeui'] || 'latest' }; // create-vue -> https://github.com/vuejs/create-vue const getVueApp = (props = {}, sourceType) => { const path = 'src/'; const { code: sources, title = 'primevue_demo', description = '', service, extPages, dependencies: deps, component, extFiles } = props; const dependencies = { ...core_dependencies, ...deps }; const fileExtension = '.vue'; const mainFileName = 'App'; const sourceFileName = `${path}${mainFileName}${fileExtension}`; let extFilesSource = extFiles ? extFiles[sourceType.language] : {}; let element = '', imports = '', themeSwitchCode = ''; if (deps !== null && component !== null) { imports += `import ${component} from 'primevue/${component.toLowerCase()}'; `; element += `app.component('${component}', ${component}); `; } // App.vue themeSwitchCode = ''.concat( `