New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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 - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

23

Gruntfile.js

@@ -0,1 +1,3 @@

var fs = require('fs');
module.exports = function(grunt) {

@@ -20,2 +22,21 @@ grunt.initConfig({

//test suite setup
grunt.registerTask('setup', function(){
var dir = './test/symlinks';
fs.mkdirSync(dir);
grunt.log.ok('created ' + dir);
});
grunt.registerTask('teardown', function(){
var done = this.async();
var dir = './test/symlinks';
var exec = require('child_process').exec;
var child = exec('rm -rf test/symlinks --force',function(err,out) {
if (err) grunt.fail.warn(err);
grunt.log.ok('deleted ' + dir);
console.log(out); err && console.log(err);
done();
});
});
//run tests

@@ -33,3 +54,3 @@ grunt.registerTask('mocha', function(){

grunt.loadTasks('tasks');
grunt.registerTask('test', ['symlink', 'mocha']);
grunt.registerTask('test', ['setup', 'symlink', 'mocha', 'teardown']);
};

13

package.json
{
"name": "grunt-symlink",
"description": "Create symlinks",
"version": "0.2.0",
"description": "Create symlinks in your project, usually during a build process.",
"version": "0.3.0",
"homepage": "https://github.com/geddesign/grunt-symlink",

@@ -30,5 +30,10 @@ "author": {

"scripts": {
"test": "grunt nodeunit"
"test": "grunt test"
},
"devDependencies": {
"grunt": "~0.4.0",
"mocha": "~1.8.1",
"should": "~1.2.1"
},
"peerDependencies": {
"grunt": "0.4.x"

@@ -39,2 +44,2 @@ },

]
}
}

@@ -14,7 +14,8 @@ /*

var options = this.options();
var src = this.file.relativeSrc;
var dest = this.file.dest;
var src = this.data.relativeSrc;
var dest = this.data.dest;
try{
console.log('dest', dest);
console.log('src', src);
grunt.log.ok('src', src);
grunt.log.ok('dest', dest);
fs.symlinkSync(src, dest, options.type || 'file');

@@ -21,0 +22,0 @@ var rel = dest.substr(0, dest.lastIndexOf('/') + 1);

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