
Security News
Bun 1.2.19 Adds Isolated Installs for Better Monorepo Support
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.
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 0 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.
Security News
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.
Security News
Popular npm packages like eslint-config-prettier were compromised after a phishing attack stole a maintainer’s token, spreading malicious updates.
Security News
/Research
A phishing attack targeted developers using a typosquatted npm domain (npnjs.com) to steal credentials via fake login pages - watch out for similar scams.