Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

grunt-symlink

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-symlink

Create symlinks in your project, usually during a build process.

  • 0.3.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
156
increased by75.28%
Maintainers
1
Weekly downloads
 
Created
Source

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.

Getting Started

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');

Documentation

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.

Contributing

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.

License

Copyright (c) 2012 Dave Geddes
Licensed under the MIT license.

Keywords

FAQs

Package last updated on 19 Feb 2013

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc