Skip to content

Commit

Permalink
Exposed build targets for rollup visualizers: network and sunburst (#…
Browse files Browse the repository at this point in the history
…4693)

Co-authored-by: Martin Valigursky <mvaligursky@snapchat.com>
  • Loading branch information
mvaligursky and Martin Valigursky authored Oct 4, 2022
1 parent fba3e56 commit d3e1b4a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@
"build:es6": "rollup -c --environment target:es6",
"build:profiler": "rollup -c --environment target:profiler",
"build:treemap": "npm run build:es5 -- --environment treemap",
"build:treenet": "npm run build:es5 -- --environment treenet",
"build:treesun": "npm run build:es5 -- --environment treesun",
"build:types": "npm run build:dts && node types-fixup.mjs && rollup -c --environment target:types && node types-undollar.mjs",
"build:sourcemaps": "npm run build -- -m",
"build:publish": "npm run build && npm run build:types",
Expand Down
15 changes: 15 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,26 @@ function buildTarget(buildType, moduleFormat) {

if (process.env.treemap) {
outputPlugins.min.push(visualizer({
filename: 'treemap.html',
brotliSize: true,
gzipSize: true
}));
}

if (process.env.treenet) {
outputPlugins.min.push(visualizer({
filename: 'treenet.html',
template: 'network'
}));
}

if (process.env.treesun) {
outputPlugins.min.push(visualizer({
filename: 'treesun.html',
template: 'sunburst'
}));
}

const outputFile = {
debug: 'build/playcanvas.dbg',
release: 'build/playcanvas',
Expand Down

0 comments on commit d3e1b4a

Please sign in to comment.