diff --git a/component/component.js b/component/component.js index b55b335..b48c66e 100644 --- a/component/component.js +++ b/component/component.js @@ -20,8 +20,8 @@ export default Ember.Component.extend(NodeDriver, { init() { /*!!!!!!!!!!!DO NOT CHANGE START!!!!!!!!!!!*/ // This does on the fly template compiling, if you mess with this :cry: - const decodedLayout = decodeURI(LAYOUT); - const template = Ember.HTMLBars.compile(decodedLayout, { + const decodedLayout = window.atob(LAYOUT); + const template = Ember.HTMLBars.compile(decodedLayout, { moduleName: 'nodes/components/driver-interoutevdc/template' }); set(this,'layout', template); diff --git a/gulpfile.js b/gulpfile.js index 813f7ae..8c6914f 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -59,12 +59,14 @@ gulp.task('babel', ['assets'], function() { "comments": false }; - const hbs = fs.readFileSync(`${BASE}template.hbs`); + let hbs = fs.readFileSync(`${BASE}template.hbs`); + + hbs = Buffer.from(hbs).toString('base64'); return gulp.src([ `${BASE}component.js` ]) - .pipe(replace('const LAYOUT;', `const LAYOUT = "${ encodeURI(hbs) }";`)) + .pipe(replace('const LAYOUT;', `const LAYOUT = "${ hbs }";`)) .pipe(babel(opts)) .pipe(gulpConcat(`component.js`,{newLine: ';\n'})) .pipe(gulp.dest(TMP));