-
Notifications
You must be signed in to change notification settings - Fork 3.2k
docs(intro): update packages & CDN to redirect to other sections #4286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| </div> | ||
| )} | ||
| {props.ionicon && <ion-icon name={props.ionicon} className="Card-ionicon"></ion-icon>} | ||
| {props.iconset && ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| } | ||
|
|
||
| docs-cards:has(docs-card:only-child) { | ||
| grid-template-columns: 1fr 1fr; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is needed so that the JavaScript card does not stretch the entire width of the row.
| "destination": "/docs/react/add-to-existing" | ||
| }, | ||
| { | ||
| "source": "/docs/:version(v7)/react/adding-ionic-react-to-an-existing-react-project", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not include v6 here as the guide did not exist in v6.
| #### 1. Install the Packages | ||
|
|
||
| ```bash | ||
| npm install @ionic/vue @ionic/vue-router vue-router |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The @ionic/vue-router and vue-router installs are here instead of under "Set up Routing" like the React guide because @ionic/vue errors without vue-router being installed and it seemed weird to only install it without also including @ionic/vue-router.
| { | ||
| "input": "node_modules/@ionic/angular/css/core.css" | ||
| }, | ||
| { | ||
| "input": "node_modules/@ionic/angular/css/normalize.css" | ||
| }, | ||
| { | ||
| "input": "node_modules/@ionic/angular/css/structure.css" | ||
| }, | ||
| { | ||
| "input": "node_modules/@ionic/angular/css/typography.css" | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically we do not need normalize, structure or typography but some of the components will not look like they do in the docs without them so I added them here. I can remove if we would prefer just adding a note / link about adding them if needed.
| Update `src/app/app.html` to the following: | ||
|
|
||
| ```html title="src/app/app.html" | ||
| <ion-button>Button</ion-button> <ion-datetime></ion-datetime> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These being on the same line was done by the docs linter.
|
|
||
| This guide covers how to add Ionic React to an existing React project. If you're looking to start a new project from scratch, check out the [Ionic React Quickstart](/docs/react/quickstart.md) guide. For an overview of how Ionic React works with React, including version support and tooling, check out the [Ionic React Overview](/docs/react/overview.md). | ||
|
|
||
| :::tip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we note somewhere that this follows adding to a React app created with Vite?
|
|
||
| This guide covers how to add Ionic Vue to an existing Vue project. If you're looking to start a new project from scratch, check out the [Ionic Vue Quickstart](/docs/vue/quickstart.md) guide. For an overview of how Ionic Vue works with Vue, including version support and tooling, check out the [Ionic Vue Overview](/docs/vue/overview.md). | ||
|
|
||
| :::tip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we note somewhere that this follows adding to a Vue app created with Vite?
|
|
||
| Update `src/App.vue` to the following: | ||
|
|
||
| ```vue title="src/App.vue" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vue styling will not show up until this is merged: #4311

Resolves #446 in combination with #4322
What is the current behavior?
The Packages & CDN guide has some information on how to get started with Angular, React and Vue but these sections are incomplete. For example, we cover how to add React to an existing app here but it is missing a lot of steps that are documented in the guide here. It doesn't make sense to have the same information in two places.
What is the new behavior?
This PR updates the Packages & CDN guide to redirect out to the
Quickstart&Add to Existingguides for the packages, but keeps the CDN content in the CDN guide. React was the only framework that already had anAdd to Existingguide, so this also addsAdd to Existingguides for Angular & Vue and moves the content from the CDN to those.Ionic Packages & CDN Guide Changes
Below is a before & after of the CDN page (right-click and open the image in a new tab to see the images larger):
Add to Existing Guide Changes
React
Angular
Vue
Important
The React URL has changed. I set up redirects for this but it will break the JP docs if they are not updated right after. I could leave the old file to remove after the JP docs are updated if desired.