mirror of https://github.com/sveltejs/svelte
parent
25aa02c4fd
commit
366c490bcc
@ -1,9 +1,9 @@
|
|||||||
import { locate } from 'locate-character';
|
import { locate } from 'locate-character';
|
||||||
import fragment from './state/fragment.js';
|
import fragment from './state/fragment.ts';
|
||||||
import { whitespace } from '../utils/patterns.js';
|
import { whitespace } from '../utils/patterns.js';
|
||||||
import { trimStart, trimEnd } from '../utils/trim.js';
|
import { trimStart, trimEnd } from '../utils/trim.js';
|
||||||
import getCodeFrame from '../utils/getCodeFrame.js';
|
import getCodeFrame from '../utils/getCodeFrame.js';
|
||||||
import hash from './utils/hash.js';
|
import hash from './utils/hash.ts';
|
||||||
|
|
||||||
function ParseError ( message, template, index, filename ) {
|
function ParseError ( message, template, index, filename ) {
|
||||||
const { line, column } = locate( template, index );
|
const { line, column } = locate( template, index );
|
@ -1,6 +1,6 @@
|
|||||||
import tag from './tag.js';
|
import tag from './tag.ts';
|
||||||
import mustache from './mustache.js';
|
import mustache from './mustache.ts';
|
||||||
import text from './text.js';
|
import text from './text.ts';
|
||||||
|
|
||||||
export default function fragment ( parser ) {
|
export default function fragment ( parser ) {
|
||||||
if ( parser.match( '<' ) ) {
|
if ( parser.match( '<' ) ) {
|
@ -1,4 +1,4 @@
|
|||||||
import readExpression from '../read/expression.js';
|
import readExpression from '../read/expression.ts';
|
||||||
import { whitespace } from '../../utils/patterns.js';
|
import { whitespace } from '../../utils/patterns.js';
|
||||||
import { trimStart, trimEnd } from '../../utils/trim.js';
|
import { trimStart, trimEnd } from '../../utils/trim.js';
|
||||||
|
|
@ -1,9 +1,9 @@
|
|||||||
import readExpression from '../read/expression.js';
|
import readExpression from '../read/expression.ts';
|
||||||
import readScript from '../read/script.js';
|
import readScript from '../read/script.ts';
|
||||||
import readStyle from '../read/style.js';
|
import readStyle from '../read/style.ts';
|
||||||
import { readEventHandlerDirective, readBindingDirective, readTransitionDirective } from '../read/directives.js';
|
import { readEventHandlerDirective, readBindingDirective, readTransitionDirective } from '../read/directives.ts';
|
||||||
import { trimStart, trimEnd } from '../../utils/trim.js';
|
import { trimStart, trimEnd } from '../../utils/trim.js';
|
||||||
import { decodeCharacterReferences } from '../utils/html.js';
|
import { decodeCharacterReferences } from '../utils/html.ts';
|
||||||
import isVoidElementName from '../../utils/isVoidElementName.js';
|
import isVoidElementName from '../../utils/isVoidElementName.js';
|
||||||
|
|
||||||
const validTagName = /^\!?[a-zA-Z]{1,}:?[a-zA-Z0-9\-]*/;
|
const validTagName = /^\!?[a-zA-Z]{1,}:?[a-zA-Z0-9\-]*/;
|
@ -1,4 +1,4 @@
|
|||||||
import { decodeCharacterReferences } from '../utils/html.js';
|
import { decodeCharacterReferences } from '../utils/html.ts';
|
||||||
|
|
||||||
export default function text ( parser ) {
|
export default function text ( parser ) {
|
||||||
const start = parser.index;
|
const start = parser.index;
|
@ -1,4 +1,4 @@
|
|||||||
import htmlEntities from './entities.js';
|
import htmlEntities from './entities.ts';
|
||||||
|
|
||||||
const windows1252 = [ 8364, 129, 8218, 402, 8222, 8230, 8224, 8225, 710, 8240, 352, 8249, 338, 141, 381, 143, 144, 8216, 8217, 8220, 8221, 8226, 8211, 8212, 732, 8482, 353, 8250, 339, 157, 382, 376 ];
|
const windows1252 = [ 8364, 129, 8218, 402, 8222, 8230, 8224, 8225, 710, 8240, 352, 8249, 338, 141, 381, 143, 144, 8216, 8217, 8220, 8221, 8226, 8211, 8212, 732, 8482, 353, 8250, 339, 157, 382, 376 ];
|
||||||
const entityPattern = new RegExp( `&(#?(?:x[\\w\\d]+|\\d+|${Object.keys( htmlEntities ).join( '|' )}));?`, 'g' );
|
const entityPattern = new RegExp( `&(#?(?:x[\\w\\d]+|\\d+|${Object.keys( htmlEntities ).join( '|' )}));?`, 'g' );
|
@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"types" : ["node"],
|
"types" : ["node"],
|
||||||
"noImplicitAny": true,
|
"noImplicitAny": true,
|
||||||
"diagnostics": true,
|
"diagnostics": true,
|
||||||
"noImplicitThis": true,
|
"noImplicitThis": true,
|
||||||
"noEmitOnError": true
|
"noEmitOnError": true
|
||||||
},
|
},
|
||||||
"target": "ES5"
|
"target": "ES5"
|
||||||
}
|
}
|
Loading…
Reference in new issue