Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
grunt-module-index
Advanced tools
Auto-build module index file (exports) based on folders and files.
Grunt task to auto-build module index files (exports) based on folders and files.
This plugin requires Grunt ~0.4.0
.
Install this grunt plugin with:
npm install grunt-module-index --save-dev
Then add this line to your project's grunt.js
Gruntfile:
grunt.loadNpmTasks('grunt-module-index');
To do.
Type: String
Values: coffee
, js
Default: js
File format and extension.
Type: String
Default: ' '
(2 spaces)
Indentation characters.
Type: String
Optional file header message.
Type: Array|String
Default: []
Omit these directory names for the object hierarchy.
Example: omitDirs: ['src']
Type: String
Optional prefix for every file path.
Example: pathPrefix: './'
and a file in src/
ends as require('./src/...
Type: Boolean
Default: false
Include file extensions on require
calls.
Type: Boolean
Default: false
Object hierarchy omits every directory.
moduleIndex: {
build: {
src: ["src/"],
options: {
omitDirs: ["src"]
}
}
}
moduleIndex:
build:
src: ["modules/**/*.js", "components", "mixins/"]
dest: "index.coffee"
options:
format: "coffee"
indentTab: "\t"
notice: "Generated with grunt"
omitDirs: ["src"]
pathPrefix: "./"
requireWithExtension: true
//! This file was auto-generated by grunt-module-index, DO NOT edit it directly
module.exports = exports = {
components: {
nav: {
nav: require("components/nav/nav"),
navItem: require("components/nav/navItem")
},
form: {
button: require("components/form/button"),
input: require("components/form/input")
}
}
};
//EOF
Copyright (c) 2014-2015 Ignacio Lago
Licensed under the MIT license.
FAQs
Auto-build module index file (exports) based on folders and files.
The npm package grunt-module-index receives a total of 3 weekly downloads. As such, grunt-module-index popularity was classified as not popular.
We found that grunt-module-index 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
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.