diff --git a/package.json b/package.json index f409648..a300c43 100644 --- a/package.json +++ b/package.json @@ -17,11 +17,9 @@ "lodash.uniq": "^4.3.0", "resolve": "^1.5.0", "semver": "^5.3.0", - "uglify-js": "^2.8.22", "when": "^3.7.8" }, "devDependencies": { - "LiveScript": "^1.3.1", "acorn": "^5.0.3", "babel": "^6.23.0", "babel-core": "^6.24.1", @@ -48,6 +46,7 @@ "istanbul": "^0.4.4", "jade": "^1.11.0", "less": "^3.0.0", + "LiveScript": "^1.3.1", "marc": "^0.1.0", "marked": "^0.3.5", "mocha": "^3.3.0", @@ -63,7 +62,8 @@ "stylus": "^0.54.5", "swig": "^1.4.2", "toffee": "^0.1.13", - "typescript-compiler": "^1.4.1" + "typescript-compiler": "^1.4.1", + "uglify-js": "^2.8.22" }, "homepage": "https://github.com/jescalan/accord", "keywords": [ diff --git a/test/fixtures/swig/expected/client.html b/test/fixtures/swig/expected/client.html index 2b06730..4fb42ff 100644 --- a/test/fixtures/swig/expected/client.html +++ b/test/fixtures/swig/expected/client.html @@ -3,7 +3,7 @@ var _ext = _swig.extensions, _output = ""; _output += "

"; -if ((((typeof _ctx.foo !== "undefined" && _ctx.foo !== null) ? ((typeof _ctx.foo !== "undefined" && _ctx.foo !== null) ? _ctx.foo : "") : ((typeof foo !== "undefined" && foo !== null) ? foo : "")) !== null ? ((typeof _ctx.foo !== "undefined" && _ctx.foo !== null) ? ((typeof _ctx.foo !== "undefined" && _ctx.foo !== null) ? _ctx.foo : "") : ((typeof foo !== "undefined" && foo !== null) ? foo : "")) : "" )) { +if ((((typeof _ctx.foo !== "undefined" && _ctx.foo !== null) ? ((typeof _ctx.foo !== "undefined" && _ctx.foo !== null) ? _ctx.foo : "") : ((typeof foo !== "undefined" && foo !== null) ? foo : "")) !== null ? ((typeof _ctx.foo !== "undefined" && _ctx.foo !== null) ? ((typeof _ctx.foo !== "undefined" && _ctx.foo !== null) ? _ctx.foo : "") : ((typeof foo !== "undefined" && foo !== null) ? foo : "")) : "" )) { _output += "Bar"; }_output += "

"; diff --git a/test/fixtures/swig/expected/cstring.html b/test/fixtures/swig/expected/cstring.html index 2b06730..4fb42ff 100644 --- a/test/fixtures/swig/expected/cstring.html +++ b/test/fixtures/swig/expected/cstring.html @@ -3,7 +3,7 @@ var _ext = _swig.extensions, _output = ""; _output += "

"; -if ((((typeof _ctx.foo !== "undefined" && _ctx.foo !== null) ? ((typeof _ctx.foo !== "undefined" && _ctx.foo !== null) ? _ctx.foo : "") : ((typeof foo !== "undefined" && foo !== null) ? foo : "")) !== null ? ((typeof _ctx.foo !== "undefined" && _ctx.foo !== null) ? ((typeof _ctx.foo !== "undefined" && _ctx.foo !== null) ? _ctx.foo : "") : ((typeof foo !== "undefined" && foo !== null) ? foo : "")) : "" )) { +if ((((typeof _ctx.foo !== "undefined" && _ctx.foo !== null) ? ((typeof _ctx.foo !== "undefined" && _ctx.foo !== null) ? _ctx.foo : "") : ((typeof foo !== "undefined" && foo !== null) ? foo : "")) !== null ? ((typeof _ctx.foo !== "undefined" && _ctx.foo !== null) ? ((typeof _ctx.foo !== "undefined" && _ctx.foo !== null) ? _ctx.foo : "") : ((typeof foo !== "undefined" && foo !== null) ? foo : "")) : "" )) { _output += "Bar"; }_output += "

"; diff --git a/test/test.coffee b/test/test.coffee index 3b513a7..b069282 100644 --- a/test/test.coffee +++ b/test/test.coffee @@ -197,11 +197,12 @@ describe 'swig', -> @swig.compileFile(lpath) .then((res) => should.match_expected(@swig, res.result({title: 'Hello!'}), lpath)) - it.skip 'should client-compile a string', -> + it 'should client-compile a string', -> + lpath = path.join(@path, 'cstring.swig') @swig.compileClient("

{% if foo %}Bar{% endif %}

", {foo: true}) - .then((res) => should.match_expected(@swig, res.result, path.join(@path, 'cstring.swig'))) + .then((res) => should.match_expected(@swig, res.result, lpath)) - it.skip 'should client-compile a file', -> + it 'should client-compile a file', -> lpath = path.join(@path, 'client.swig') @swig.compileFileClient(lpath) .then((res) => should.match_expected(@swig, res.result, lpath))