Skip to content

Commit

Permalink
updated cleaver to ~0.5.3
Browse files Browse the repository at this point in the history
added some fixes and tweaks to path handling
  • Loading branch information
Bartvds committed Nov 18, 2013
1 parent b3db9ed commit 33850d2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -41,6 +41,7 @@ grunt.initConfig({

## History

* 0.2.0 - Updated cleaver to `~0.5.3`
* 0.1.0 - First release

## Contributing
Expand Down
4 changes: 2 additions & 2 deletions package.json
@@ -1,7 +1,7 @@
{
"name": "grunt-cleaver",
"description": "Build cleaver slideshows from grunt",
"version": "0.1.0",
"version": "0.2.0",
"homepage": "https://github.com/Bartvds/grunt-cleaver",
"author": {
"name": "Bart van der Schoor",
Expand Down Expand Up @@ -35,7 +35,7 @@
"test": "grunt test"
},
"dependencies": {
"cleaver": "~0.4.2"
"cleaver": "~0.5.3"
},
"devDependencies": {
"grunt-contrib-jshint": "~0.1.1",
Expand Down
8 changes: 5 additions & 3 deletions tasks/cleaver.js
Expand Up @@ -17,13 +17,15 @@ module.exports = function (grunt) {
//TODO inject file.dest and options into source (or pass to cleaver once it supporst these)

//trick output directory
var src = path.resolve(file.src);

var cwd = process.cwd();
var restore = function () {
process.chdir(cwd);
};
process.chdir(path.dirname(src));

var cleaver = new Cleaver(path.resolve(file.src));
process.chdir(path.dirname(file.src));
var cleaver = new Cleaver(src);

//running with cleavers
return cleaver.run().then(function () {
Expand Down Expand Up @@ -56,7 +58,7 @@ module.exports = function (grunt) {
if (!dest) {
dest = filePath.replace(/.djs$/, '.js');
}*/
files.push({src: filePath, /*dest: dest,*/ options: options});
files.push({src: filePath, options: options});
});
});

Expand Down
2 changes: 1 addition & 1 deletion test/cases/example.md
Expand Up @@ -27,4 +27,4 @@ This will be in a separate paragraph
* Item B
* Item gamma

No need for multiple templates!
No need for multiple templates!

0 comments on commit 33850d2

Please sign in to comment.