# HG changeset patch # User drewp@bigasterisk.com # Date 1578558796 28800 # Node ID 1264ba9ffb1003bf04846584d3394ea4609ee8d6 # Parent c16a331f42e51871ef12b1ae95690b3d85fb04fb make a full-element version for pages that want to try to use that diff -r c16a331f42e5 -r 1264ba9ffb10 package.json --- a/package.json Thu Jan 09 00:05:32 2020 -0800 +++ b/package.json Thu Jan 09 00:33:16 2020 -0800 @@ -2,7 +2,7 @@ "name": "streamed-graph", "version": "0.0.2", "types": "build/index.d.ts", - "module": "build/bundle", + "module": "build/lib.bundle", "scripts": { "build": "rollup -c", "build_forever": "rollup -cw", diff -r c16a331f42e5 -r 1264ba9ffb10 rollup.config.js --- a/rollup.config.js Thu Jan 09 00:05:32 2020 -0800 +++ b/rollup.config.js Thu Jan 09 00:33:16 2020 -0800 @@ -16,7 +16,7 @@ { input: "src/index.ts", output: { - file: "build/bundle.js", + file: "build/lib.bundle.js", format: "esm", intro: `const ${workaround_some_browser_detector}, ${workaround_jsonld_module_system_picker};` }, @@ -40,6 +40,26 @@ }), commonjs(workaround_jsonld_expand_issue) ] + },{ + input: "src/index.ts", + output: { + file: "build/element.bundle.js", + format: "esm", + intro: `const ${workaround_some_browser_detector}, ${workaround_jsonld_module_system_picker};` + }, + external: [], + plugins: [ + builtins(), + resolve({ + extensions: [".js", ".ts"], + browser: true, + }), + typescript(), + postcss({ + inject: false + }), + commonjs(workaround_jsonld_expand_issue) + ] }, { input: "src/demo.ts", diff -r c16a331f42e5 -r 1264ba9ffb10 tasks.py --- a/tasks.py Thu Jan 09 00:05:32 2020 -0800 +++ b/tasks.py Thu Jan 09 00:33:16 2020 -0800 @@ -27,5 +27,4 @@ @task(pre=[build]) def install(ctx): - ctx.run(f'cp build/bundle.js /my/site/homepage/www/rdf/streamed-graph.bundle.js') - ctx.run(f'cp src/streamed-graph.css /my/site/homepage/www/rdf/streamed-graph.css') + ctx.run(f'cp build/element.bundle.js /my/site/homepage/www/rdf/streamed-graph.bundle.js')