Skip to content

Commit

Permalink
change pathType for rootPath option
Browse files Browse the repository at this point in the history
  • Loading branch information
yannikmethot committed Mar 10, 2016
1 parent af25d99 commit 31b72af
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
12 changes: 5 additions & 7 deletions src/lib/file.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,11 @@ export function imports(options) {
statements = '';

while (current > 0) {
let _name = name(options.output, current, options.suffix, EXTENSION);

if(options.pathType === 'relative'){
var splitted = _name.split('/');
_name = splitted[splitted.length - 1];
}
statements += '@import "' + _name + '";' + options.linefeed;
let _name = name(options.output, current, options.suffix, EXTENSION),
_splitted = _name.split('/'),
_rootPath = options.rootPath || '';
_name = _splitted[_splitted.length - 1];
statements += '@import "' + _rootPath + _name + '";' + options.linefeed;

current--;
}
Expand Down
5 changes: 3 additions & 2 deletions src/tasks/bless.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ module.exports = function(grunt) {
imports: true,
failOnLimit: false,
suffix: DEFAULT_SUFFIX,
sourceMaps: false
sourceMaps: false,
rootPath:''
});

//grunt.log.writeflags(options, 'options');
Expand Down Expand Up @@ -130,7 +131,7 @@ module.exports = function(grunt) {
output: outPutfileName,
suffix: suffix,
linefeed: (options.compress ? '' : grunt.util.linefeed),
pathType: options.pathType
rootPath: options.rootPath
});

header += grunt.util.linefeed;
Expand Down

0 comments on commit 31b72af

Please sign in to comment.