use snake_case for method names

pull/5639/head
Ivan Hofer 5 years ago
parent 6d85265858
commit b6e9574805

@ -45,7 +45,7 @@ export default function dom(
if (should_add_css) {
body.push(b`
function ${add_css}(target) {
@appendStyleIfNotPresent(target, "${component.stylesheet.id.replace('svelte-', '')}", "${styles}");
@append_style_if_not_present(target, "${component.stylesheet.id.replace('svelte-', '')}", "${styles}");
}
`);
}
@ -529,7 +529,7 @@ export default function dom(
constructor(options) {
super(${options.dev && 'options'});
${should_add_css && b`@addCssToComponent(this, ${add_css}, options);`}
${should_add_css && b`@add_css_to_component(this, ${add_css}, options);`}
@init(this, options, ${definition}, ${has_create_fragment ? 'create_fragment' : 'null'}, ${not_equal}, ${prop_indexes}, ${dirty});
${options.dev && b`@dispatch_dev("SvelteRegisterComponent", { component: this, tagName: "${name.name}", options, id: create_fragment.name });`}

@ -98,7 +98,7 @@ function make_dirty(component, i) {
}
export function addCssToComponent(component, add_css, options) {
export function add_css_to_component(component, add_css, options) {
component.$$ = {
customStyleTag: options.customStyleTag || current_component && current_component.$$.customStyleTag
};

@ -1,6 +1,6 @@
import { has_prop } from './utils';
export function appendStyleIfNotPresent(
export function append_style_if_not_present(
target: Element,
styleSheetId: string,
styles: string,

@ -1,9 +1,9 @@
/* generated by Svelte vX.Y.Z */
import {
SvelteComponent,
addCssToComponent,
add_css_to_component,
append,
appendStyleIfNotPresent,
append_style_if_not_present,
attr,
detach,
element,
@ -15,8 +15,8 @@ import {
text
} from "svelte/internal";
function add_css(customStyleTag) {
appendStyleIfNotPresent(customStyleTag, "1a7i8ec", "p.svelte-1a7i8ec{color:red}");
function add_css(target) {
append_style_if_not_present(target, "1a7i8ec", "p.svelte-1a7i8ec{color:red}");
}
function create_fragment(ctx) {
@ -57,7 +57,7 @@ function instance($$self, $$props, $$invalidate) {
class Component extends SvelteComponent {
constructor(options) {
super();
addCssToComponent(this, add_css, options);
add_css_to_component(this, add_css, options);
init(this, options, instance, create_fragment, safe_not_equal, { foo: 0 });
}
}

@ -1,8 +1,8 @@
/* generated by Svelte vX.Y.Z */
import {
SvelteComponent,
addCssToComponent,
appendStyleIfNotPresent,
add_css_to_component,
append_style_if_not_present,
attr,
detach,
element,
@ -12,8 +12,8 @@ import {
safe_not_equal
} from "svelte/internal";
function add_css(customStyleTag) {
appendStyleIfNotPresent(customStyleTag, "1slhpfn", "@media(min-width: 1px){div.svelte-1slhpfn{color:red}}");
function add_css(target) {
append_style_if_not_present(target, "1slhpfn", "@media(min-width: 1px){div.svelte-1slhpfn{color:red}}");
}
function create_fragment(ctx) {
@ -39,7 +39,7 @@ function create_fragment(ctx) {
class Component extends SvelteComponent {
constructor(options) {
super();
addCssToComponent(this, add_css, options);
add_css_to_component(this, add_css, options);
init(this, options, null, create_fragment, safe_not_equal, {});
}
}

Loading…
Cancel
Save