From 93b1d7657fdf0989f88ae333bf3caa56bd5842a2 Mon Sep 17 00:00:00 2001 From: Fangshi He Date: Mon, 19 Sep 2016 16:00:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0enableES7=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fis.enableES7可以使服务端的*.js后缀文件也参与TypeScript编译 --- yog2-fis3.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/yog2-fis3.js b/yog2-fis3.js index 21cfd85..fbd51f9 100644 --- a/yog2-fis3.js +++ b/yog2-fis3.js @@ -144,7 +144,16 @@ fis.require._cache['command-util'] = require('./command/util.js'); }); }); -fis.enableNPM = function(options) { +fis.enableES7 = function (options) { + fis.match('/server/**.js', { + parser: fis.plugin('typescript', { + module: 1, + target: 2 + }) + }); +}; + +fis.enableNPM = function (options) { fis.match('/client/node_modules/**.js', { isMod: true }); @@ -225,4 +234,4 @@ fis.match('::package', { map.setContent(JSON.stringify(ret.map, null, 4)); ret.pkg[map.subpath] = map; } -}); \ No newline at end of file +});