
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
design-system-test
Advanced tools
React components and css styles library for use in Livechat products. By creating a uniform system, we want to deliver a harmonious experience to our customers. For someone who’s already used one of our products, the transition to another one would be smooth and intuitive.
To install LiveChat Design System Components Library with npm, run the following command:
npm install --save @livechat/design-system
Libary has separate css file with components styles. You need to import it in your app as well. You can find it in node-modules/@livechat/design-system/dist/design-system.css
git clone https://github.com/livechat/design-system
(or download zip)cd design-system
npm install
styleguide
: run styleguidist server with eslint at http://localhost:6060styleguide:build
: run styleguidist buildstart
: bundles the library with watch flag, usefull for development with external app instead of styleguidistbuild
: bundles the library with rollup to the dist dirprebuild
: removes build directory (before build script)prepare
: runs both before the package is packed and published and on local npm installpredeploy
: runs before deploying design system guide to github pagesdeploy
: deploy design system guide to github pagestest
: runs teststest:coverage
: runs tests with coverage reporttest:watch
: runs tests in watch modeA typical UI component should comply with the following guidelines:
className
and style
props declared.You can view and test your component in two ways:
You should start with executing these two commands:
npm link
npm link @livechat/design-system
You can run build script after new changes (or use npm start) or if you are using webpack just add to webpack.config.js few lines to see changes without unnecessary bundling library:
const designSystemComponentsPath = fs.realpathSync(
path.resolve(__dirname, '../node_modules/@livechat/design-system/src')
);
const designSystemDistPath = fs.realpathSync(
path.resolve(__dirname, '../node_modules/@livechat/design-system/dist')
);
...
resolve: {
alias: Object.assign({}, {
'@livechat/design-system/dist': designSystemDistPath,
'@livechat/design-system': designSystemComponentsPath
}),
},
...
That way you will need to install classnames and configure css modules for library
(in example new webpack config which runs dev server after command npm start:ds
:
rules: [
{
test: /\.css$/,
include: [designSystemComponentsPath],
use: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: [
{
loader: 'css-loader',
query: {
modules: true,
localIdentName: 'lc_[local]'
}
},
{
loader: 'postcss-loader',
options: {
ident: 'postcss',
}
},
],
}),
},
]
If you want to learn more about npm link read this basic article
npm run-script styleguidist
http://localhost:6060
Styleguidist monitors the <root-dir>/src/components
directory for components. Nevertheless, examples are user-defined in a <Component-name>.md
file within the subdirectory of the component. Remember to add your new component in setup.js
to see it in docs.
Unit and snapshot tests, uses Jest as test runner.
npm run test or npm run test:watch
for run the test optional with watching modeIstanbul is used for code coverage and reporting, so:
npm run coverage
and check your testing skillsnpm run build
for bundle libraryFAQs
LiveChat Design System React components with css styles
The npm package design-system-test receives a total of 3 weekly downloads. As such, design-system-test popularity was classified as not popular.
We found that design-system-test 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.