Skip to content

Commit

Permalink
Adds babel support
Browse files Browse the repository at this point in the history
Removes html templates in favor of template strings

Signed-off-by: Christopher Rogers <chrissrogers@gmail.com>
  • Loading branch information
chrissrogers committed Oct 15, 2015
1 parent 9321f30 commit e1458a1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 $@
Expand Down
1 change: 0 additions & 1 deletion lib/recurly/hosted-fields/iframe.html

This file was deleted.

8 changes: 4 additions & 4 deletions lib/recurly/hosted-fields/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
* dependencies
*/

var template = require('./iframe.html');
var debug = require('debug')('recurly:HostedFields');
const debug = require('debug')('recurly:HostedFields');

/**
* expose
Expand Down Expand Up @@ -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 = `<iframe src="http://api.lvh.me:3000/js/v1/field" frameborder="0"></iframe>`;
}

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}

0 comments on commit e1458a1

Please sign in to comment.