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

grunt-contrib-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-contrib-symlink - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

10

package.json
{
"name": "grunt-contrib-symlink",
"description": "Create symbolic links.",
"version": "0.2.0",
"version": "0.3.0",
"homepage": "https://github.com/gruntjs/grunt-contrib-symlink",

@@ -23,3 +23,2 @@ "author": {

],
"main": "Gruntfile.js",
"engines": {

@@ -36,3 +35,4 @@ "node": ">= 0.8.0"

"grunt-contrib-internal": "~0.4.5",
"grunt": "~0.4.1"
"grunt": "~0.4.1",
"grunt-contrib-copy": "~0.4.1"
},

@@ -49,3 +49,7 @@ "peerDependencies": {

"symbolic"
],
"files": [
"tasks",
"LICENSE-MIT"
]
}

@@ -1,2 +0,2 @@

# grunt-contrib-symlink
# grunt-contrib-symlink v0.3.0

@@ -37,2 +37,6 @@ > Create symbolic links.

symlink: {
// Enable overwrite to delete symlinks before recreating them
options: {
overwrite: false
},
// The "build/target.txt" symlink will be created and linked to

@@ -54,2 +58,3 @@ // "source/target.txt". It should appear like this in a file listing:

expand: true,
overwrite: false,
cwd: 'source',

@@ -63,2 +68,3 @@ src: ['foo-*'],

expand: true,
overwrite: false,
cwd: 'source',

@@ -74,5 +80,19 @@ src: ['*'],

#### CLI overwrite option
To override the overwrite option via the CLI pass it as an option
```shell
grunt symlink --overwrite
```
#### Usage tips on Microsoft Windows
Make sure your command prompt has administrative privileges, otherwise
the task will not work.
## Release History
* 2014-02-01   v0.3.0   Fixed symlinking to '.' Add Windows usage hints. Added error logging and force failure when unable to create a symlink
* 2013-07-26   v0.2.0   Initial release as rewritten, officially-maintained, contrib plugin.

@@ -86,2 +106,2 @@ * 2012-12-21   v0.1.1   Unofficial release.

*This file was generated on Mon Jul 29 2013 12:12:23.*
*This file was generated on Sat Feb 01 2014 23:58:37.*

@@ -19,2 +19,11 @@ /*

var linkCount = 0;
// default options
var options = this.options({
overwrite: false
});
// overwrite options from CLI
options.overwrite = grunt.option('overwrite') || options.overwrite;
this.files.forEach(function(f) {

@@ -27,4 +36,7 @@ var srcpath = f.src[0];

} else if (grunt.file.exists(destpath)) {
grunt.log.warn('Destination ' + destpath + ' already exists.');
return;
if (!options.overwrite) {
grunt.log.warn('Destination ' + destpath + ' already exists.');
return;
}
grunt.file.delete(destpath);
}

@@ -37,3 +49,3 @@ // Strip any trailing slashes.

if (!grunt.file.isPathAbsolute(srcpath)) {
srcpath = path.relative(destdir, srcpath);
srcpath = path.relative(destdir, srcpath) || '.';
}

@@ -52,2 +64,4 @@ // Create any necessary interim directories.

grunt.verbose.error();
grunt.log.error(e);
grunt.fail.warn('Failed to create symlink: ' + '(' + mode + ') ' + destpath + ' -> ' + srcpath + '.');
}

@@ -54,0 +68,0 @@ linkCount++;

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