Security News
CISA Brings KEV Data to GitHub
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
grunt-symlink
Advanced tools
Automate the creation of project symlinks. This is especially useful as part of a build process, where you often want to symlink to large media folders rather than include them in the build.
For example say you have a videos folder you'd like to exclude from your requirejs build because including it makes the build take forever. No problem, use symlinks instead. But creating these symlinks manually every time you run your build would be a pain. Let grunt-symlink handle it.
Install this grunt plugin next to your project's Gruntfile with: npm install grunt-symlink
Then add this line to your project's Gruntfile:
grunt.loadNpmTasks('grunt-symlink');
In your Gruntfile add:
symlink: {
images: {
dest: 'path/to/new/symlink',
relativeSrc: '../path/to/original',
options: {type: 'dir'} // 'file' by default
}
}
Important: dest
is relative to your project's root directory, but relativeSrc
is relative to dest
. For example:
symlink: {
images: {
dest: 'frontend-build/videos',
relativeSrc: '../videos',
options: {type: 'dir'}
}
}
So in this case grunt-symlink
will create a new symlink at myproject/frontend-build/videos
that points to myproject/videos
, because relativeSrc
in this case is relative to the frontend-build
directory.
type
can either be dir
, file
(default), or junction
. See Node docs on symlinks.
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Test your code using grunt.
Copyright (c) 2012 Dave Geddes
Licensed under the MIT license.
FAQs
Create symlinks in your project, usually during a build process.
The npm package grunt-symlink receives a total of 232 weekly downloads. As such, grunt-symlink popularity was classified as not popular.
We found that grunt-symlink 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
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.