fix(#108): remove absolute path in emitted d.ts

This commit is contained in:
harttle
2019-02-26 00:43:30 +08:00
parent 75b3e15ca9
commit 53a835ab54
103 changed files with 275 additions and 343 deletions
+1 -1
View File
@@ -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),
+2 -2
View File
@@ -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 -1
View File
@@ -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 -1
View File
@@ -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,
+6 -6
View File
@@ -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*=([^]*)`)
+7 -7
View File
@@ -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 -1
View File
@@ -1,4 +1,4 @@
import { RenderBreakError } from 'src/util/error'
import { RenderBreakError } from '../../util/error'
export default {
render: async function () {
+7 -7
View File
@@ -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})`)
+7 -7
View File
@@ -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[]) {
+3 -3
View File
@@ -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 -1
View File
@@ -1,4 +1,4 @@
import { RenderBreakError } from 'src/util/error'
import { RenderBreakError } from '../../util/error'
export default {
render: async function () {
+6 -6
View File
@@ -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')
+6 -6
View File
@@ -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
View File
@@ -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})` +
+7 -7
View File
@@ -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[]) {
+8 -8
View File
@@ -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})`)
+4 -4
View File
@@ -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) {
+1 -1
View File
@@ -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
+9 -9
View File
@@ -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+/
+3 -3
View File
@@ -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[]) {
+11 -11
View File
@@ -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})` +
+6 -6
View File
@@ -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[]) {