From 6c4b025ebf3e88b8c571e9775e53ecae74f0e3c7 Mon Sep 17 00:00:00 2001 From: Riceball LEE Date: Tue, 14 Feb 2017 15:20:20 +0800 Subject: [PATCH] * [bug] can not load script after reading model config Warning: it can not load script for registered "require" file extension. --- lib/utils.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/utils.js b/lib/utils.js index 5d1ce74..ecd3d33 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -114,9 +114,10 @@ function fixFileExtension(filepath, files, onlyScriptsExportingFunction) { var otherFile; /* Prefer coffee scripts over json */ + //TODO: Warning : can not laod script for the registered file extenstions. if (isPreferredExtension(filepath)) return filepath; - var basename = path.basename(filepath, FILE_EXTENSION_JSON); + var basename = path.basename(filepath, path.extname(filepath)); var sourceDir = path.dirname(filepath); files.forEach(function(f) {