Skip to content

Commit ee7f3f1

Browse files
committed
fixes #441, allowing dot files through
1 parent 0a47272 commit ee7f3f1

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

lib/util/workflow.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -225,9 +225,9 @@ module.exports = WorkflowManager = (function() {
225225
};
226226

227227
WorkflowManager.prototype._buildAssetOptions = function(fileName) {
228-
var ext;
228+
var baseName, ext;
229229
ext = path.extname(fileName).toLowerCase();
230-
ext = ext.length > 1 ? ext.substring(1) : '';
230+
ext = ext.length > 1 ? ext.substring(1) : (baseName = path.basename(fileName), baseName.indexOf(".") === 0 && baseName.length > 1 ? baseName.substring(1) : '');
231231
return {
232232
inputFile: fileName,
233233
extension: ext

src/util/workflow.coffee

+11-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,17 @@ module.exports = class WorkflowManager
154154

155155
_buildAssetOptions: (fileName) ->
156156
ext = path.extname(fileName).toLowerCase()
157-
ext = if ext.length > 1 then ext.substring(1) else ''
157+
ext = if ext.length > 1
158+
ext.substring(1)
159+
else
160+
# is dot file?
161+
baseName = path.basename( fileName )
162+
if baseName.indexOf(".") is 0 and baseName.length > 1
163+
baseName.substring(1)
164+
else
165+
# no extension found
166+
''
167+
158168
{inputFile:fileName, extension:ext}
159169

160170
_executeWorkflowStep: (options, type, done = @_finishedWithFile) ->

0 commit comments

Comments
 (0)