
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
grunt-myless-beta
Advanced tools
grunt-myless is a second development plugin based on grunt-contrib-less and less 1.7.5 . fixed the bug that the grunt-contrib-less can not resolve image path corretly when the less file was imported by another less file. extend less supported functions
grunt-myless is a second development plugin based on grunt-contrib-less and less 1.7.5 . fixed the bug that the grunt-contrib-less can not resolve image path corretly when the less file was imported by another less file. extend less supported functions and enable user to extend less function by create file at project_root_path/myless/functions. extend less grammer to let less support multiline string.
grunt.loadNpmTasks('grunt-myless');
in your Gruntfile.js grunt.initConfig({
...
myless: {
options: {
paths: './'
},
main: {
files: [
{
expand: true,
cwd:'src/',
src: ['**/*.less'],
dest: 'src/',
ext: '.css'
}
]
}
},
...
});
backgbround: svg-cont('width=80px', 'height=80px', <<EOF
<!-- your svg code here -->
EOF) center cente no-repeat;
backgbround: png8-data-uri(svg-to-png('./my-png.png', 'width=80px', 'height=80px', <<EOF
<!-- your svg code here -->
EOF)) center cente no-repeat;
div:before { content: escape-utf8('中文'); }
background-iamge: svg-cont('width=80px', 'height=80px', <<CODE_END
<!-- you svg code here -->
CODE_END);
background-iamge: svg-cont('width=80px', 'height=80px', <<<EOF
<!-- you svg code here -->
EOF);
grunt-myless will crate a folder named myless at the project root path when it run first time. the folder myless has two sub-folder: data, functions。suppose we want to extend to function: fn1 and fn2, and fn1 is a sync function then fn2 is a async function.
first wo need to create two js file at folder functions. the neme of two files were : fn1.js and asy-fn2.js。the prefix asy- means is a async function.
sencod to implements two functions as follow form.
// fn1.js content
module.exports = function(myless, param1, param2){
var sum = parseInt(param1.value, 10) + parseInt(param2.value, 10);
return myless.util.value.toLessNum(sum, 'px');
};
// asy-fn2.js content
module.exports = function(myless, done, param1, param2){
var sum = parseInt(param1.value, 10) + parseInt(param2.value, 10);
setTimeout(function(){
if(sum <= 0){
var err = 'wrong param!';
done(err, null);
}else{
var ret = myless.util.value.toLessNum(sum, 'px');
done(null, ret);
}
}, 1000);
};
third use functions at you less file, for example:
div {
width : fn1(10, 20);
height: fn2(20, 20);
}
FAQs
grunt-myless is a second development plugin based on grunt-contrib-less and less 1.7.5 . fixed the bug that the grunt-contrib-less can not resolve image path corretly when the less file was imported by another less file. extend less supported functions
The npm package grunt-myless-beta receives a total of 0 weekly downloads. As such, grunt-myless-beta popularity was classified as not popular.
We found that grunt-myless-beta 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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.