Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
grunt-htmlgen
Advanced tools
Grunt (0.4.x) task to generate HTML files with stylesheet and script elements.
htmlgen is a multi task so any targets, files and options should be specified according to the multi task documentation.
Brief configuration guide:
devDependency
in package.json
.npm install
in your project's directory to install the dependencies.Gruntfile.js
to use this task:
grunt.loadNpmTasks('grunt-htmlgen');
htmlgen: { // Your configuration }
in grunt.initConfig
Type: String
Location of the generated HTML file.
Type: String
Title of the page to generate.
Type: String|Array
URL or array of URLs of stylesheets to include.
Type: String|Array
URL or array of URLs of scripts to include.
Gruntfile.js
module.exports = function(grunt) {
'use strict';
grunt.initConfig({
meta: {
sample: {
css_reset: 'styles/reset.css',
js_index: 'scripts/index.js'
}
}
htmlgen: {
sample: {
dest: 'tmp/sample.html',
options: {
title: 'Title',
css: [
'<%= meta.sample.css_reset %>',
'styles/style1.css',
'styles/style2.css'
],
js: [
'scripts/script1.js',
'scripts/script2.js',
'<%= meta.sample.js_index %>'
],
}
}
}
});
grunt.loadNpmTasks('grunt-htmlgen');
grunt.registerTask('default', ['htmlgen']);
};
tmp/sample.html
after run grunt
or grunt:sample
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Title</title>
<link rel="stylesheet" type="text/css" href="styles/reset.css">
<link rel="stylesheet" type="text/css" href="styles/style1.css">
<link rel="stylesheet" type="text/css" href="styles/style2.css">
</head>
<body>
<script src="scripts/script1.js"></script>
<script src="scripts/script2.js"></script>
<script src="scripts/index.js"></script>
</body>
</html>
FAQs
Grunt task to generate HTML files with stylesheet and script elements.
The npm package grunt-htmlgen receives a total of 10 weekly downloads. As such, grunt-htmlgen popularity was classified as not popular.
We found that grunt-htmlgen 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
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.