index.tsx 添加版本信息

This commit is contained in:
liaoxuezhi 2019-08-21 20:03:24 +08:00
parent e849e2594e
commit ec18350a21
2 changed files with 13 additions and 4 deletions

View File

@ -2,6 +2,7 @@
* @file fis-conf.js 配置
*/
const path = require('path');
const package = require('./package.json');
const parserMarkdown = require('./build/md-parser');
fis.get('project.ignore').push(
'public/**',
@ -62,6 +63,12 @@ fis.match('/docs/**.md', {
isMod: true
});
fis.on('compile:parser', function (file) {
if (file.subpath === '/src/index.tsx') {
file.setContent(file.getContent().replace('@version', package.version));
}
});
fis.match('{*.ts,*.jsx,*.tsx,/src/**.js,/src/**.ts}', {
parser: [fis.plugin('typescript', {
importHelpers: true,

View File

@ -1,8 +1,10 @@
/**
* @file
* @author fex
/** @license amis v@version
*
* Copyright Baidu
*
* This source code is licensed under the Apache license found in the
* LICENSE file in the root directory of this source tree.
*/
import {render, Renderer, getRendererByName, resolveRenderer, filterSchema} from './factory';
import {wrapFetcher, buildApi} from './utils/api';
import {filter, reigsterTplEnginer} from './utils/tpl'