update docs urls
parent
a4fdd949be
commit
4f0e415df7
|
@ -2,9 +2,13 @@ import semver from 'semver'
|
||||||
|
|
||||||
export function docsUrl(version: string, paths: string | string[]): string {
|
export function docsUrl(version: string, paths: string | string[]): string {
|
||||||
let major = 0
|
let major = 0
|
||||||
let url = 'https://v0.tailwindcss.com/docs/'
|
let url = 'https://tailwindcss-v0.netlify.app/docs/'
|
||||||
if (semver.gte(version, '0.99.0')) {
|
if (semver.gte(version, '0.99.0')) {
|
||||||
major = 1
|
major = 1
|
||||||
|
url = 'https://v1.tailwindcss.com/docs/'
|
||||||
|
}
|
||||||
|
if (semver.gte(version, '1.99.0')) {
|
||||||
|
major = 2
|
||||||
url = 'https://tailwindcss.com/docs/'
|
url = 'https://tailwindcss.com/docs/'
|
||||||
}
|
}
|
||||||
const path = Array.isArray(paths)
|
const path = Array.isArray(paths)
|
||||||
|
|
Loading…
Reference in New Issue