From 7362a3b23a0cdb2ae2c0fd6e39196af7943b8d67 Mon Sep 17 00:00:00 2001 From: 2betop Date: Tue, 31 Mar 2015 17:14:58 +0800 Subject: [PATCH] draft --- .editorconfig | 13 +++++++++++++ lib/compile.js | 8 +++----- lib/fis.js | 2 +- 3 files changed, 17 insertions(+), 6 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..58a3a2fa9 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,13 @@ +# EditorConfig is awesome: http://EditorConfig.org + +# top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +charset = utf-8 +end_of_line = lf +indent_style = space +indent_size = 2 +trim_trailing_whitespace = true +insert_final_newline = true diff --git a/lib/compile.js b/lib/compile.js index b864d96ef..b199b4fc2 100644 --- a/lib/compile.js +++ b/lib/compile.js @@ -486,7 +486,6 @@ function standard(file) { if (info.file && info.file.isFile()) { file.addLink(info.file.subpath); - exports(info.file); } break; case 'id': @@ -495,7 +494,6 @@ function standard(file) { if (info.file && info.file.isFile()) { file.addLink(info.file.subpath); - exports(info.file); } break; case 'async': @@ -506,7 +504,6 @@ function standard(file) { if (info.file && info.file.isFile()) { file.addLink(info.file.subpath); - exports(info.file); } break; case 'uri': @@ -514,10 +511,10 @@ function standard(file) { if (info.file && info.file.isFile()) { file.addLink(info.file.subpath); - exports(info.file); if (info.file.useHash && exports.settings.hash) { if (embeddedCheck(file, info.file)) { + exports(info.file); addDeps(file, info.file); } } @@ -548,8 +545,9 @@ function standard(file) { } if (f && f.isFile()) { file.addLink(f.subpath); - exports(f); + if (embeddedCheck(file, f)) { + exports(f); addDeps(file, f); f.requires.forEach(function(id) { file.addRequire(id); diff --git a/lib/fis.js b/lib/fis.js index 7e3a74dcd..2ab7e3fac 100644 --- a/lib/fis.js +++ b/lib/fis.js @@ -156,4 +156,4 @@ fis.require = function() { fis.require._cache = {}; -fis.require.prefixes = ['fis']; +fis.require.prefixes = ['fis3', 'fis'];