Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
grunt-snakeskin
Advanced tools
Readme
Using Snakeskin templates with Grunt.
npm install grunt-snakeskin --save-dev
Gruntfile.js
module.exports = function (grunt) {
grunt.initConfig({
snakeskin: {
compile: {
options: {
exec: true,
prettyPrint: true
},
files: {
'html/': ['test/fixtures/*.ss']
}
}
}
});
grunt.loadNpmTasks('grunt-snakeskin');
grunt.registerTask('default', ['snakeskin']);
};
Type: String
Name of the adaptor, for example:
Type: Object
Options for the used adaptor.
Type: Boolean
Default: false
If the parameter is set to true
the template will be launched after compiling and the results of it work will be saved.
Type: String
Default: '.html'
Extension of a file with result after template execution (using with exec
).
Type: String
The name of the executable template (if is set exec
), if the parameter is not specified, then uses the rule:
%fileName% || main || index || Object.keys().sort()[0];
Type: ?
Data for the executable template (if is set exec
).
Do not recompile templates with exec: true
option:
grunt.initConfig({
snakeskin: {
render: {
options: {
exec: true,
},
files: {
// Specify compiled template as source
'html/': ['compiled/*.ss.js']
},
// Additional dependencies for grunt-newer
deps: ['mycode.js']
}
}
});
npm install grunt-newer --save-dev
Specify grunt-newer override function in the following way:
var gruntCfg = {
...
newer: {
options: {
override: function(detail, include) {
// Check snakeskin include dependencies
if (detail.task === 'snakeskin' && detail.target.includes('compile')) {
// Build dest path from template source path
var dst = SS_BUILD_DIR + '/' + path.basename(detail.path) + '.js';
if (snakeskin.check(detail.path, dst)) {
return include(true);
}
}
// Check dependencies from target configuration
// detail.config was requested: https://github.com/tschaub/grunt-newer/pull/115
if (detail.config.deps) {
for (var i = 0; i < detail.config.deps.length; i++) {
var fn = detail.config.deps[i];
var ts = fs.statSync(fn).mtime;
var difference = detail.time - ts;
if (difference < this.tolerance) {
console.log(detail.path + ' has a newer dependency ' + fn);
return include(true);
}
}
}
return include();
}
}
},
...
};
The MIT License.
FAQs
Using Snakeskin templates with Grunt.
The npm package grunt-snakeskin receives a total of 0 weekly downloads. As such, grunt-snakeskin popularity was classified as not popular.
We found that grunt-snakeskin 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.