chore(TypeScript): refactor objects into classes

fix: `Nil`(null, undefined) now renders as empty string
change: `parser.parseValue()` renamed to `parser.parseOutput`
change: registered tags/filters become static and shared across different liquid instances
This commit is contained in:
harttle
2019-02-17 04:55:30 +08:00
parent b51b0dabca
commit 677e8511e6
134 changed files with 3327 additions and 3858 deletions
@@ -1,12 +1,12 @@
import * as chai from 'chai'
import * as mock from 'mock-fs'
import Liquid from '../../../src'
import Liquid from '../../../src/liquid'
import * as chaiAsPromised from 'chai-as-promised'
const expect = chai.expect
chai.use(chaiAsPromised)
describe('cache options', function () {
describe('LiquidOptions#cache', function () {
let engine
beforeEach(function () {
engine = new Liquid({
@@ -1,10 +1,10 @@
import Liquid from '../../../src'
import Liquid from '../../../src/liquid'
import * as chai from 'chai'
const expect = chai.expect
chai.use(require('chai-as-promised'))
describe('strict options', function () {
describe('LiquidOptions#strict_*', function () {
let engine
const ctx = {}
beforeEach(function () {
@@ -1,11 +1,11 @@
import * as chai from 'chai'
import Liquid from '../../../src'
import Liquid from '../../../src/liquid'
import * as chaiAsPromised from 'chai-as-promised'
const expect = chai.expect
chai.use(chaiAsPromised)
describe('trimming', function () {
describe('LiquidOptions#trimming', function () {
const ctx = { name: 'harttle' }
describe('tag trimming', function () {