
Security News
Open Source Maintainers Feeling the Weight of the EU’s Cyber Resilience Act
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
json_script
Advanced tools
类似于less、sass这样的css预处理器,这里采用json格式的语法来编写css,如下所示:
json文件:
{
'.wrap': {
'margin-top': '20px',
'padding': '20px',
'color': '#444',
p: {
'padding-top': '20px',
'font-size': '28px'
}
}
}
生成的css:
.wrap {
margin-top: 20px;
padding: 20px;
color: #444;
}
.wrap p {
padding-top: 20px;
font-size: 28px;
}
npm install --save json_script
var json_script = require('json_script');
json_script(function(convert) {
convert.css({
'.wrap': {
'margin-top': '20px',
'padding': '20px',
'color': '#444',
p: {
'padding-top': '20px',
'font-size': '28px'
}
}
});
}).render(function(css){
console.log("渲染后的css:");
console.log(css);
})
FAQs
css precessor
The npm package json_script receives a total of 6 weekly downloads. As such, json_script popularity was classified as not popular.
We found that json_script 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
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.