Security News
UK Officials Consider Banning Ransomware Payments from Public Entities
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
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 125 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
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.