Skip to content

Commit

Permalink
refactor: add demo/api.js into bundler
Browse files Browse the repository at this point in the history
  • Loading branch information
sun-mota committed Oct 24, 2024
1 parent a0b2410 commit 8667d58
Show file tree
Hide file tree
Showing 4 changed files with 158 additions and 3 deletions.
2 changes: 1 addition & 1 deletion demo/api.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
Prism.highlightAll();
});
</script>
<script type="module" data-demo-script="true" src="../index.js"></script>
<script type="module" data-demo-script="true" src="./api.min.js"></script>

<!-- If additional elements are needed for the demo, add them here. -->
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-accordion@latest/dist/auro-accordion__bundled.js" type="module"></script>
Expand Down
1 change: 1 addition & 0 deletions demo/api.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import '../index.js';
145 changes: 145 additions & 0 deletions demo/api.min.js

Large diffs are not rendered by default.

13 changes: 11 additions & 2 deletions rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ const production = !process.env.ROLLUP_WATCH,
]
};


const indexExamplesConfig = {
input: {
['index.min']: './demo/index.js',
Expand All @@ -32,4 +31,14 @@ const indexExamplesConfig = {
}
};

export default [modernConfig, indexExamplesConfig];
const apiExamplesConfig = {
input: {
['api.min']: './demo/api.js',
},
output: {
format: 'esm',
dir: 'demo/'
}
};

export default [modernConfig, indexExamplesConfig, apiExamplesConfig];

0 comments on commit 8667d58

Please sign in to comment.