
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
change-style-vars
Advanced tools
scss、less util。To change the value of the sass or less variable 。and render to css
To change the value of the sass or less variable
用于改变 scss、less、sass等样式文件的变量。
const StyleFile = require('./adapter')
const fs = require('fs')
const path = require('path')
const style = new StyleFile({
language: 'scss',
from: 'test/scssTheme/index.scss',
to: 'test/scssTheme/dist/theme.css'
})
let styleCss = fs.readFileSync('./test/scssTheme/index.scss')
let variable = {
'$--color-white': '#fff'
}
async function start() {
await style.changeVars(styleCss, variable)
let renderCssResult = await style.toCss()
// assetsPath 生成静态资源文件目录
const urlOption = [
{ filter: /\.ttf$/, url: 'copy', useHash: true, assetsPath: path.resolve('test','scssTheme', 'dist','fonts') },
{ filter: /\.woff$/, url: 'copy', useHash: true, assetsPath: path.resolve('test','scssTheme', 'dist','fonts') }
]
let rs = await style.postcssUrl(renderCssResult.css, urlOption)
fs.writeFileSync(path.resolve('test','scssTheme','dist') + '/theme.css', rs.css)
}
start()
FAQs
scss、less util。To change the value of the sass or less variable 。and render to css
The npm package change-style-vars receives a total of 2 weekly downloads. As such, change-style-vars popularity was classified as not popular.
We found that change-style-vars 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.