
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
@cosmic-design/style
Advanced tools
/** package.json */
{
"exports": {
"./*": "./dist/*", /** compiled css **/
"./common": "./src/common" /** souce code css **/
},
}
.
├── dist
│ ├── utilities.css # Tool CSS
│ ├── button.module.css # Component CSS, including default & prefab style
│ ├── global.css # Global CSS = Tool CSS + CSS Variables
├── src
│ ├── common
│ │ ├── theme.css # CSS Variables
以下内容为组件代码库引用 @cosmic-design/style 的方式
import style "@cosmic-design/style/button.module.css";
;import style from '@cosmic-design/style/button.modules.css';
const ButtonTemplate = `<div class="${style.button} cos-sm"></div>`
以下内容为组件/业务代码库,如何使用工具样式/组件样式
<!-- 使用组件的变体修饰 -->
<button class="cos-lg" >大号按钮</button>
<!-- 使用组件的变体修饰 -->
<button class="cos-rounded" >放行按钮</button>
<!-- 使用组件的预制修饰 -->
<button class="cos-dashed" >描边按钮</button>
衍生外观的实现位于 component/Button/button-dashed.module.less 中,编译时打包到 dist/button.module.css 中。
目前在 vite.config.js 中对 CSS Module 编译进行了基本配置
{
modules: {
scopeBehaviour: 'local', // 默认配置, 全局样式需要加 :global() 来避免className编译
localsConvention: 'camelCase', // js的产出中增加驼峰变量名,以便于 style.buttonPrefix 方式引用
generateScopedName: "cos-[local]" // className 编译规则, 目前cos-前缀在这里统一添加
}
}
FAQs
## Exports
The npm package @cosmic-design/style receives a total of 260 weekly downloads. As such, @cosmic-design/style popularity was classified as not popular.
We found that @cosmic-design/style demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 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.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.