Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
badoo-styleguide
Advanced tools
Badoo styleguide used to develop UI components for the Web and React Native
Work in progress: This is a styleguide used by the frontend team in Badoo, at the moment we are in the process of open sourcing it. Just working out some issues, cleaning up the API and adding documentation.
yarn add badoo-styleguide --dev
Create a file called styleguide.config.js
in your project (The name doesn't really matter).
Add the following content to the file
module.exports = {
/**
* Set it to true if your project is a React native project
* @optional
*/
isReactNative: false,
/**
* This function will tell the styleguide if the component being included
* is a specification/example component
* @optional
*/
isSpecificationPath(componentMeta, path) {
return path.indexOf(`${componentMeta.fileNameWithoutPrefix}.spec`) !== -1;
},
/**
* Returns an array of all the sections in the styleguide
* @returns Array<Object>
*/
getSections() {
return [
{
name: 'MyComponentSection',
components: [
require('MyComponent'),
],
},
];
},
// This method tells us the root folder of your component
// heirarchy
getComponentRoots({ path }) {
return [
path.resolve(cwd, 'src')
];
},
/**
* Returns the webpack configuration for your module setup
* @param {string} path - The "path" node module to help you resolve any paths
* @returns Object
*/
getWebpackConfig({ path }) {
const cwd = path.resolve(__dirname, '.');
// Any custom webpack configuration you need, this will be merged
// using webpack-merge
return {
resolve: {
modules: [
path.resolve(cwd, 'src/'),
path.resolve(cwd, 'node_modules/'),
],
}
};
}
}
The styleguide can be run as a local dev server or be compiled if you want to serve it from another host.
yarn badoo-styleguide --config=PATH_TO_STYLEGUIDE_CONFIG.js
yarn badoo-styleguide --config=PATH_TO_STYLEGUIDE_CONFIG.js --buildDir=dist/
Or add it to your package.json "scripts" section
{
"scripts": {
"styleguide": "badoo-styleguide --config=PATH_TO_STYLEGUIDE_CONFIG.js",
"styleguide:compile": "badoo-styleguide --config=PATH_TO_STYLEGUIDE_CONFIG.js --buildDir=dist/",
}
}
Note: The buildDir is resolved relative to where you ran "yarn" from
TODO
Pass --debug flag to the command line to get additional debug information.
yarn badoo-styleguide --config=PATH_TO_STYLEGUIDE_CONFIG.js --debug
v0.0.19
FAQs
Badoo styleguide is sandbox environment to develop & document React UI components
The npm package badoo-styleguide receives a total of 44 weekly downloads. As such, badoo-styleguide popularity was classified as not popular.
We found that badoo-styleguide demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.