
Security News
152 Chrome Live Wallpaper Extensions Hid Ad Tracking and Faked Google Search Traffic
A network of 152 Chrome live wallpaper extensions hid ad tracking and made extension-driven traffic look like Google search clicks.
grunt-pathfinder
Advanced tools

Find files and process their paths in a template.
If you haven't used grunt before, be sure to check out the Getting Started guide.
From the same directory as your project's Gruntfile and package.json, install this plugin with the following command:
npm install grunt-pathfinder --save-dev
Once that's done, add this line to your project's Gruntfile:
grunt.loadNpmTasks('grunt-pathfinder');
If the plugin has been installed correctly, running grunt --help at the command line should list the newly-installed plugin's task or tasks. In addition, the plugin should be listed in package.json as a devDependency, which ensures that it will be installed whenever the npm install command is run.
Inside your Gruntfile, add a section named pathfinder. This section specifies the groups of file (paths), the template to which the found filepaths are passed to and the output file (compiled template).
grunt.initConfig({
pathfinder: {
indexhtml: {
paths: {
css: ['dir/**/*.css', 'also/this/other.css'],
js: ['scripts/**/*.js']
},
template: 'template/index.html',
output: 'dist/index.html'
}
}
});
There are a number of options available. Please review the minimatch options here. As well as some additional options as follows:
Type: object
key:value pairs that describes group:pattern.
The name of the group is also the variable name that is available in the template. Hence, you can have multiple groups and multiple variables available in your template. The pattern is a minimatch pattern. The found files are stores as filepaths in the array variable (group).
Type: String
The template file will be parsed using grunt.template and the found file paths will be passed as data. The paths array is available in your template file.
Type: String
To which file the compiled template will be saved to.
grunt-pathfinder emits and events using grunt.event.emit called pathfinder-paths. If you listen on this event, you can manipulate the paths array (e.g. filter it) and save it before it gets passed to the template. A use case of this is the [importless][] example config in the Gruntfile.
FAQs
Find files and process their paths in a template.
The npm package grunt-pathfinder receives a total of 13 weekly downloads. As such, grunt-pathfinder popularity was classified as not popular.
We found that grunt-pathfinder 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
A network of 152 Chrome live wallpaper extensions hid ad tracking and made extension-driven traffic look like Google search clicks.

Company News
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.

Company News
Replit is integrating Socket Firewall into its AI-powered development experience to help protect builders from malicious open source packages.