more unused stuff

pull/1864/head
Rich Harris 7 years ago
parent 3a5080b423
commit 6948f9f60e

@ -15,7 +15,7 @@ import getName from '../utils/getName';
import Stylesheet from './css/Stylesheet';
import { test } from '../config';
import Fragment from './nodes/Fragment';
import shared from './shared';
import * as internal from '../internal/index';
import { Node, ShorthandImport, Ast, CompileOptions, CustomElementOptions } from '../interfaces';
import error from '../utils/error';
import getCodeFrame from '../utils/getCodeFrame';
@ -223,8 +223,8 @@ export default class Component {
this.stylesheet = new Stylesheet(source, ast, options.filename, options.dev);
this.stylesheet.validate(this);
// allow compiler to deconflict user's `import { get } from 'whatever'` and
// Svelte's builtin `import { get, ... } from 'svelte/shared.ts'`;
// allow compiler to deconflict user's `import { flush } from 'whatever'` and
// Svelte's builtin `import { flush, ... } from 'svelte/internal.ts'`;
this.userVars = new Set();
this.templateVars = new Map();
this.aliases = new Map();
@ -298,8 +298,8 @@ export default class Component {
// TODO use same regex for both
result = result.replace(options.generate === 'ssr' ? /(@+|#+|%+)(\w*(?:-\w*)?)/g : /(%+|@+)(\w*(?:-\w*)?)/g, (match: string, sigil: string, name: string) => {
if (sigil === '@') {
if (name in shared) {
if (options.dev && `${name}Dev` in shared) name = `${name}Dev`;
if (name in internal) {
if (options.dev && `${name}Dev` in internal) name = `${name}Dev`;
helpers.add(name);
}

@ -1,4 +1,4 @@
import { assign } from '../shared';
import { assign } from '../internal';
import Stats from '../Stats';
import parse from '../parse/index';
import renderDOM from './render-dom/index';

@ -1,6 +1,6 @@
import { schedule_update, flush } from './scheduler.js';
import { set_current_component } from './lifecycle.js'
import { run_all } from '../shared/utils.js';
import { run_all } from './utils.js';
import { blankObject } from './utils.js';
export class SvelteComponent {

@ -1,4 +1,4 @@
import { assign, isPromise } from './utils.js';
import { assign, run_all, isPromise } from './utils.js';
import { groupOutros } from './transitions.js';
import { flush } from '../internal/scheduler.js';

@ -40,3 +40,7 @@ export function run(fn) {
export function blankObject() {
return Object.create(null);
}
export function run_all(fns) {
fns.forEach(run);
}
Loading…
Cancel
Save