inviton-powerduck
Inviton Powerduck framework
Framework containing main TSX components and frontend utility functions for use in projects.
Built using Vue3 + vue-facing-decorator package.
Vite plugins
Two plugins for an app's vite.config.ts, from common/vite/. They make each page's first download smaller.
bootstrapLite({ components })(bootstrap-lite.mjs): Bootstrap with only the components the app runs, andcommon/popper-lite.tsinstead of Popper. In the gopass shop, 21.4 → 12.6 KB at brotli 11 on every page.- List every class the app imports from
bootstrapand every component whose data attributes its markup renders. For example,data-bs-toggle="offcanvas"needsOffcanvas. - A class left out stops the build. A data-attribute component left out is a button that does nothing.
- powerduck itself needs
Modal,DropdownandTooltip, plusCollapseandTabwhere it renders an accordion, a collapse or tabs. - The build stops when anything but Bootstrap imports
@popperjs/core(passpopperLite: falseto keep Popper), or when anything imports a pre-built Bootstrap file.
- List every class the app imports from
fontAwesomeSubset({ roots })(fontawesome-subset.mjs): FontAwesome's stylesheet with only the glyphs the app names. In the gopass shop, 18 → 3 KB at brotli 11.rootsare the folders and files where the app names its icons. powerduck's own folder is always read.- The build stops when a chunk names an icon whose glyph was dropped.
import { bootstrapLite } from 'inviton-powerduck/common/vite/bootstrap-lite.mjs';
import { fontAwesomeSubset } from 'inviton-powerduck/common/vite/fontawesome-subset.mjs';
export default defineConfig({
plugins: [
bootstrapLite({ components: [
'Collapse',
'Dropdown',
'Modal',
'Tab',
'Tooltip'
] }),
fontAwesomeSubset({ roots: [
path.resolve(__dirname, 'src'),
path.resolve(__dirname, 'index.html')
] }),
// …
],
});
Checked by dev/validate-bootstrap-lite.mjs, dev/validate-fontawesome-subset.mjs and, against
vite serve dev --port 9445, dev/validate-popper-lite.mjs.
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 0.0.439 | 3.5.12 | ||
| 0.0.438 | 3.5.12 | ||
| 0.0.437 | 3.5.12 | ||
| 0.0.436 | 3.5.12 | ||
| 0.0.435 | 3.5.12 | ||
| 0.0.434 | 3.5.12 | ||
| 0.0.433 | 3.5.12 | ||
| 0.0.432 | 3.5.12 | ||
| 0.0.430 | 3.5.12 | ||
| 0.0.429 | 3.5.12 | ||
| 0.0.428 | 3.5.12 | ||
| 0.0.427 | 3.5.12 | ||
| 0.0.425 | 3.5.12 | ||
| 0.0.424 | 3.5.12 | ||
| 0.0.423 | 3.5.12 | ||
| 0.0.422 | 3.5.12 | ||
| 0.0.421 | 3.5.12 | ||
| 0.0.420 | 3.5.12 | ||
| 0.0.419 | 3.5.12 | ||
| 0.0.418 | 3.5.12 | ||
| 0.0.417 | 3.5.12 | ||
| 0.0.416 | 3.5.12 | ||
| 0.0.415 | 3.5.12 | ||
| 0.0.413 | 3.5.12 | ||
| 0.0.412 | 3.5.12 | ||
| 0.0.411 | 3.5.12 | ||
| 0.0.409 | 3.5.12 | ||
| 0.0.408 | 3.5.12 | ||
| 0.0.407 | 3.5.12 | ||
| 0.0.406 | 3.5.12 |
Showing the latest 30 of 408. See every release on npm