Skip to content

Commit

Permalink
添加enableES7功能
Browse files Browse the repository at this point in the history
fis.enableES7可以使服务端的*.js后缀文件也参与TypeScript编译
  • Loading branch information
hefangshi authored Sep 19, 2016
1 parent d4696b4 commit 93b1d76
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions yog2-fis3.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
});
Expand Down Expand Up @@ -225,4 +234,4 @@ fis.match('::package', {
map.setContent(JSON.stringify(ret.map, null, 4));
ret.pkg[map.subpath] = map;
}
});
});

0 comments on commit 93b1d76

Please sign in to comment.