annotate rollup.config.js @ 47:7d17a02b5ae0

reformats and minor edits
author drewp@bigasterisk.com
date Mon, 06 Jan 2020 23:52:30 -0800
parents 2a48e13bafea
children b8e5850acca0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
35
29d8ed02a275 build and tests, including jsonld
drewp@bigasterisk.com
parents: 34
diff changeset
1 import builtins from "rollup-plugin-node-builtins";
47
7d17a02b5ae0 reformats and minor edits
drewp@bigasterisk.com
parents: 43
diff changeset
2 import commonjs from "@rollup/plugin-commonjs";
34
3d8b98e9c01d building, but without jsonld so far
drewp@bigasterisk.com
parents:
diff changeset
3 import resolve from "@rollup/plugin-node-resolve";
3d8b98e9c01d building, but without jsonld so far
drewp@bigasterisk.com
parents:
diff changeset
4 import typescript from "rollup-plugin-typescript2";
3d8b98e9c01d building, but without jsonld so far
drewp@bigasterisk.com
parents:
diff changeset
5
3d8b98e9c01d building, but without jsonld so far
drewp@bigasterisk.com
parents:
diff changeset
6 export default {
35
29d8ed02a275 build and tests, including jsonld
drewp@bigasterisk.com
parents: 34
diff changeset
7 input: "src/index.ts",
29d8ed02a275 build and tests, including jsonld
drewp@bigasterisk.com
parents: 34
diff changeset
8 output: {
29d8ed02a275 build and tests, including jsonld
drewp@bigasterisk.com
parents: 34
diff changeset
9 file: "build/bundle.js",
42
895ae7c5b0f4 don't pile all the deps in our sharable library. other fixes to make it work as a dep.
drewp@bigasterisk.com
parents: 35
diff changeset
10 format: "cjs", // just for the namedExports hack
895ae7c5b0f4 don't pile all the deps in our sharable library. other fixes to make it work as a dep.
drewp@bigasterisk.com
parents: 35
diff changeset
11 intro: "const global = window;",
895ae7c5b0f4 don't pile all the deps in our sharable library. other fixes to make it work as a dep.
drewp@bigasterisk.com
parents: 35
diff changeset
12
35
29d8ed02a275 build and tests, including jsonld
drewp@bigasterisk.com
parents: 34
diff changeset
13 },
42
895ae7c5b0f4 don't pile all the deps in our sharable library. other fixes to make it work as a dep.
drewp@bigasterisk.com
parents: 35
diff changeset
14 // only for final build. demo page does need these modules, so I guess this file should observe some kind of build mode.
895ae7c5b0f4 don't pile all the deps in our sharable library. other fixes to make it work as a dep.
drewp@bigasterisk.com
parents: 35
diff changeset
15 external: ['@polymer/polymer','lit-html','@polymer/decorators','n3','jsonld'],
35
29d8ed02a275 build and tests, including jsonld
drewp@bigasterisk.com
parents: 34
diff changeset
16 plugins: [
29d8ed02a275 build and tests, including jsonld
drewp@bigasterisk.com
parents: 34
diff changeset
17 builtins(),
29d8ed02a275 build and tests, including jsonld
drewp@bigasterisk.com
parents: 34
diff changeset
18 resolve({
29d8ed02a275 build and tests, including jsonld
drewp@bigasterisk.com
parents: 34
diff changeset
19 extensions: [".js", ".ts"],
42
895ae7c5b0f4 don't pile all the deps in our sharable library. other fixes to make it work as a dep.
drewp@bigasterisk.com
parents: 35
diff changeset
20 browser: true,
895ae7c5b0f4 don't pile all the deps in our sharable library. other fixes to make it work as a dep.
drewp@bigasterisk.com
parents: 35
diff changeset
21 only: ['streamed-graph']
35
29d8ed02a275 build and tests, including jsonld
drewp@bigasterisk.com
parents: 34
diff changeset
22 }),
29d8ed02a275 build and tests, including jsonld
drewp@bigasterisk.com
parents: 34
diff changeset
23 typescript(),
29d8ed02a275 build and tests, including jsonld
drewp@bigasterisk.com
parents: 34
diff changeset
24 commonjs({
29d8ed02a275 build and tests, including jsonld
drewp@bigasterisk.com
parents: 34
diff changeset
25 namedExports: {
29d8ed02a275 build and tests, including jsonld
drewp@bigasterisk.com
parents: 34
diff changeset
26 'jsonld': ['expand'], // fixes "expand is not exported by node_modules/jsonld/lib/index.js"
29d8ed02a275 build and tests, including jsonld
drewp@bigasterisk.com
parents: 34
diff changeset
27 }
29d8ed02a275 build and tests, including jsonld
drewp@bigasterisk.com
parents: 34
diff changeset
28 }),
42
895ae7c5b0f4 don't pile all the deps in our sharable library. other fixes to make it work as a dep.
drewp@bigasterisk.com
parents: 35
diff changeset
29
35
29d8ed02a275 build and tests, including jsonld
drewp@bigasterisk.com
parents: 34
diff changeset
30 ]
34
3d8b98e9c01d building, but without jsonld so far
drewp@bigasterisk.com
parents:
diff changeset
31 };