Skip to content
This repository was archived by the owner on Dec 18, 2024. It is now read-only.

feat: add version and version picker #406

Merged
merged 1 commit into from
Mar 10, 2018

Conversation

tinayuangao
Copy link
Contributor

  • add version picker (using menu)
  • make stackblitz use the same version as the doc site

Demo: https://material2-docs-dev.firebaseapp.com/

title: '5.2.4'
},
{
url: `http://material2-docs-dev.firebaseapp.com`,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this supposed to be pointed at the dev one?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No... I will update the url once we set up the domain for v5.


materialVersion = materialVersion;

displayVersion = materialVersion.match(/\d+.\d+.\d+/)[0];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extract the regex into a var

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Thanks for review!

Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tinayuangao
Copy link
Contributor Author

Updated the pr with actual urls.
Added npm scripts for v5-dev and v5-prod.

The v5 is available https://v5.material.angular.io/ (without version picker)

Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

package.json Outdated
"publish-dev": "npm run build-themes && ng build --aot --prod && firebase use material2-docs-dev && firebase deploy"
"publish-dev": "npm run build-themes && ng build --aot --prod && firebase use material2-docs-dev && firebase deploy",
"publish-v5-prod": "npm run build-themes && ng build --aot --prod && firebase use v5-material-angular-io && firebase deploy",
"publish-v5-dev": "npm run build-themes && ng build --aot --prod && firebase use material2-docs-5 && firebase deploy"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

File an issue saying we should create a deploy script for this rather than adding more npm commands over time?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added file tools/deploy.sh and updated package.json

Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, you can merge whenever

@tinayuangao tinayuangao merged commit 11918de into angular:master Mar 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants