workflow: sfc playground

This commit is contained in:
Evan You
2021-03-28 01:35:45 -04:00
parent 2424768808
commit f76ddc5ac3
28 changed files with 1654 additions and 23 deletions

View File

@@ -1367,7 +1367,7 @@ function markScopeIdentifier(
* but with some subtle differences as this needs to handle a wider range of
* possible syntax.
*/
function walkIdentifiers(
export function walkIdentifiers(
root: Node,
onIdentifier: (node: Identifier, parent: Node, parentStack: Node[]) => void
) {

View File

@@ -6,6 +6,12 @@ export { compileScript } from './compileScript'
export { rewriteDefault } from './rewriteDefault'
export { generateCodeFrame } from '@vue/compiler-core'
// Utilities
export { parse as babelParse } from '@babel/parser'
export { walkIdentifiers } from './compileScript'
import MagicString from 'magic-string'
export { MagicString }
// Types
export {
SFCParseOptions,

View File

@@ -16,6 +16,10 @@ export function warn(msg: string) {
}
export function warnExperimental(feature: string, rfcId: number) {
// eslint-disable-next-line
if (typeof window !== 'undefined') {
return
}
warnOnce(
`${feature} is still an experimental proposal.\n` +
`Follow its status at https://github.com/vuejs/rfcs/pull/${rfcId}.`