1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/nickppa-NG

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
config.js 1.3 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
qijingzhang Отправлено 14.09.2024 12:42 15a91fd
const util = require('./src/utils/util');
const root = '';
const templateDir = 'templates';
const global = {
appName: 'HelloWord'
};
module.exports = {
root,
outputDir: "output",
deleteOutput: true,
modelsDir: "models",
templateDir,
helper: {
test: (text) => {
return 'test' + text;
}
},
customModelProp: function (model) {
model._modelName = model._dirPaths.slice(-1)[0] || '';
},
customFieldProp: function (field) {
},
global,
mapping: async function (model) {
if (model.type === 'edit') {
return [{
scope: `root.${model._modelName}`,
seq: 0,
model,
template: 'frontend/react-antd/create/index',
output: 'frontend/src/pages/' + util.toSnakeCase([...model._dirPaths], '/', true) + "/" + util.toSnakeCase(model.name, '-') + '.js'
}];
}
if (model.type === 'model') {
return [{
scope: `root.${model._modelName}`,
seq: 1,
model,
template: 'frontend/react-antd/service/index',
output: 'frontend/src/service/' + util.toSnakeCase(model._modelName, '-') + '.js'
}];
}
return [];
}
};

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/nickppa-NG.git
git@api.gitlife.ru:oschina-mirror/nickppa-NG.git
oschina-mirror
nickppa-NG
nickppa-NG
master