Skip to content

Commit

Permalink
fixed relative path bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
code-fury committed Feb 25, 2015
1 parent 87b9ffe commit 88ecebf
Show file tree
Hide file tree
Showing 125 changed files with 8 additions and 23,623 deletions.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ var wait = require("wait.for")
var File = require("vinyl")
var fs = require("fs")
var _ = require("lodash")
var path = require("path")
function lessWrapper(input, options, cb) {
less.render(input, options, function (error, output) {
cb(error, output)
Expand All @@ -29,14 +30,14 @@ var moreLess = function (opts) {
var content = file.contents.toString("utf8")
var that = this
function lessFiber(lessOpts, input) {
process.chdir(path.dirname(file.path))
var lessOutput = wait.for(lessWrapper, input, lessOpts)
var output = lessOutput.css
if (opts.more == true) {
output = more.compress(output)
}
if(lessOutput.map != undefined) {
if(lessOpts.sourceMapPath != undefined) {
console.log(lessOpts.sourceMapPath)
var mapFileName = _.trimRight(lessOpts.sourceMapPath, "/") + "/" + file.relative.split(".")[0] + ".map"
fs.writeFileSync(mapFileName, lessOutput.map)
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gulp-more-less",
"version": "0.0.3",
"version": "0.0.4",
"description": "More-Css and Less plugin for gulp",
"main": "index.js",
"scripts": {
Expand Down
Loading

0 comments on commit 88ecebf

Please sign in to comment.