mirror of https://github.com/sveltejs/svelte
parent
e45b15c3da
commit
f73a87230a
@ -1,16 +1,17 @@
|
||||
import MagicString, { Bundle } from 'magic-string';
|
||||
import CodeBuilder from '../utils/CodeBuilder.js';
|
||||
import deindent from '../utils/deindent.js';
|
||||
import namespaces from '../utils/namespaces.js';
|
||||
import getIntro from './utils/getIntro.js';
|
||||
import getOutro from './utils/getOutro.js';
|
||||
import processCss from './css/process.js';
|
||||
import createGenerator from './createGenerator.js';
|
||||
|
||||
export default function generate ( parsed, source, options, names ) {
|
||||
import deindent from '../../utils/deindent.js';
|
||||
import CodeBuilder from '../../utils/CodeBuilder.js';
|
||||
import namespaces from '../../utils/namespaces.js';
|
||||
import getIntro from '../shared/utils/getIntro.js';
|
||||
import getOutro from '../shared/utils/getOutro.js';
|
||||
import processCss from '../shared/css/process.js';
|
||||
import visitors from './visitors/index.js';
|
||||
import createGenerator from '../createGenerator.js';
|
||||
|
||||
export default function dom ( parsed, source, options, names ) {
|
||||
const format = options.format || 'es';
|
||||
|
||||
const generator = createGenerator( parsed, source, names );
|
||||
const generator = createGenerator( parsed, source, names, visitors );
|
||||
|
||||
const templateProperties = {};
|
||||
const imports = [];
|
@ -1,5 +1,5 @@
|
||||
import deindent from '../../utils/deindent.js';
|
||||
import CodeBuilder from '../../utils/CodeBuilder.js';
|
||||
import deindent from '../../../utils/deindent.js';
|
||||
import CodeBuilder from '../../../utils/CodeBuilder.js';
|
||||
import addComponentAttributes from './attributes/addComponentAttributes.js';
|
||||
|
||||
export default {
|
@ -1,4 +1,4 @@
|
||||
import deindent from '../../utils/deindent.js';
|
||||
import deindent from '../../../utils/deindent.js';
|
||||
|
||||
export default {
|
||||
enter ( generator, node ) {
|
@ -1,5 +1,5 @@
|
||||
import CodeBuilder from '../../utils/CodeBuilder.js';
|
||||
import deindent from '../../utils/deindent.js';
|
||||
import CodeBuilder from '../../../utils/CodeBuilder.js';
|
||||
import deindent from '../../../utils/deindent.js';
|
||||
import addElementAttributes from './attributes/addElementAttributes.js';
|
||||
import Component from './Component.js';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import deindent from '../../utils/deindent.js';
|
||||
import deindent from '../../../utils/deindent.js';
|
||||
|
||||
function getConditionsAndBlocks ( generator, node, _name, i = 0 ) {
|
||||
generator.addSourcemapLocations( node.expression );
|
@ -1,4 +1,4 @@
|
||||
import deindent from '../../utils/deindent.js';
|
||||
import deindent from '../../../utils/deindent.js';
|
||||
|
||||
export default {
|
||||
enter ( generator, node ) {
|
@ -1,4 +1,4 @@
|
||||
import deindent from '../../utils/deindent.js';
|
||||
import deindent from '../../../utils/deindent.js';
|
||||
|
||||
export default {
|
||||
enter ( generator, node ) {
|
@ -1,5 +1,5 @@
|
||||
import createBinding from './binding/index.js';
|
||||
import deindent from '../../../utils/deindent.js';
|
||||
import deindent from '../../../../utils/deindent.js';
|
||||
|
||||
export default function addComponentAttributes ( generator, node, local ) {
|
||||
local.staticAttributes = [];
|
@ -1,7 +1,7 @@
|
||||
import attributeLookup from './lookup.js';
|
||||
import createBinding from './binding/index.js';
|
||||
import deindent from '../../../utils/deindent.js';
|
||||
import flattenReference from '../../../utils/flattenReference.js';
|
||||
import deindent from '../../../../utils/deindent.js';
|
||||
import flattenReference from '../../../../utils/flattenReference.js';
|
||||
|
||||
export default function addElementAttributes ( generator, node, local ) {
|
||||
node.attributes.forEach( attribute => {
|
@ -1,6 +1,6 @@
|
||||
import deindent from '../../../../utils/deindent.js';
|
||||
import isReference from '../../../../utils/isReference.js';
|
||||
import flattenReference from '../../../../utils/flattenReference.js';
|
||||
import deindent from '../../../../../utils/deindent.js';
|
||||
import isReference from '../../../../../utils/isReference.js';
|
||||
import flattenReference from '../../../../../utils/flattenReference.js';
|
||||
|
||||
export default function createBinding ( generator, node, attribute, current, local ) {
|
||||
const parts = attribute.value.split( '.' );
|
@ -1,10 +1,10 @@
|
||||
import { walk } from 'estree-walker';
|
||||
import deindent from '../utils/deindent.js';
|
||||
import isReference from '../utils/isReference.js';
|
||||
import flattenReference from '../utils/flattenReference.js';
|
||||
import MagicString, { Bundle } from 'magic-string';
|
||||
import processCss from '../generate/css/process.js';
|
||||
import voidElementNames from '../utils/voidElementNames.js';
|
||||
import { walk } from 'estree-walker';
|
||||
import deindent from '../../utils/deindent.js';
|
||||
import isReference from '../../utils/isReference.js';
|
||||
import flattenReference from '../../utils/flattenReference.js';
|
||||
import voidElementNames from '../../utils/voidElementNames.js';
|
||||
import processCss from '../shared/css/process.js';
|
||||
|
||||
export default function compile ( parsed, source, { filename }) {
|
||||
const code = new MagicString( source );
|
@ -1,4 +1,4 @@
|
||||
import spaces from '../../utils/spaces.js';
|
||||
import spaces from '../../../utils/spaces.js';
|
||||
import transform from './transform.js';
|
||||
|
||||
export default function process ( parsed ) {
|
@ -1,4 +1,4 @@
|
||||
import deindent from '../../utils/deindent.js';
|
||||
import deindent from '../../../utils/deindent.js';
|
||||
import getGlobals from './getGlobals.js';
|
||||
|
||||
export default function getIntro ( format, options, imports ) {
|
Loading…
Reference in new issue