mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-15 04:10:40 -07:00
fix(#108): remove absolute path in emitted d.ts
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { last } from 'src/util/underscore'
|
||||
import { last } from '../../util/underscore'
|
||||
|
||||
export default {
|
||||
'join': (v: any[], arg: string) => v.join(arg === undefined ? ' ' : arg),
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import strftime from 'src/util/strftime'
|
||||
import { isString } from 'src/util/underscore'
|
||||
import strftime from '../../util/strftime'
|
||||
import { isString } from '../../util/underscore'
|
||||
|
||||
export default {
|
||||
'date': (v: string | Date, arg: string) => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { isTruthy } from 'src/render/syntax'
|
||||
import { isTruthy } from '../../render/syntax'
|
||||
|
||||
export default {
|
||||
'default': <T1, T2>(v: T1, arg: T2): T1 | T2 => isTruthy(v) ? v : arg
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { FilterImpl } from 'src/template/filter/filter-impl'
|
||||
import { FilterImpl } from '../../template/filter/filter-impl'
|
||||
|
||||
export default {
|
||||
'append': (v: string, arg: string) => v + arg,
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import assert from 'src/util/assert'
|
||||
import { identifier } from 'src/parser/lexical'
|
||||
import { AssignScope } from 'src/scope/scopes'
|
||||
import TagToken from 'src/parser/tag-token'
|
||||
import Scope from 'src/scope/scope'
|
||||
import ITagImplOptions from 'src/template/tag/itag-impl-options'
|
||||
import assert from '../../util/assert'
|
||||
import { identifier } from '../../parser/lexical'
|
||||
import { AssignScope } from '../../scope/scopes'
|
||||
import TagToken from '../../parser/tag-token'
|
||||
import Scope from '../../scope/scope'
|
||||
import ITagImplOptions from '../../template/tag/itag-impl-options'
|
||||
|
||||
const re = new RegExp(`(${identifier.source})\\s*=([^]*)`)
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import BlockMode from 'src/scope/block-mode'
|
||||
import TagToken from 'src/parser/tag-token'
|
||||
import Token from 'src/parser/token'
|
||||
import ITemplate from 'src/template/itemplate'
|
||||
import Scope from 'src/scope/scope'
|
||||
import ITagImplOptions from 'src/template/tag/itag-impl-options'
|
||||
import ParseStream from 'src/parser/parse-stream'
|
||||
import BlockMode from '../../scope/block-mode'
|
||||
import TagToken from '../../parser/tag-token'
|
||||
import Token from '../../parser/token'
|
||||
import ITemplate from '../../template/itemplate'
|
||||
import Scope from '../../scope/scope'
|
||||
import ITagImplOptions from '../../template/tag/itag-impl-options'
|
||||
import ParseStream from '../../parser/parse-stream'
|
||||
|
||||
export default {
|
||||
parse: function (token: TagToken, remainTokens: Token[]) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { RenderBreakError } from 'src/util/error'
|
||||
import { RenderBreakError } from '../../util/error'
|
||||
|
||||
export default {
|
||||
render: async function () {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import assert from 'src/util/assert'
|
||||
import { identifier } from 'src/parser/lexical'
|
||||
import { CaptureScope } from 'src/scope/scopes'
|
||||
import TagToken from 'src/parser/tag-token'
|
||||
import Token from 'src/parser/token'
|
||||
import Scope from 'src/scope/scope'
|
||||
import ITagImplOptions from 'src/template/tag/itag-impl-options'
|
||||
import assert from '../../util/assert'
|
||||
import { identifier } from '../../parser/lexical'
|
||||
import { CaptureScope } from '../../scope/scopes'
|
||||
import TagToken from '../../parser/tag-token'
|
||||
import Token from '../../parser/token'
|
||||
import Scope from '../../scope/scope'
|
||||
import ITagImplOptions from '../../template/tag/itag-impl-options'
|
||||
|
||||
const re = new RegExp(`(${identifier.source})`)
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { evalExp } from 'src/render/syntax'
|
||||
import TagToken from 'src/parser/tag-token'
|
||||
import Token from 'src/parser/token'
|
||||
import Scope from 'src/scope/scope'
|
||||
import ITemplate from 'src/template/itemplate'
|
||||
import ITagImplOptions from 'src/template/tag/itag-impl-options'
|
||||
import ParseStream from 'src/parser/parse-stream'
|
||||
import { evalExp } from '../../render/syntax'
|
||||
import TagToken from '../../parser/tag-token'
|
||||
import Token from '../../parser/token'
|
||||
import Scope from '../../scope/scope'
|
||||
import ITemplate from '../../template/itemplate'
|
||||
import ITagImplOptions from '../../template/tag/itag-impl-options'
|
||||
import ParseStream from '../../parser/parse-stream'
|
||||
|
||||
export default {
|
||||
parse: function (tagToken: TagToken, remainTokens: Token[]) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import TagToken from 'src/parser/tag-token'
|
||||
import Token from 'src/parser/token'
|
||||
import ITagImplOptions from 'src/template/tag/itag-impl-options'
|
||||
import TagToken from '../../parser/tag-token'
|
||||
import Token from '../../parser/token'
|
||||
import ITagImplOptions from '../../template/tag/itag-impl-options'
|
||||
|
||||
export default {
|
||||
parse: function (tagToken: TagToken, remainTokens: Token[]) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { RenderBreakError } from 'src/util/error'
|
||||
import { RenderBreakError } from '../../util/error'
|
||||
|
||||
export default {
|
||||
render: async function () {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import assert from 'src/util/assert'
|
||||
import { value as rValue } from 'src/parser/lexical'
|
||||
import { evalValue } from 'src/render/syntax'
|
||||
import TagToken from 'src/parser/tag-token'
|
||||
import Scope from 'src/scope/scope'
|
||||
import ITagImplOptions from 'src/template/tag/itag-impl-options'
|
||||
import assert from '../../util/assert'
|
||||
import { value as rValue } from '../../parser/lexical'
|
||||
import { evalValue } from '../../render/syntax'
|
||||
import TagToken from '../../parser/tag-token'
|
||||
import Scope from '../../scope/scope'
|
||||
import ITagImplOptions from '../../template/tag/itag-impl-options'
|
||||
|
||||
const groupRE = new RegExp(`^(?:(${rValue.source})\\s*:\\s*)?(.*)$`)
|
||||
const candidatesRE = new RegExp(rValue.source, 'g')
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import assert from 'src/util/assert'
|
||||
import { identifier } from 'src/parser/lexical'
|
||||
import { CaptureScope, AssignScope, DecrementScope } from 'src/scope/scopes'
|
||||
import TagToken from 'src/parser/tag-token'
|
||||
import Scope from 'src/scope/scope'
|
||||
import ITagImplOptions from 'src/template/tag/itag-impl-options'
|
||||
import assert from '../../util/assert'
|
||||
import { identifier } from '../../parser/lexical'
|
||||
import { CaptureScope, AssignScope, DecrementScope } from '../../scope/scopes'
|
||||
import TagToken from '../../parser/tag-token'
|
||||
import Scope from '../../scope/scope'
|
||||
import ITagImplOptions from '../../template/tag/itag-impl-options'
|
||||
|
||||
export default {
|
||||
parse: function (token: TagToken) {
|
||||
|
||||
+12
-12
@@ -1,15 +1,15 @@
|
||||
import { mapSeries } from 'src/util/promise'
|
||||
import { isString, isObject, isArray } from 'src/util/underscore'
|
||||
import { evalExp } from 'src/render/syntax'
|
||||
import assert from 'src/util/assert'
|
||||
import { identifier, value, hash } from 'src/parser/lexical'
|
||||
import TagToken from 'src/parser/tag-token'
|
||||
import Token from 'src/parser/token'
|
||||
import Scope from 'src/scope/scope'
|
||||
import Hash from 'src/template/tag/hash'
|
||||
import ITemplate from 'src/template/itemplate'
|
||||
import ITagImplOptions from 'src/template/tag/itag-impl-options'
|
||||
import ParseStream from 'src/parser/parse-stream'
|
||||
import { mapSeries } from '../../util/promise'
|
||||
import { isString, isObject, isArray } from '../../util/underscore'
|
||||
import { evalExp } from '../../render/syntax'
|
||||
import assert from '../../util/assert'
|
||||
import { identifier, value, hash } from '../../parser/lexical'
|
||||
import TagToken from '../../parser/tag-token'
|
||||
import Token from '../../parser/token'
|
||||
import Scope from '../../scope/scope'
|
||||
import Hash from '../../template/tag/hash'
|
||||
import ITemplate from '../../template/itemplate'
|
||||
import ITagImplOptions from '../../template/tag/itag-impl-options'
|
||||
import ParseStream from '../../parser/parse-stream'
|
||||
|
||||
const re = new RegExp(`^(${identifier.source})\\s+in\\s+` +
|
||||
`(${value.source})` +
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { evalExp, isTruthy } from 'src/render/syntax'
|
||||
import TagToken from 'src/parser/tag-token'
|
||||
import Token from 'src/parser/token'
|
||||
import Scope from 'src/scope/scope'
|
||||
import ITemplate from 'src/template/itemplate'
|
||||
import ITagImplOptions from 'src/template/tag/itag-impl-options'
|
||||
import ParseStream from 'src/parser/parse-stream'
|
||||
import { evalExp, isTruthy } from '../../render/syntax'
|
||||
import TagToken from '../../parser/tag-token'
|
||||
import Token from '../../parser/token'
|
||||
import Scope from '../../scope/scope'
|
||||
import ITemplate from '../../template/itemplate'
|
||||
import ITagImplOptions from '../../template/tag/itag-impl-options'
|
||||
import ParseStream from '../../parser/parse-stream'
|
||||
|
||||
export default {
|
||||
parse: function (tagToken: TagToken, remainTokens: Token[]) {
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import assert from 'src/util/assert'
|
||||
import { value, quotedLine } from 'src/parser/lexical'
|
||||
import { evalValue } from 'src/render/syntax'
|
||||
import BlockMode from 'src/scope/block-mode'
|
||||
import TagToken from 'src/parser/tag-token'
|
||||
import Scope from 'src/scope/scope'
|
||||
import Hash from 'src/template/tag/hash'
|
||||
import ITagImplOptions from 'src/template/tag/itag-impl-options'
|
||||
import assert from '../../util/assert'
|
||||
import { value, quotedLine } from '../../parser/lexical'
|
||||
import { evalValue } from '../../render/syntax'
|
||||
import BlockMode from '../../scope/block-mode'
|
||||
import TagToken from '../../parser/tag-token'
|
||||
import Scope from '../../scope/scope'
|
||||
import Hash from '../../template/tag/hash'
|
||||
import ITagImplOptions from '../../template/tag/itag-impl-options'
|
||||
|
||||
const staticFileRE = /[^\s,]+/
|
||||
const withRE = new RegExp(`with\\s+(${value.source})`)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import assert from 'src/util/assert'
|
||||
import { identifier } from 'src/parser/lexical'
|
||||
import { CaptureScope, AssignScope, IncrementScope } from 'src/scope/scopes'
|
||||
import ITagImplOptions from 'src/template/tag/itag-impl-options'
|
||||
import assert from '../../util/assert'
|
||||
import { identifier } from '../../parser/lexical'
|
||||
import { CaptureScope, AssignScope, IncrementScope } from '../../scope/scopes'
|
||||
import ITagImplOptions from '../../template/tag/itag-impl-options'
|
||||
|
||||
export default {
|
||||
parse: function (token) {
|
||||
|
||||
@@ -15,7 +15,7 @@ import tablerow from './tablerow'
|
||||
import unless from './unless'
|
||||
import Break from './break'
|
||||
import Continue from './continue'
|
||||
import ITagImplOptions from 'src/template/tag/itag-impl-options'
|
||||
import ITagImplOptions from '../../template/tag/itag-impl-options'
|
||||
|
||||
const tags: { [key: string]: ITagImplOptions } = {
|
||||
assign, 'for': For, capture, 'case': Case, comment, include, decrement, increment, cycle, 'if': If, layout, block, raw, tablerow, unless, 'break': Break, 'continue': Continue
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import assert from 'src/util/assert'
|
||||
import { value as rValue } from 'src/parser/lexical'
|
||||
import { evalValue } from 'src/render/syntax'
|
||||
import BlockMode from 'src/scope/block-mode'
|
||||
import TagToken from 'src/parser/tag-token'
|
||||
import Token from 'src/parser/token'
|
||||
import Scope from 'src/scope/scope'
|
||||
import Hash from 'src/template/tag/hash'
|
||||
import ITagImplOptions from 'src/template/tag/itag-impl-options'
|
||||
import assert from '../../util/assert'
|
||||
import { value as rValue } from '../../parser/lexical'
|
||||
import { evalValue } from '../../render/syntax'
|
||||
import BlockMode from '../../scope/block-mode'
|
||||
import TagToken from '../../parser/tag-token'
|
||||
import Token from '../../parser/token'
|
||||
import Scope from '../../scope/scope'
|
||||
import Hash from '../../template/tag/hash'
|
||||
import ITagImplOptions from '../../template/tag/itag-impl-options'
|
||||
|
||||
const staticFileRE = /\S+/
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import TagToken from 'src/parser/tag-token'
|
||||
import Token from 'src/parser/token'
|
||||
import ITagImplOptions from 'src/template/tag/itag-impl-options'
|
||||
import TagToken from '../../parser/tag-token'
|
||||
import Token from '../../parser/token'
|
||||
import ITagImplOptions from '../../template/tag/itag-impl-options'
|
||||
|
||||
export default <ITagImplOptions>{
|
||||
parse: function (tagToken: TagToken, remainTokens: Token[]) {
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import { mapSeries } from 'src/util/promise'
|
||||
import assert from 'src/util/assert'
|
||||
import { evalExp } from 'src/render/syntax'
|
||||
import { identifier, value, hash } from 'src/parser/lexical'
|
||||
import TagToken from 'src/parser/tag-token'
|
||||
import Token from 'src/parser/token'
|
||||
import ITemplate from 'src/template/itemplate'
|
||||
import Scope from 'src/scope/scope'
|
||||
import Hash from 'src/template/tag/hash'
|
||||
import ITagImplOptions from 'src/template/tag/itag-impl-options'
|
||||
import ParseStream from 'src/parser/parse-stream'
|
||||
import { mapSeries } from '../../util/promise'
|
||||
import assert from '../../util/assert'
|
||||
import { evalExp } from '../../render/syntax'
|
||||
import { identifier, value, hash } from '../../parser/lexical'
|
||||
import TagToken from '../../parser/tag-token'
|
||||
import Token from '../../parser/token'
|
||||
import ITemplate from '../../template/itemplate'
|
||||
import Scope from '../../scope/scope'
|
||||
import Hash from '../../template/tag/hash'
|
||||
import ITagImplOptions from '../../template/tag/itag-impl-options'
|
||||
import ParseStream from '../../parser/parse-stream'
|
||||
|
||||
const re = new RegExp(`^(${identifier.source})\\s+in\\s+` +
|
||||
`(${value.source})` +
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { evalExp, isFalsy } from 'src/render/syntax'
|
||||
import TagToken from 'src/parser/tag-token'
|
||||
import Token from 'src/parser/token'
|
||||
import Scope from 'src/scope/scope'
|
||||
import ITagImplOptions from 'src/template/tag/itag-impl-options'
|
||||
import ParseStream from 'src/parser/parse-stream'
|
||||
import { evalExp, isFalsy } from '../../render/syntax'
|
||||
import TagToken from '../../parser/tag-token'
|
||||
import Token from '../../parser/token'
|
||||
import Scope from '../../scope/scope'
|
||||
import ITagImplOptions from '../../template/tag/itag-impl-options'
|
||||
import ParseStream from '../../parser/parse-stream'
|
||||
|
||||
export default {
|
||||
parse: function (tagToken: TagToken, remainTokens: Token[]) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { isNil, isString } from 'src/util/underscore'
|
||||
import { isDrop } from 'src/drop/idrop'
|
||||
import { EmptyDrop } from 'src/drop/empty-drop'
|
||||
import { isNil, isString } from '../util/underscore'
|
||||
import { isDrop } from '../drop/idrop'
|
||||
import { EmptyDrop } from '../drop/empty-drop'
|
||||
|
||||
export class BlankDrop extends EmptyDrop {
|
||||
equals (value: any) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Drop } from './drop'
|
||||
import { IComparable } from './icomparable'
|
||||
import { isObject, isString, isArray } from 'src/util/underscore'
|
||||
import { IDrop } from 'src/drop/idrop'
|
||||
import { isObject, isString, isArray } from '../util/underscore'
|
||||
import { IDrop } from '../drop/idrop'
|
||||
|
||||
export class EmptyDrop extends Drop implements IDrop, IComparable {
|
||||
equals (value: any) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { isFunction } from 'src/util/underscore'
|
||||
import { isFunction } from '../util/underscore'
|
||||
|
||||
export interface IComparable {
|
||||
equals: (rhs: any) => boolean
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
import { Drop } from './drop'
|
||||
import { isFunction } from 'src/util/underscore'
|
||||
import { isFunction } from '../util/underscore'
|
||||
|
||||
export interface IDrop {
|
||||
value(): any
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Drop } from './drop'
|
||||
import { IComparable } from './icomparable'
|
||||
import { isNil } from 'src/util/underscore'
|
||||
import { IDrop, isDrop } from 'src/drop/idrop'
|
||||
import { BlankDrop } from 'src/drop/blank-drop'
|
||||
import { isNil } from '../util/underscore'
|
||||
import { IDrop, isDrop } from '../drop/idrop'
|
||||
import { BlankDrop } from '../drop/blank-drop'
|
||||
|
||||
export class NullDrop extends Drop implements IDrop, IComparable {
|
||||
equals (value: any) {
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
import Scope from './scope/scope'
|
||||
import * as Types from './types'
|
||||
import fs from 'src/fs'
|
||||
import fs from './fs/node'
|
||||
import * as _ from './util/underscore'
|
||||
import ITemplate from './template/itemplate'
|
||||
import Tokenizer from './parser/tokenizer'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import Token from './token'
|
||||
import { last } from 'src/util/underscore'
|
||||
import { last } from '../util/underscore'
|
||||
|
||||
export default class DelimitedToken extends Token {
|
||||
trimLeft: boolean
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import Token from 'src/parser/token'
|
||||
import ITemplate from 'src/template/itemplate'
|
||||
import Token from '../parser/token'
|
||||
import ITemplate from '../template/itemplate'
|
||||
import TagToken from './tag-token'
|
||||
|
||||
type ParseToken = ((token: Token, remainTokens: Array<Token>) => ITemplate)
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import { ParseError } from '../util/error'
|
||||
import Liquid from 'src/liquid'
|
||||
import Liquid from '../liquid'
|
||||
import ParseStream from './parse-stream'
|
||||
import Token from './token'
|
||||
import TagToken from './tag-token'
|
||||
import OutputToken from './output-token'
|
||||
import Tag from 'src/template/tag/tag'
|
||||
import Output from 'src/template/output'
|
||||
import HTML from 'src/template/html'
|
||||
import ITemplate from 'src/template/itemplate'
|
||||
import Tag from '../template/tag/tag'
|
||||
import Output from '../template/output'
|
||||
import HTML from '../template/html'
|
||||
import ITemplate from '../template/itemplate'
|
||||
|
||||
export default class Parser {
|
||||
liquid: Liquid
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import DelimitedToken from './delimited-token'
|
||||
import { TokenizationError } from 'src/util/error'
|
||||
import { TokenizationError } from '../util/error'
|
||||
import * as lexical from './lexical'
|
||||
|
||||
export default class TagToken extends DelimitedToken {
|
||||
|
||||
@@ -3,7 +3,7 @@ import HTMLToken from './html-token'
|
||||
import TagToken from './tag-token'
|
||||
import Token from './token'
|
||||
import OutputToken from './output-token'
|
||||
import { TokenizationError } from 'src/util/error'
|
||||
import { TokenizationError } from '../util/error'
|
||||
import { NormalizedFullOptions, applyDefault } from '../liquid-options'
|
||||
|
||||
enum ParseState { HTML, OUTPUT, TAG }
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import DelimitedToken from 'src/parser/delimited-token'
|
||||
import Token from 'src/parser/token'
|
||||
import TagToken from 'src/parser/tag-token'
|
||||
import { NormalizedFullOptions } from 'src/liquid-options'
|
||||
import DelimitedToken from '../parser/delimited-token'
|
||||
import Token from '../parser/token'
|
||||
import TagToken from '../parser/tag-token'
|
||||
import { NormalizedFullOptions } from '../liquid-options'
|
||||
|
||||
export default function whiteSpaceCtrl (tokens: Token[], options: NormalizedFullOptions) {
|
||||
options = { greedy: true, ...options }
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { RenderError } from 'src/util/error'
|
||||
import assert from 'src/util/assert'
|
||||
import Scope from 'src/scope/scope'
|
||||
import ITemplate from 'src/template/itemplate'
|
||||
import { RenderError } from '../util/error'
|
||||
import assert from '../util/assert'
|
||||
import Scope from '../scope/scope'
|
||||
import ITemplate from '../template/itemplate'
|
||||
|
||||
export default class Render {
|
||||
async renderTemplates (templates: ITemplate[], scope: Scope) {
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import * as lexical from '../parser/lexical'
|
||||
import assert from '../util/assert'
|
||||
import Scope from 'src/scope/scope'
|
||||
import { range, last } from 'src/util/underscore'
|
||||
import { isComparable } from 'src/drop/icomparable'
|
||||
import { NullDrop } from 'src/drop/null-drop'
|
||||
import { EmptyDrop } from 'src/drop/empty-drop'
|
||||
import { BlankDrop } from 'src/drop/blank-drop'
|
||||
import { isDrop } from 'src/drop/idrop'
|
||||
import Scope from '../scope/scope'
|
||||
import { range, last } from '../util/underscore'
|
||||
import { isComparable } from '../drop/icomparable'
|
||||
import { NullDrop } from '../drop/null-drop'
|
||||
import { EmptyDrop } from '../drop/empty-drop'
|
||||
import { BlankDrop } from '../drop/blank-drop'
|
||||
import { isDrop } from '../drop/idrop'
|
||||
|
||||
const binaryOperators: {[key: string]: (lhs: any, rhs: any) => boolean} = {
|
||||
'==': (l: any, r: any) => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { evalValue } from 'src/render/syntax'
|
||||
import Scope from 'src/scope/scope'
|
||||
import { evalValue } from '../../render/syntax'
|
||||
import Scope from '../../scope/scope'
|
||||
import { FilterImpl } from './filter-impl'
|
||||
|
||||
export default class Filter {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import Template from 'src/template/template'
|
||||
import ITemplate from 'src/template/itemplate'
|
||||
import HTMLToken from 'src/parser/html-token'
|
||||
import Template from '../template/template'
|
||||
import ITemplate from '../template/itemplate'
|
||||
import HTMLToken from '../parser/html-token'
|
||||
|
||||
export default class extends Template<HTMLToken> implements ITemplate {
|
||||
str: string
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import Scope from 'src/scope/scope'
|
||||
import Token from 'src/parser/token'
|
||||
import Scope from '../scope/scope'
|
||||
import Token from '../parser/token'
|
||||
|
||||
export default interface ITemplate {
|
||||
token: Token;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import Value from './value'
|
||||
import { stringify } from 'src/util/underscore'
|
||||
import Template from 'src/template/template'
|
||||
import ITemplate from 'src/template/itemplate'
|
||||
import Scope from 'src/scope/scope'
|
||||
import OutputToken from 'src/parser/output-token'
|
||||
import { stringify } from '../util/underscore'
|
||||
import Template from '../template/template'
|
||||
import ITemplate from '../template/itemplate'
|
||||
import Scope from '../scope/scope'
|
||||
import OutputToken from '../parser/output-token'
|
||||
|
||||
export default class Output extends Template<OutputToken> implements ITemplate {
|
||||
value: Value
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { hashCapture } from 'src/parser/lexical'
|
||||
import { evalValue } from 'src/render/syntax'
|
||||
import Scope from 'src/scope/scope'
|
||||
import { hashCapture } from '../../parser/lexical'
|
||||
import { evalValue } from '../../render/syntax'
|
||||
import Scope from '../../scope/scope'
|
||||
|
||||
/**
|
||||
* Key-Value Pairs Representing Tag Arguments
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import Scope from 'src/scope/scope'
|
||||
import TagToken from 'src/parser/tag-token'
|
||||
import Token from 'src/parser/token'
|
||||
import Hash from 'src/template/tag/hash'
|
||||
import Scope from '../../scope/scope'
|
||||
import TagToken from '../../parser/tag-token'
|
||||
import Token from '../../parser/token'
|
||||
import Hash from '../../template/tag/hash'
|
||||
import ITagImpl from './itag-impl'
|
||||
|
||||
export default interface ITagImplOptions {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import Liquid from 'src/liquid'
|
||||
import Liquid from '../../liquid'
|
||||
import ITagImplOptions from './itag-impl-options'
|
||||
|
||||
export default interface ITagImpl extends ITagImplOptions {
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import { create, stringify } from 'src/util/underscore'
|
||||
import assert from 'src/util/assert'
|
||||
import Scope from 'src/scope/scope'
|
||||
import { create, stringify } from '../../util/underscore'
|
||||
import assert from '../../util/assert'
|
||||
import Scope from '../../scope/scope'
|
||||
import ITagImpl from './itag-impl'
|
||||
import ITagImplOptions from './itag-impl-options'
|
||||
import Liquid from 'src/liquid'
|
||||
import Liquid from '../../liquid'
|
||||
import Hash from './hash'
|
||||
import Template from 'src/template/template'
|
||||
import ITemplate from 'src/template/itemplate'
|
||||
import TagToken from 'src/parser/tag-token'
|
||||
import Token from 'src/parser/token'
|
||||
import Template from '../../template/template'
|
||||
import ITemplate from '../../template/itemplate'
|
||||
import TagToken from '../../parser/tag-token'
|
||||
import Token from '../../parser/token'
|
||||
|
||||
export default class Tag extends Template<TagToken> implements ITemplate {
|
||||
name: string
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { evalExp } from 'src/render/syntax'
|
||||
import { evalExp } from '../render/syntax'
|
||||
import Filter from './filter/filter'
|
||||
import Scope from 'src/scope/scope'
|
||||
import Scope from '../scope/scope'
|
||||
|
||||
enum ParseState {
|
||||
INIT = 0,
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
import * as _ from './underscore'
|
||||
import Token from 'src/parser/token'
|
||||
import ITemplate from 'src/template/itemplate'
|
||||
import Token from '../parser/token'
|
||||
import ITemplate from '../template/itemplate'
|
||||
|
||||
abstract class LiquidError extends Error {
|
||||
private token: Token
|
||||
|
||||
@@ -62,13 +62,6 @@ export function isArray (value: any): value is any[] {
|
||||
return toStr.call(value) === '[object Array]'
|
||||
}
|
||||
|
||||
export function isError (value: any): value is Error {
|
||||
const signature = toStr.call(value)
|
||||
// [object XXXError]
|
||||
return signature.substr(-6, 5) === 'Error' ||
|
||||
(typeof value.message === 'string' && typeof value.name === 'string')
|
||||
}
|
||||
|
||||
/*
|
||||
* Iterates over own enumerable string keyed properties of an object and invokes iteratee for each property.
|
||||
* The iteratee is invoked with three arguments: (value, key, object).
|
||||
|
||||
Reference in New Issue
Block a user