Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
cosmic-san
Advanced tools
The san components of cosmic design ## Install ```shell npm install cosmic-ui-san -D ``` ## Config
The san components of cosmic design
npm install cosmic-ui-san -D
rollup or vite config:
import { defineConfig } from 'vite';
import path from 'path';
import { cStyle } from 'cosmic-ui-san/plugin/vanilla/rollup-plugin-san-cosmic';
export default defineConfig({
build: {
rollupOptions: {
external: ['san', 'your-design-lib'],
},
},
plugins: [
cStyle({/* options */}),
]
});
DOING
option | type | desc | default |
---|---|---|---|
target | string | component tag's attribute name | c-style |
propName | string | the precompiled name of component tag's attribute | styles |
basePath | string | css module's import base path | cosmic-ui |
import { Button } from 'cosmic-san';
export class Page extends Component {
static template = `
<Button
c-style="icon"
>
button text
</Button>
`;
}
After PreCompile:
import { Button } from 'cosmic-san';
import { ButtonIcon as _ModuleCSS_1 } from 'cosmic-ui/button-icon.module.css'
export class Page extends Component {
static template = `
<Button
styles="_ModuleCSS_1"
>
button text
</Button>
`;
}
import { Button } from 'cosmic-san';
export class Page extends Component {
static template = `
<Button
c-style="icon"
>
button text
</Button>
`;
}
After PreCompile:
import { Button } from 'cosmic-san';
import { ButtonIcon as _ModuleCSS_1 } from 'cosmic-ui/button-icon.module.css';
export class Page extends Component {
static template = `
<Button
styles="_ModuleCSS_1"
>
button text
</Button>
`;
}
import { Button } from 'cosmic-san';
export class Page extends Component {
static template = `
<Button
c-style="./button-custom"
>
button text
</Button>
<Button
c-style="./button-custom.module.css"
>
button text
</Button>
`;
}
After PreCompile:
import { Button } from './button.ts';
import _ModuleCSS_1 from './button.custom.css';
import _ModuleCSS_2 from './button.custom.module.css';
export class Page extends Component {
static template = `
<Button
styles="_ModuleCSS_1"
>
button text 1
</Button>
<Button
styles="_ModuleCSS_2"
>
button text 2
</Button>
`;
}
Usage 4:
import { Button } from 'cosmic-san';
export class Page extends Component {
static template = `
<Button
c-style="-custom"
>
button text
</Button>
`;
}
After PreCompile:
import { Button } from 'cosmic-san';
import _ModuleCSS_1 from 'custom.module.css'
export class Page extends Component {
static template = `
<Button
styles="_ModuleCSS_1"
>
button text
</Button>
`;
}
FAQs
The san components of cosmic design ## Install ```shell npm install cosmic-ui-san -D ``` ## Config
The npm package cosmic-san receives a total of 1 weekly downloads. As such, cosmic-san popularity was classified as not popular.
We found that cosmic-san 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
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.