
Security News
Python Adopts Standard Lock File Format for Reproducible Installs
Python has adopted a standardized lock file format to improve reproducibility, security, and tool interoperability across the packaging ecosystem.
Focus on writing your Lightining web components and leave the documentation generation to lwc-demo
. Features include:
git clone lwc-demo
cd lwc-demo
npm install
npm link ../path-to-module
npm link module-name
npm run watch
Learn more about
npm link
. This will allow live reload of a local component.
When you are ready to generate the static website...
npm run build
dist
folder.This uses webpack to read everything and generate documentation from various jsdoc comments in your code and markdown files. Examples for each file and their location described below.
src/modules/namespace/name/name.js <namespace-name>
Using JSdoc can be a great way to document your component inside of the JavaScript file.
/**
* Render a name component.
*
* > **Note:** Parsed with markdown!
*
* @order 1
*/
export default class Name extends LightningElement { }
Order: Set priority of component on the page.
@api
)By default @api
is the main form of documentation. Any other properties or methods will be ignored.
/**
* The path data rendered in the SVG.
*
* @type {string}
* @default 'Hello World'
*/
@api foo = 'Hello World';
src/modules/namespace/namespace.md
Introducing your namespace is a great way explain the relationship between the components.
# Override `namespace`
This namespace contains components to help with your app.
[icon]: M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z
[order]: 1
Icon: Icon is an optional single pathed SVG file. Use any icon from MaterialDesignIcons.com. Defaults to
puzzle-outline
.
Order: For multiple namespaces set a priority.
src/modules/namespace/name/name.md
By default the JSdoc description above the component class will be used. To not clutter the JS file one can used a markdown file to override the title
, description
, or order
.
# Override Component Title
Override the JSdoc description. Ideal for teams that do not want to clutter their files.
[order]: 1
__examples__
(required)Examples are great way to explain what @api
in your component will do. Including one example for every @api
is recommended.
src/modules/namespace/name/__examples__/withFoo/withFoo.js
/withFoo.html
/withFoo.css
JSdoc at the top of your WithFoo
class will be used.
/**
* This example sets the foo attribute.
*
* @order 1
*/
export default class WithFoo extends LightningElement { }
Order: Set example order. Useful for showing basic examples first.
You can override anything in the JSdoc with a markdown file the withFoo
folder.
__tests__
(optional)Want to show off your components tests. Test counts if found will show to the right of the header. Clicking will navigate the user to your GitHub repo's spec file.
__wdio__
(optional)Similar to tests it is highly encouraged to provide integration testing. These will appear to the right in the header if found.
Themes are managed through several dynamic components.
<demo-title
path={namespace.icon}
label={component.name}></demo-title>
<demo-description
namespace={component.namespace}></demo-description>
<demo-component-title
namespace={component.namespace}
component={component}></demo-component-title>
<demo-component-description
namespace={component.namespace}
component={component}></demo-component-description>
<demo-example-title
namespace={component.namespace}
component={component}
example={name}></demo-example-title>
<demo-example-description
namespace={component.namespace}
component={component}
example={name}></demo-example-description>
<demo-example
namespace={component.namespace}
component={component}
example={name}></demo-example>
FAQs
Generate Lightning web component documentation.
We found that lwc-demo demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Python has adopted a standardized lock file format to improve reproducibility, security, and tool interoperability across the packaging ecosystem.
Security News
OpenGrep has restored fingerprint and metavariable support in JSON and SARIF outputs, making static analysis more effective for CI/CD security automation.
Security News
Security experts warn that recent classification changes obscure the true scope of the NVD backlog as CVE volume hits all-time highs.