mirror of https://github.com/sveltejs/svelte
parent
e3fef0f740
commit
1c2cf7e52b
@ -0,0 +1,9 @@
|
|||||||
|
export default function get_prefix(str?: string): string {
|
||||||
|
const standard_prefix = 'svelte-';
|
||||||
|
if (!str
|
||||||
|
|| typeof str !== 'string') return standard_prefix;
|
||||||
|
str = str.replace(/^[^_-a-z]+|[^_-a-z0-9]/gi, '');
|
||||||
|
return str.length
|
||||||
|
? str
|
||||||
|
: standard_prefix;
|
||||||
|
}
|
@ -0,0 +1,5 @@
|
|||||||
|
export default {
|
||||||
|
compileOptions: {
|
||||||
|
prefix: ' $!*'
|
||||||
|
}
|
||||||
|
};
|
@ -0,0 +1 @@
|
|||||||
|
div.svelte-xyz{color:blue}
|
@ -0,0 +1,7 @@
|
|||||||
|
<div></div>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
div {
|
||||||
|
color: blue;
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,5 @@
|
|||||||
|
export default {
|
||||||
|
compileOptions: {
|
||||||
|
prefix: 'me$-'
|
||||||
|
}
|
||||||
|
};
|
@ -0,0 +1 @@
|
|||||||
|
div.me-xyz{color:blue}
|
@ -0,0 +1,7 @@
|
|||||||
|
<div></div>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
div {
|
||||||
|
color: blue;
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,5 @@
|
|||||||
|
export default {
|
||||||
|
compileOptions: {
|
||||||
|
prefix: 'me -'
|
||||||
|
}
|
||||||
|
};
|
@ -0,0 +1 @@
|
|||||||
|
div.me-xyz{color:blue}
|
@ -0,0 +1,7 @@
|
|||||||
|
<div></div>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
div {
|
||||||
|
color: blue;
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,5 @@
|
|||||||
|
export default {
|
||||||
|
compileOptions: {
|
||||||
|
prefix: true
|
||||||
|
}
|
||||||
|
};
|
@ -0,0 +1 @@
|
|||||||
|
div.svelte-xyz{color:blue}
|
@ -0,0 +1,7 @@
|
|||||||
|
<div></div>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
div {
|
||||||
|
color: blue;
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,5 @@
|
|||||||
|
export default {
|
||||||
|
compileOptions: {
|
||||||
|
prefix: '0me-'
|
||||||
|
}
|
||||||
|
};
|
@ -0,0 +1 @@
|
|||||||
|
div.me-xyz{color:blue}
|
@ -0,0 +1,7 @@
|
|||||||
|
<div></div>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
div {
|
||||||
|
color: blue;
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,5 @@
|
|||||||
|
export default {
|
||||||
|
compileOptions: {
|
||||||
|
prefix: ' me-'
|
||||||
|
}
|
||||||
|
};
|
@ -0,0 +1 @@
|
|||||||
|
div.me-xyz{color:blue}
|
@ -0,0 +1,7 @@
|
|||||||
|
<div></div>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
div {
|
||||||
|
color: blue;
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,5 @@
|
|||||||
|
export default {
|
||||||
|
compileOptions: {
|
||||||
|
prefix: 'me-'
|
||||||
|
}
|
||||||
|
};
|
@ -0,0 +1 @@
|
|||||||
|
div.me-xyz{color:blue}
|
@ -0,0 +1,7 @@
|
|||||||
|
<div></div>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
div {
|
||||||
|
color: blue;
|
||||||
|
}
|
||||||
|
</style>
|
Loading…
Reference in new issue