From 0cfbb83de074153471d751a057a41763c515cf70 Mon Sep 17 00:00:00 2001 From: Martin Kleinschrodt Date: Wed, 25 Apr 2018 11:13:53 -0300 Subject: [PATCH] Force custom elements polyfill on iOS --- lib/build.js | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/lib/build.js b/lib/build.js index 132d76545..e3b2cd87f 100644 --- a/lib/build.js +++ b/lib/build.js @@ -248,13 +248,22 @@ function buildCordova(platform, dest) { return prepFiles .then(() => { + let lines = "\n\n"; + + if (platform === "ios") { + lines += ` + +`; + } + const stream = gulp.src("index.html", {cwd: dest}) .pipe(insertLines({ "after": //i, - "lineAfter": -` - -` + "lineAfter": lines })) .pipe(gulp.dest(dest)); @@ -268,7 +277,8 @@ function buildDashboard(dest = "build/dashboard", watch = false) { const flags = `--inline-scripts --inline-css -r ${appDir}`; const source = "src/cloud-dashboard/cloud-dashboard.html"; const targetDir = `${dest}/elements/cloud-dashboard`; - const bundleCmd = `node ${bundler} ${flags} ${source} | node ${crisper} --html ${targetDir}/cloud-dashboard.html --js ${targetDir}/cloud-dashboard.js`; + const bundleCmd = `node ${bundler} ${flags} ${source} | node ${crisper} --html ` + + `${targetDir}/cloud-dashboard.html --js ${targetDir}/cloud-dashboard.js`; function doIt() { return Promise.all([