nocobase/.fatherrc.ts

39 lines
776 B
TypeScript
Raw Normal View History

2020-10-24 07:34:43 +00:00
import { readdirSync } from 'fs';
import { join } from 'path';
// utils must build before core
// runtime must build before renderer-react
const headPkgs = [
2021-12-03 03:42:24 +00:00
'utils',
2020-10-24 07:34:43 +00:00
'database',
'resourcer',
'actions',
'client',
2021-12-03 03:42:24 +00:00
'server',
2020-10-24 07:34:43 +00:00
];
const tailPkgs = [];
const otherPkgs = readdirSync(join(__dirname, 'packages')).filter(
(pkg) => {
return !['father-build', 'app'].includes(pkg) && pkg.charAt(0) !== '.' && !headPkgs.includes(pkg) && !tailPkgs.includes(pkg)
2020-10-24 07:34:43 +00:00
},
);
2020-12-23 23:35:53 +00:00
let pkgs = [];
if (process.argv.length > 2) {
pkgs = process.argv;
pkgs.shift();
pkgs.shift();
} else {
pkgs = [...headPkgs, ...otherPkgs, ...tailPkgs];
}
console.log(pkgs);
2020-10-24 07:34:43 +00:00
export default {
target: 'node',
cjs: { type: 'babel', lazy: true },
// disableTypeCheck: true,
2020-12-23 23:35:53 +00:00
pkgs,
2020-10-24 07:34:43 +00:00
};