From c3d791be085c72b3f861e5d516a39df42324c2a7 Mon Sep 17 00:00:00 2001
From: Cagatay Civici
Date: Wed, 24 Jan 2024 15:49:48 +0300
Subject: [PATCH] Add auto-import guide
---
assets/menu/menu.json | 8 ++-
components/landing/FooterSection.vue | 2 +-
components/landing/HeroSection.vue | 2 +-
doc/autoimport/ExampleDoc.vue | 8 +++
doc/autoimport/OverviewDoc.vue | 29 +++++++++++
doc/autoimport/UnpluginDoc.vue | 59 +++++++++++++++++++++++
doc/{installation => setup}/GuidesDoc.vue | 0
pages/autoimport/index.vue | 46 ++++++++++++++++++
pages/{installation => setup}/index.vue | 8 +--
9 files changed, 154 insertions(+), 8 deletions(-)
create mode 100644 doc/autoimport/ExampleDoc.vue
create mode 100644 doc/autoimport/OverviewDoc.vue
create mode 100644 doc/autoimport/UnpluginDoc.vue
rename doc/{installation => setup}/GuidesDoc.vue (100%)
create mode 100644 pages/autoimport/index.vue
rename pages/{installation => setup}/index.vue (71%)
diff --git a/assets/menu/menu.json b/assets/menu/menu.json
index a78f86d74..1f54976eb 100644
--- a/assets/menu/menu.json
+++ b/assets/menu/menu.json
@@ -9,8 +9,8 @@
"to": "/introduction"
},
{
- "name": "Installation",
- "to": "/installation"
+ "name": "Setup",
+ "to": "/setup"
},
{
"name": "Playground",
@@ -44,6 +44,10 @@
"name": "Options",
"to": "/configuration"
},
+ {
+ "name": "Auto Import",
+ "to": "/autoimport"
+ },
{
"name": "CSS Layer",
"to": "/csslayer"
diff --git a/components/landing/FooterSection.vue b/components/landing/FooterSection.vue
index 4bd7be466..772d3c3d6 100644
--- a/components/landing/FooterSection.vue
+++ b/components/landing/FooterSection.vue
@@ -6,7 +6,7 @@
- General
-
- Get Started
+ Get Started
-
Examples
diff --git a/components/landing/HeroSection.vue b/components/landing/HeroSection.vue
index c1627036d..0e675231f 100644
--- a/components/landing/HeroSection.vue
+++ b/components/landing/HeroSection.vue
@@ -15,7 +15,7 @@
Elevate your web applications with PrimeVue's comprehensive suite of customizable, feature-rich UI components. With PrimeVue, turning your development vision into reality has never been easier.
-
+
Get Started
diff --git a/doc/autoimport/ExampleDoc.vue b/doc/autoimport/ExampleDoc.vue
new file mode 100644
index 000000000..c44aaa3f8
--- /dev/null
+++ b/doc/autoimport/ExampleDoc.vue
@@ -0,0 +1,8 @@
+
+
+
+ A complete example using a PrimeVue and unplugin is available at primevue-examples repository. You can also view this sample
+ live at Stackblitz.
+
+
+
diff --git a/doc/autoimport/OverviewDoc.vue b/doc/autoimport/OverviewDoc.vue
new file mode 100644
index 000000000..da7dfc596
--- /dev/null
+++ b/doc/autoimport/OverviewDoc.vue
@@ -0,0 +1,29 @@
+
+
+ PrimeVue components need to be imported and configured individually. In the next section, we'll cleanup the code using auto imports.
+
+
+
+
+
diff --git a/doc/autoimport/UnpluginDoc.vue b/doc/autoimport/UnpluginDoc.vue
new file mode 100644
index 000000000..ed7a99885
--- /dev/null
+++ b/doc/autoimport/UnpluginDoc.vue
@@ -0,0 +1,59 @@
+
+
+
+ The unplugin-vue-components library can automatically import and register PrimeVue components with the built-in resolver. Let's
+ begin with installing the library.
+
+
+ Next step would be adding the PrimeVueResolver at vite.config using the Components plugin.
+
+
+ That's it, now the initialization code can be refactored as the following. For configuration like namespacing, visit the
+ official documentation.
+
+
+
+
+
+
diff --git a/doc/installation/GuidesDoc.vue b/doc/setup/GuidesDoc.vue
similarity index 100%
rename from doc/installation/GuidesDoc.vue
rename to doc/setup/GuidesDoc.vue
diff --git a/pages/autoimport/index.vue b/pages/autoimport/index.vue
new file mode 100644
index 000000000..5a82fa45c
--- /dev/null
+++ b/pages/autoimport/index.vue
@@ -0,0 +1,46 @@
+
+
+ Auto Import - PrimeVue
+
+
+
+
+
+
Auto Import
+
On-demand PrimeVue components with auto importing.
+
+
+
+
+
+
+
+
diff --git a/pages/installation/index.vue b/pages/setup/index.vue
similarity index 71%
rename from pages/installation/index.vue
rename to pages/setup/index.vue
index c0fba8045..8778e69e4 100644
--- a/pages/installation/index.vue
+++ b/pages/setup/index.vue
@@ -1,12 +1,12 @@
- Installation - PrimeVue
-
+ Setup - PrimeVue
+
-
Installation
+
Setup
Installation guides for popular development environments.
@@ -16,7 +16,7 @@