mirror of
https://github.com/harttle/liquidjs.git
synced 2026-09-19 06:20:38 -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[]) {
|
||||
|
||||
Reference in New Issue
Block a user