skatejs / web-components

[DEPRECATED] - The frictionless way to use the webcomponents/webcomponentsjs polyfills.
MIT License
17 stars 4 forks source link

build issue with sed command #40

Closed elmariofredo closed 7 years ago

elmariofredo commented 7 years ago

When fixing #36 I have encounter issue with build specifically sed command here https://github.com/skatejs/web-components/blob/master/webpack.config.js#L16 I'm not sure why it stopped working did resolve issue with following awkward fix

diff --git a/webpack.config.js b/webpack.config.js
index 083c495..07ada10 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -13,7 +13,7 @@ conf.plugins.push(new WebpackShellPlugin({
   onBuildStart: [
     // Escape all backtick characters so we can wrap it in a template literal.
     // eslint-disable-next-line
-    'sed -e "s/\\\`/\\\\\\\\\\`/g" ./node_modules/@webcomponents/custom-elements/src/native-shim.js > ./src/native-shim.js',
+    'sed -e \x27s/`/\\\\`/g\x27 ./node_modules/@webcomponents/custom-elements/src/native-shim.js > ./src/native-shim.js',

     // Wrap in a conditional eval so it doesn't get executed in non-supported environments.
     'echo "window.customElements && eval(\\`$(cat ./src/native-shim.js)\\`);" > ./src/native-shim.js'

@treshugart can you please verify that it's working on your machine it's really strange that it's working on CI. If it's working for you let's close this issue.

treshugart commented 7 years ago

Interesting. It was failing for me yesterday, I think. I can't test right now, but if it works for you I'm happy for the fix to be applied and merged. If it's still not working we can take it from there.

elmariofredo commented 7 years ago

yes beside awkwardness fix is working will send PR right away

treshugart commented 7 years ago

Feel free to have @Hotell review it. I'm in bed soon :)