Skip to content

Commit

Permalink
v0.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
doug-martin committed Jul 18, 2014
1 parent 4dcc0e8 commit 980481e
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ before_script:
- npm install -g grunt-cli
language: node_js
node_js:
- 0.8
- 0.1
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,14 @@ In lieu of a formal styleguide, take care to maintain the existing coding style.

## Release History

2014-07-16 v0.2.2
- Changed to use `npm link` when initially linking modules


2014-07-16 v0.2.1
- Updated `package.json` for correct repo


2014-07-16 v0.2.0
- Using symlinks instead of `npm link` to improve performance.
- Improved logging.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "grunt-link",
"description": "Grunt task to handle the linking of local dependencies",
"version": "0.2.1",
"version": "0.2.2",
"homepage": "https://github.com/doug-martin/grunt-link.git",
"author": {
"name": "Doug Martin",
Expand Down
13 changes: 7 additions & 6 deletions tasks/lib/linker.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module.exports = function (grunt, npm, options) {
return comb.async.array(cmds).forEach(function (cmd) {
if (cmd) {
log.debug(util.format("Executing %s %s", cmd.cmd, cmd.args.join(" ")));
var child = execP(cmd.cmd, cmd.args, { stdio: "inherit" }),
var child = execP(cmd.cmd, cmd.args, { stdio: "inherit" }),
ret = new comb.Promise();

child.on("close", function (code) {
Expand All @@ -42,7 +42,7 @@ module.exports = function (grunt, npm, options) {
}, 1);
}

function createModulesDir (dir, deps) {
function createModulesDir(dir, deps) {
var statP = new comb.Promise();
if (deps.length < 1) {
log.debug("No linked dependencies needed");
Expand All @@ -60,7 +60,7 @@ module.exports = function (grunt, npm, options) {
}

function chdir(location) {
var newLoc = path.resolve(cwd, normalizeName(location))
var newLoc = path.resolve(cwd, normalizeName(location));
log.debug("Changing directory to " + newLoc);
process.chdir(newLoc);
}
Expand All @@ -82,7 +82,7 @@ module.exports = function (grunt, npm, options) {
}
}
if (options.clean && install) {
log.debug(util.format("Executing rimraf %s", loc+"/node_modules"));
log.debug(util.format("Executing rimraf %s", loc + "/node_modules"));
cleanPromise = rimraf(path.resolve(loc, "./node_modules"));
} else {
cleanPromise = comb.async.array(removeDirs).forEach(function (dir) {
Expand Down Expand Up @@ -123,8 +123,9 @@ module.exports = function (grunt, npm, options) {
if (i === 0) {
log.subhead("Linking modules");
}
chdir(pkg[0]);
if (isBoolean(pkg[2]) ? pkg[2] : true) {
return exec({ cmd: "ln", args: ["-s", getPackageName(pkg[0]), npm.globalDir]});
return exec({ cmd: "npm", args: ["link"]});
}
}, 1)
.forEach(function (pkg, i) {
Expand Down Expand Up @@ -163,5 +164,5 @@ module.exports = function (grunt, npm, options) {
}
return exec(cmds);
});
},1);
}, 1);
};

0 comments on commit 980481e

Please sign in to comment.