@pictogrammers/element-esbuild
v0.0.29
Published
Element esbuild
Readme
Element-esbuild
Element esbuild tooling for developing Web Components with the Element utility.
Features
- Application - Bundle a single application
- Components - Bundle a shared component library
__examples__components map to the library
Default folder structure for both:
src/index.html- optionalsrc/favicon.svg- optionalsrc/components/*- requirednamespace/- requiredapp/app.ts- required for app__examples__basic/basic.ts- for component library
element.config.ts
Example configuration for a app.
export default {
// root hello/app/app.ts
namespace: 'hello', // for applications
// optionally include external component packages
external: ['mynodepackage'],
copy: [
{ from: 'assets', to: 'assets' }
],
}Example configuration for a component library.
export default {
repo: 'https://...',
navigation: [{
label: 'Components',
// default group
}, {
label: 'Overlays',
extends: ['MyOverlay'], // group all components extend class
include: ['MyOverlay'], // also include MyOverlay component
exclude: ['MyExclude'],
namespaces: ['my'], // filter to only my-* components
}],
}Leaving off the namespace will treat the repo as a component library. Each component will be built individually instead of a single application. The component's __examples__ folders will render as demo.
Changes to the /components/* will sync to the /publish/* directory. This is by design so the publish directory can be linked with the npm link command.
