-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: restrict vuetify and other libs version to current major (#8002)
- Loading branch information
1 parent
43d83bb
commit d9b6867
Showing
41 changed files
with
175 additions
and
175 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -313,7 +313,7 @@ To use Vuetify in your project by directly importing it through CDNs (Content De | |
Don't forget to add both Vuetify and the main Vue library to your HTML file before the closing `</body>` tag. | ||
|
||
```html | ||
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/vue@2.x/dist/vue.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vuetify.js"></script> | ||
``` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,135 +1,135 @@ | ||
<template lang="pug"> | ||
form( | ||
method="POST" | ||
action="https://codepen.io/pen/define/" | ||
target="_blank" | ||
ref="form" | ||
) | ||
input( | ||
type="hidden" | ||
name="data" | ||
:value="value" | ||
) | ||
</template> | ||
|
||
<script> | ||
import { version } from 'vuetify' | ||
const title = 'Vuetify Example Pen' | ||
const cssResources = [ | ||
'https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900|Material+Icons', | ||
`https://cdn.jsdelivr.net/npm/vuetify@${version}/dist/vuetify.min.css` | ||
] | ||
const jsResources = [ | ||
'https://cdn.jsdelivr.net/npm/babel-polyfill/dist/polyfill.min.js', | ||
'https://cdn.jsdelivr.net/npm/vue/dist/vue.js', | ||
`https://cdn.jsdelivr.net/npm/vuetify@${version}/dist/vuetify.min.js` | ||
] | ||
export default { | ||
name: 'Codepen', | ||
props: { | ||
pen: { | ||
type: Object, | ||
default: () => ({}) | ||
}, | ||
title: { | ||
type: String, | ||
default: title | ||
} | ||
}, | ||
computed: { | ||
additionalScript () { | ||
const additional = this.pen.codepenAdditional || '' | ||
return additional | ||
.replace(/(<codepen-additional.*?>|<\/codepen-additional>$)/g, '') | ||
.replace(/\n {2}/g, '\n') | ||
.trim() + (additional ? '\n\n' : '') | ||
}, | ||
additionalResources () { | ||
const resources = this.pen.codepenResources || '{}' | ||
return Object.assign( | ||
{ css: [], js: [] }, | ||
JSON.parse( | ||
resources.replace(/(<codepen-resources.*?>|<\/codepen-resources>$)/g, '') | ||
) | ||
) | ||
}, | ||
script () { | ||
const imports = /(import*) ([^'\n]*) from ([^\n]*)/g | ||
let component = /export default {([\s\S]*)}/g.exec(this.pen.script || '') | ||
component = ((component && component[1]) || '') | ||
.replace(/\n {2}/g, '\n') | ||
.trim() | ||
let script = /<script>([\s\S]*)export default {/g.exec(this.pen.script || '') | ||
script = ((script && script[1]) || '') | ||
.replace(imports, '') | ||
.replace(/\n {2}/g, '\n') | ||
.trim() | ||
script += script ? '\n\n' : '' | ||
return this.additionalScript + script + | ||
`new Vue({ | ||
el: '#app', | ||
${component} | ||
})` | ||
}, | ||
style () { | ||
return { | ||
content: (this.pen.style || '').replace(/(<style.*?>|<\/style>)/g, '').replace(/\n {2}/g, '\n').trim(), | ||
language: /<style.*lang=["'](.*)["'].*>/.exec(this.pen.style || '') | ||
} | ||
}, | ||
template () { | ||
const template = this.pen.template || '' | ||
return template | ||
.replace(/(<template>|<\/template>$)/g, '') | ||
.replace(/\n/g, '\n ') | ||
.trim() | ||
}, | ||
editors () { | ||
const html = this.template && 0b100 | ||
const css = this.style.content && 0b010 | ||
const js = this.script && 0b001 | ||
return (html | css | js).toString(2) | ||
}, | ||
value () { | ||
const data = { | ||
title: this.title, | ||
html: | ||
`<div id="app"> | ||
<v-app id="inspire"> | ||
${this.template} | ||
</v-app> | ||
</div>`, | ||
css: this.style.content, | ||
css_pre_processor: this.style.language ? this.style.language[1] : 'none', | ||
css_external: [...this.additionalResources.css, ...cssResources].join(';'), | ||
js: this.script, | ||
js_pre_processor: 'babel', | ||
js_external: [...this.additionalResources.js, ...jsResources].join(';'), | ||
editors: this.editors | ||
} | ||
return JSON.stringify(data) | ||
} | ||
}, | ||
methods: { | ||
submit () { | ||
this.$el.submit() | ||
} | ||
} | ||
} | ||
</script> | ||
<template lang="pug"> | ||
form( | ||
method="POST" | ||
action="https://codepen.io/pen/define/" | ||
target="_blank" | ||
ref="form" | ||
) | ||
input( | ||
type="hidden" | ||
name="data" | ||
:value="value" | ||
) | ||
</template> | ||
|
||
<script> | ||
import { version } from 'vuetify' | ||
const title = 'Vuetify Example Pen' | ||
const cssResources = [ | ||
'https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900|Material+Icons', | ||
`https://cdn.jsdelivr.net/npm/vuetify@${version}/dist/vuetify.min.css` | ||
] | ||
const jsResources = [ | ||
'https://cdn.jsdelivr.net/npm/babel-polyfill/dist/polyfill.min.js', | ||
'https://cdn.jsdelivr.net/npm/vue@2.x/dist/vue.js', | ||
`https://cdn.jsdelivr.net/npm/vuetify@${version}/dist/vuetify.min.js` | ||
] | ||
export default { | ||
name: 'Codepen', | ||
props: { | ||
pen: { | ||
type: Object, | ||
default: () => ({}) | ||
}, | ||
title: { | ||
type: String, | ||
default: title | ||
} | ||
}, | ||
computed: { | ||
additionalScript () { | ||
const additional = this.pen.codepenAdditional || '' | ||
return additional | ||
.replace(/(<codepen-additional.*?>|<\/codepen-additional>$)/g, '') | ||
.replace(/\n {2}/g, '\n') | ||
.trim() + (additional ? '\n\n' : '') | ||
}, | ||
additionalResources () { | ||
const resources = this.pen.codepenResources || '{}' | ||
return Object.assign( | ||
{ css: [], js: [] }, | ||
JSON.parse( | ||
resources.replace(/(<codepen-resources.*?>|<\/codepen-resources>$)/g, '') | ||
) | ||
) | ||
}, | ||
script () { | ||
const imports = /(import*) ([^'\n]*) from ([^\n]*)/g | ||
let component = /export default {([\s\S]*)}/g.exec(this.pen.script || '') | ||
component = ((component && component[1]) || '') | ||
.replace(/\n {2}/g, '\n') | ||
.trim() | ||
let script = /<script>([\s\S]*)export default {/g.exec(this.pen.script || '') | ||
script = ((script && script[1]) || '') | ||
.replace(imports, '') | ||
.replace(/\n {2}/g, '\n') | ||
.trim() | ||
script += script ? '\n\n' : '' | ||
return this.additionalScript + script + | ||
`new Vue({ | ||
el: '#app', | ||
${component} | ||
})` | ||
}, | ||
style () { | ||
return { | ||
content: (this.pen.style || '').replace(/(<style.*?>|<\/style>)/g, '').replace(/\n {2}/g, '\n').trim(), | ||
language: /<style.*lang=["'](.*)["'].*>/.exec(this.pen.style || '') | ||
} | ||
}, | ||
template () { | ||
const template = this.pen.template || '' | ||
return template | ||
.replace(/(<template>|<\/template>$)/g, '') | ||
.replace(/\n/g, '\n ') | ||
.trim() | ||
}, | ||
editors () { | ||
const html = this.template && 0b100 | ||
const css = this.style.content && 0b010 | ||
const js = this.script && 0b001 | ||
return (html | css | js).toString(2) | ||
}, | ||
value () { | ||
const data = { | ||
title: this.title, | ||
html: | ||
`<div id="app"> | ||
<v-app id="inspire"> | ||
${this.template} | ||
</v-app> | ||
</div>`, | ||
css: this.style.content, | ||
css_pre_processor: this.style.language ? this.style.language[1] : 'none', | ||
css_external: [...this.additionalResources.css, ...cssResources].join(';'), | ||
js: this.script, | ||
js_pre_processor: 'babel', | ||
js_external: [...this.additionalResources.js, ...jsResources].join(';'), | ||
editors: this.editors | ||
} | ||
return JSON.stringify(data) | ||
} | ||
}, | ||
methods: { | ||
submit () { | ||
this.$el.submit() | ||
} | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -101,6 +101,6 @@ | |
|
||
<codepen-resources lang="json"> | ||
{ | ||
"css": ["https://cdn.materialdesignicons.com/2.5.94/css/materialdesignicons.min.css"] | ||
"css": ["https://cdn.jsdelivr.net/npm/@mdi/[email protected]/css/materialdesignicons.min.css"] | ||
} | ||
</codepen-resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -120,6 +120,6 @@ | |
|
||
<codepen-resources lang="json"> | ||
{ | ||
"css": ["https://cdn.materialdesignicons.com/2.5.94/css/materialdesignicons.min.css"] | ||
"css": ["https://cdn.jsdelivr.net/npm/@mdi/[email protected]/css/materialdesignicons.min.css"] | ||
} | ||
</codepen-resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -95,6 +95,6 @@ | |
|
||
<codepen-resources lang="json"> | ||
{ | ||
"css": ["https://cdn.materialdesignicons.com/2.5.94/css/materialdesignicons.min.css"] | ||
"css": ["https://cdn.jsdelivr.net/npm/@mdi/[email protected]/css/materialdesignicons.min.css"] | ||
} | ||
</codepen-resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -200,6 +200,6 @@ | |
|
||
<codepen-resources lang="json"> | ||
{ | ||
"css": ["https://cdn.materialdesignicons.com/2.5.94/css/materialdesignicons.min.css"] | ||
"css": ["https://cdn.jsdelivr.net/npm/@mdi/[email protected]/css/materialdesignicons.min.css"] | ||
} | ||
</codepen-resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,6 +58,6 @@ | |
|
||
<codepen-resources lang="json"> | ||
{ | ||
"css": ["https://cdn.materialdesignicons.com/2.5.94/css/materialdesignicons.min.css"] | ||
"css": ["https://cdn.jsdelivr.net/npm/@mdi/[email protected]/css/materialdesignicons.min.css"] | ||
} | ||
</codepen-resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,6 @@ | |
<codepen-resources lang="json"> | ||
{ | ||
"js": ["https://use.fontawesome.com/releases/v5.0.6/js/all.js"], | ||
"css": ["https://cdn.materialdesignicons.com/2.5.94/css/materialdesignicons.min.css"] | ||
"css": ["https://cdn.jsdelivr.net/npm/@mdi/[email protected]/css/materialdesignicons.min.css"] | ||
} | ||
</codepen-resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,6 +57,6 @@ | |
|
||
<codepen-resources lang="json"> | ||
{ | ||
"css": ["https://cdn.materialdesignicons.com/2.5.94/css/materialdesignicons.min.css"] | ||
"css": ["https://cdn.jsdelivr.net/npm/@mdi/[email protected]/css/materialdesignicons.min.css"] | ||
} | ||
</codepen-resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,6 +37,6 @@ | |
|
||
<codepen-resources lang="json"> | ||
{ | ||
"css": ["https://cdn.materialdesignicons.com/2.5.94/css/materialdesignicons.min.css"] | ||
"css": ["https://cdn.jsdelivr.net/npm/@mdi/[email protected]/css/materialdesignicons.min.css"] | ||
} | ||
</codepen-resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -124,6 +124,6 @@ | |
|
||
<codepen-resources lang="json"> | ||
{ | ||
"css": ["https://cdn.materialdesignicons.com/2.5.94/css/materialdesignicons.min.css"] | ||
"css": ["https://cdn.jsdelivr.net/npm/@mdi/[email protected]/css/materialdesignicons.min.css"] | ||
} | ||
</codepen-resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,6 @@ | |
|
||
<codepen-resources lang="json"> | ||
{ | ||
"css": ["https://cdn.materialdesignicons.com/2.5.94/css/materialdesignicons.min.css"] | ||
"css": ["https://cdn.jsdelivr.net/npm/@mdi/[email protected]/css/materialdesignicons.min.css"] | ||
} | ||
</codepen-resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,6 @@ | |
|
||
<codepen-resources lang="json"> | ||
{ | ||
"css": ["https://cdn.materialdesignicons.com/2.5.94/css/materialdesignicons.min.css"] | ||
"css": ["https://cdn.jsdelivr.net/npm/@mdi/[email protected]/css/materialdesignicons.min.css"] | ||
} | ||
</codepen-resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,6 @@ | |
|
||
<codepen-resources lang="json"> | ||
{ | ||
"css": ["https://cdn.materialdesignicons.com/2.5.94/css/materialdesignicons.min.css"] | ||
"css": ["https://cdn.jsdelivr.net/npm/@mdi/[email protected]/css/materialdesignicons.min.css"] | ||
} | ||
</codepen-resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,6 +59,6 @@ | |
|
||
<codepen-resources lang="json"> | ||
{ | ||
"css": ["https://cdn.materialdesignicons.com/2.5.94/css/materialdesignicons.min.css"] | ||
"css": ["https://cdn.jsdelivr.net/npm/@mdi/[email protected]/css/materialdesignicons.min.css"] | ||
} | ||
</codepen-resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,6 +48,6 @@ | |
|
||
<codepen-resources lang="json"> | ||
{ | ||
"css": ["https://cdn.materialdesignicons.com/2.5.94/css/materialdesignicons.min.css"] | ||
"css": ["https://cdn.jsdelivr.net/npm/@mdi/[email protected]/css/materialdesignicons.min.css"] | ||
} | ||
</codepen-resources> |
Oops, something went wrong.