From e1458a1e80a8127e94fe65a80f4c040d691ce949 Mon Sep 17 00:00:00 2001 From: Christopher Rogers Date: Thu, 15 Oct 2015 14:10:16 -0700 Subject: [PATCH] Adds babel support Removes html templates in favor of template strings Signed-off-by: Christopher Rogers --- Makefile | 2 +- lib/recurly/hosted-fields/iframe.html | 1 - lib/recurly/hosted-fields/index.js | 8 ++++---- package.json | 4 ++-- 4 files changed, 7 insertions(+), 8 deletions(-) delete mode 100644 lib/recurly/hosted-fields/iframe.html diff --git a/Makefile b/Makefile index 0cc8ee894..819b94c8b 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,7 @@ build: build/recurly.min.js build/recurly.js: index.js $(SRC) node_modules component.json @mkdir -p $(@D) - @$(DUO) --quiet --stdout --global recurly < $< > $@ + @$(DUO) --use duo-babel --stdout --global recurly < $< > $@ build/recurly.min.js: build/recurly.js @$(BIN)/uglifyjs $< --output $@ diff --git a/lib/recurly/hosted-fields/iframe.html b/lib/recurly/hosted-fields/iframe.html deleted file mode 100644 index e717e7c04..000000000 --- a/lib/recurly/hosted-fields/iframe.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/lib/recurly/hosted-fields/index.js b/lib/recurly/hosted-fields/index.js index eebdaf7ae..d732b4300 100644 --- a/lib/recurly/hosted-fields/index.js +++ b/lib/recurly/hosted-fields/index.js @@ -2,8 +2,7 @@ * dependencies */ -var template = require('./iframe.html'); -var debug = require('debug')('recurly:HostedFields'); +const debug = require('debug')('recurly:HostedFields'); /** * expose @@ -45,6 +44,7 @@ function HostedField (options) { } HostedField.prototype.inject = function (sel) { - var container = window.document.querySelector(sel); - container.innerHTML = template; + let container = window.document.querySelector(sel); + container.innerHTML = ``; } + diff --git a/package.json b/package.json index 26eb11f61..2bf969fdd 100644 --- a/package.json +++ b/package.json @@ -15,11 +15,11 @@ "devDependencies": { "uglify-js": "2.4.x", "duo": "0.x", + "duo-babel": "6.x", "duo-test": "0.x", "koa-route": "2.x", "koa-bodyparser": "2.x", "ejs": "2.x", - "debug": "0.x", - "wr": "*" + "debug": "0.x" } }