Mercurial > code > home > repos > homeauto
annotate service/wifi/rollup.config.js @ 744:b267511ec4fc
fixes to TS and page build. remove some unused attempts at binding to <streamed-graph>
Ignore-this: dc4cd74d21fef101b32da824bbf60a00
author | drewp@bigasterisk.com |
---|---|
date | Thu, 13 Feb 2020 10:17:54 -0800 |
parents | b39d24617a85 |
children |
rev | line source |
---|---|
673
f2215949c0c9
build adjustments. now seems to read streamedgraph correctly.
drewp@bigasterisk.com
parents:
diff
changeset
|
1 import builtins from "rollup-plugin-node-builtins"; |
674
2b9865bf1737
streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents:
673
diff
changeset
|
2 import commonjs from "@rollup/plugin-commonjs"; |
673
f2215949c0c9
build adjustments. now seems to read streamedgraph correctly.
drewp@bigasterisk.com
parents:
diff
changeset
|
3 import resolve from "@rollup/plugin-node-resolve"; |
f2215949c0c9
build adjustments. now seems to read streamedgraph correctly.
drewp@bigasterisk.com
parents:
diff
changeset
|
4 import typescript from "rollup-plugin-typescript2"; |
674
2b9865bf1737
streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents:
673
diff
changeset
|
5 import replace from "@rollup/plugin-replace"; |
2b9865bf1737
streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents:
673
diff
changeset
|
6 |
2b9865bf1737
streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents:
673
diff
changeset
|
7 const workaround_jsonld_module_system_picker = "process = {version: '1.0.0'}"; |
2b9865bf1737
streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents:
673
diff
changeset
|
8 const workaround_some_browser_detector = "global = window"; |
684
b39d24617a85
fixes for streamedgraph build and a surprise with multi-value wifiBands
drewp@bigasterisk.com
parents:
674
diff
changeset
|
9 const workaround_jsonld_expand_issue = { |
b39d24617a85
fixes for streamedgraph build and a surprise with multi-value wifiBands
drewp@bigasterisk.com
parents:
674
diff
changeset
|
10 namedExports: { |
b39d24617a85
fixes for streamedgraph build and a surprise with multi-value wifiBands
drewp@bigasterisk.com
parents:
674
diff
changeset
|
11 jsonld: ["expand"], // fixes "expand is not exported by node_modules/jsonld/lib/index.js" |
b39d24617a85
fixes for streamedgraph build and a surprise with multi-value wifiBands
drewp@bigasterisk.com
parents:
674
diff
changeset
|
12 '../../../streamed-graph/node_modules/jsonld/lib/index': ['expand'], |
b39d24617a85
fixes for streamedgraph build and a surprise with multi-value wifiBands
drewp@bigasterisk.com
parents:
674
diff
changeset
|
13 } |
b39d24617a85
fixes for streamedgraph build and a surprise with multi-value wifiBands
drewp@bigasterisk.com
parents:
674
diff
changeset
|
14 }; |
674
2b9865bf1737
streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents:
673
diff
changeset
|
15 |
2b9865bf1737
streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents:
673
diff
changeset
|
16 // This makes <dom-module> element totally unavailable. I only meant to prune one of the |
2b9865bf1737
streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents:
673
diff
changeset
|
17 // two, but of course why is streamed-graph's node_modules/**/dom-module.js file getting |
2b9865bf1737
streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents:
673
diff
changeset
|
18 // here in the first place? |
2b9865bf1737
streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents:
673
diff
changeset
|
19 const duplicated_line_i_cant_prune = |
2b9865bf1737
streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents:
673
diff
changeset
|
20 "customElements.define('dom-module', DomModule);"; |
2b9865bf1737
streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents:
673
diff
changeset
|
21 const replacements = {}; |
2b9865bf1737
streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents:
673
diff
changeset
|
22 replacements[duplicated_line_i_cant_prune] = ""; |
673
f2215949c0c9
build adjustments. now seems to read streamedgraph correctly.
drewp@bigasterisk.com
parents:
diff
changeset
|
23 |
f2215949c0c9
build adjustments. now seems to read streamedgraph correctly.
drewp@bigasterisk.com
parents:
diff
changeset
|
24 export default { |
674
2b9865bf1737
streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents:
673
diff
changeset
|
25 input: "src/index.ts", |
2b9865bf1737
streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents:
673
diff
changeset
|
26 output: { |
2b9865bf1737
streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents:
673
diff
changeset
|
27 file: "build/bundle.js", |
2b9865bf1737
streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents:
673
diff
changeset
|
28 format: "esm", |
2b9865bf1737
streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents:
673
diff
changeset
|
29 intro: `const ${workaround_some_browser_detector}, ${workaround_jsonld_module_system_picker};`, |
2b9865bf1737
streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents:
673
diff
changeset
|
30 }, |
2b9865bf1737
streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents:
673
diff
changeset
|
31 external: [ |
2b9865bf1737
streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents:
673
diff
changeset
|
32 "dom-module", // don't want two of these in the bundle |
2b9865bf1737
streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents:
673
diff
changeset
|
33 ], |
2b9865bf1737
streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents:
673
diff
changeset
|
34 plugins: [ |
2b9865bf1737
streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents:
673
diff
changeset
|
35 builtins(), |
2b9865bf1737
streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents:
673
diff
changeset
|
36 resolve({ |
2b9865bf1737
streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents:
673
diff
changeset
|
37 extensions: [".js", ".ts"], |
2b9865bf1737
streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents:
673
diff
changeset
|
38 browser: true, |
2b9865bf1737
streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents:
673
diff
changeset
|
39 }), |
2b9865bf1737
streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents:
673
diff
changeset
|
40 typescript(), |
684
b39d24617a85
fixes for streamedgraph build and a surprise with multi-value wifiBands
drewp@bigasterisk.com
parents:
674
diff
changeset
|
41 commonjs(workaround_jsonld_expand_issue), |
674
2b9865bf1737
streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents:
673
diff
changeset
|
42 replace({ ...replacements, delimiters: ["", ""] }), |
744
b267511ec4fc
fixes to TS and page build. remove some unused attempts at binding to <streamed-graph>
drewp@bigasterisk.com
parents:
684
diff
changeset
|
43 |
674
2b9865bf1737
streamed-graph finally imports and builds. polymer bindings don't work in a <dom-bind> though
drewp@bigasterisk.com
parents:
673
diff
changeset
|
44 ], |
673
f2215949c0c9
build adjustments. now seems to read streamedgraph correctly.
drewp@bigasterisk.com
parents:
diff
changeset
|
45 }; |