Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@reapit/storybook-addon-html
Advanced tools
Changelog
Readme
Fork of original module
Forked purely to ensure Prettier is tagged at v2.2.X - a regex was introduced in Prettier v2.3.x which causes my Storybook build to fail. Full credit and thanks to the maintainers of this project.
This addon for Storybook adds a tab that displays the compiled HTML for each story. It uses highlight.js for syntax highlighting.
With NPM:
npm i --save-dev @whitespace/storybook-addon-html
With Yarn:
yarn add -D @whitespace/storybook-addon-html
// .storybook/main.js
module.exports = {
// ...
addons: [
'@whitespace/storybook-addon-html',
// ...
],
};
The HTML is formatted with Prettier. You can override the Prettier config
(except parser
and plugins
) by providing an object following the
Prettier API override format in the
html
parameter:
// .storybook/preview.js
export const parameters = {
// ...
html: {
prettier: {
tabWidth: 4,
useTabs: false,
htmlWhitespaceSensitivity: 'strict',
},
},
};
You can override the wrapper element selector used to grab the component HTML.
export const parameters = {
html: {
root: '#my-custom-wrapper', // default: #root
},
};
When using Web Components, the HTML will contain empty comments, i.e. <!---->
.
If you want to remove these, use the removeEmptyComments
parameter:
export const parameters = {
html: {
removeEmptyComments: true, // default: false
},
};
You can override the showLineNumbers
and wrapLines
settings for the syntax
highlighter by using the highlighter
parameter:
export const parameters = {
html: {
highlighter: {
showLineNumbers: true, // default: false
wrapLines: false, // default: true
},
},
};
As of version 4.0.0 all frameworks are supported per default 🎉
FAQs
A Storybook addon that extracts and displays compiled syntax-highlighted HTML
The npm package @reapit/storybook-addon-html receives a total of 94 weekly downloads. As such, @reapit/storybook-addon-html popularity was classified as not popular.
We found that @reapit/storybook-addon-html demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.