Skip to content

Commit

Permalink
Merge pull request #76 from kss-node/fix-path-resolve
Browse files Browse the repository at this point in the history
Allow usage of "." in kss-node script's parameters. Fixes #75
  • Loading branch information
JohnAlbin committed Jul 18, 2014
2 parents 36793d3 + b63d1d8 commit 9fb2657
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bin/kss-node
Expand Up @@ -87,12 +87,12 @@ if (argv.init) {
return;
}

config.sourceDirectory = path.relative(process.cwd(), argv['_'][0]);
config.sourceDirectory = path.resolve(argv['_'][0]);
if (argv['_'].length > 1) {
config.destinationDirectory = path.relative(process.cwd(), argv['_'][1]);
config.destinationDirectory = path.resolve(argv['_'][1]);
}
if (argv.template) {
config.templateDirectory = path.relative(process.cwd(), argv.template);
config.templateDirectory = path.resolve(argv.template);
}

console.log('');
Expand Down Expand Up @@ -122,7 +122,7 @@ wrench.copyDirSyncRecursive(
// been defined and handlebars helpers set up.
process.nextTick(function() {
console.log('...compiling KSS styles');
less.render('@import "' + path.relative(process.cwd(), config.destinationDirectory) + '/public/kss.less";', function(err, css) {
less.render('@import "' + path.resolve(config.destinationDirectory) + '/public/kss.less";', function(err, css) {
if (err) {
console.error(err);
throw err;
Expand Down

0 comments on commit 9fb2657

Please sign in to comment.