prettier warnings fixed

pull/3437/head
Tuğçe Küçükoğlu 2022-12-20 15:32:32 +03:00
parent f060c3a940
commit ee8e35aabd
7 changed files with 22 additions and 11 deletions

View File

@ -2,8 +2,10 @@
build
coverage
dist
out
public
styles
node_modules
.vscode
dist
.nuxt
.output

View File

@ -17,6 +17,7 @@ const fileModules = {},
veturAttributes = {};
const files = fs.readdirSync(componentPath);
files.forEach((file) => {
const { name } = path.parse(file);
@ -123,11 +124,13 @@ const createWebTypes = (component) => {
const createVeturTags = (component) => {
const attributes = [];
if (component.props) {
component.props.forEach((comp) => {
attributes.push(comp.name);
});
}
if (attributes.length > 0) {
veturTags[component.name] = {
description: component.description,
@ -154,10 +157,13 @@ Object.keys(fileModules).forEach((p) => {
});
const webTypesJson = JSON.stringify(webTypes, null, 2);
fs.writeFileSync(path.resolve(distDir, 'web-types.json'), webTypesJson);
const veturTagsJson = JSON.stringify(veturTags, null, 2);
fs.writeFileSync(path.resolve(distDir, 'vetur-tags.json'), veturTagsJson);
const veturAttributesJson = JSON.stringify(veturAttributes, null, 2);
fs.writeFileSync(path.resolve(distDir, 'vetur-attributes.json'), veturAttributesJson);

View File

@ -32,15 +32,6 @@ export default {
sidebarActive: false
};
},
mounted() {
if (this.isOutdatedIE()) {
this.$toast.add({
severity: 'warn',
summary: 'Limited Functionality',
detail: 'Although PrimeVue supports IE11, ThemeSwitcher in this application cannot be not fully supported by your browser. Please use a modern browser for the best experience of the showcase.'
});
}
},
watch: {
$route: {
immediate: true,
@ -59,6 +50,15 @@ export default {
}
}
},
mounted() {
if (this.isOutdatedIE()) {
this.$toast.add({
severity: 'warn',
summary: 'Limited Functionality',
detail: 'Although PrimeVue supports IE11, ThemeSwitcher in this application cannot be not fully supported by your browser. Please use a modern browser for the best experience of the showcase.'
});
}
},
methods: {
onMenuButtonClick() {
if (this.sidebarActive) {
@ -94,6 +94,7 @@ export default {
},
isOutdatedIE() {
let ua = window.navigator.userAgent;
if (ua.indexOf('MSIE ') > 0 || ua.indexOf('Trident/') > 0) {
return true;
}

View File

@ -1,6 +1,5 @@
import vueJsx from '@vitejs/plugin-vue-jsx';
const path = require('path');
const baseUrl = process.env.NODE_ENV === 'production' ? '/primevue-nuxt/' : '/';
// https://v3.nuxtjs.org/api/configuration/nuxt.config

View File

@ -12,6 +12,7 @@ const $fullCalendar = {
Vue.config.globalProperties.$fullCalendar = FullCalendar;
}
};
export default defineNuxtPlugin((nuxtApp) => {
nuxtApp.vueApp.use($fullCalendar);
});

View File

@ -144,6 +144,7 @@ function addSFC() {
.forEach(({ name: folderName }) => {
fs.readdirSync(path.resolve(__dirname, './components/' + folderName)).forEach((file) => {
let name = file.split(/(.vue)$|(.js)$/)[0].toLowerCase();
if (/\.vue$/.test(file) && name === folderName) {
addEntry(folderName, file, name);
}

View File

@ -31,6 +31,7 @@ export default class CustomerService {
.map((k) => encodeURIComponent(k) + '=' + encodeURIComponent(params[k]))
.join('&')
: '';
return fetch('https://www.primefaces.org/data/customers?' + queryParams).then((res) => res.json());
}
}