mirror of
https://github.com/twentyhq/twenty.git
synced 2024-12-12 11:20:40 +03:00
627a6bda29
# This PR - Moves dev and ci scripts to the `project.json` file in the twenty-front package - Adds a project.json file in the root of the project with the main start command that start both twenty-server and twenty-front applications concurrently - Updates the script command of the root project with the start:prod command (replacing the start command which will be used in dev with the help of nx) - Add a start:prod command in the twenty-front app, replacing the start command (now used for dev purpose) Issue ref #4645 @charlesBochet @FelixMalfait please let me know how can I improve it --------- Co-authored-by: Thaïs Guigon <guigon.thais@gmail.com>
30 lines
690 B
TypeScript
30 lines
690 B
TypeScript
import { defineConfig } from 'tsup';
|
|
import svgr from 'esbuild-plugin-svgr';
|
|
import { Config } from '@svgr/core';
|
|
|
|
const template: Config['template'] = (variables, { tpl }) => {
|
|
return tpl`
|
|
${variables.imports};
|
|
${variables.interfaces};
|
|
const ${variables.componentName} = (${variables.props}) => (
|
|
${variables.jsx}
|
|
);
|
|
${variables.exports};
|
|
export const ReactComponent = ${variables.componentName};
|
|
`;
|
|
};
|
|
|
|
export default defineConfig([
|
|
{
|
|
entry: { index: './tsup.ui.index.tsx' },
|
|
treeshake: true,
|
|
minify: true,
|
|
dts: true,
|
|
clean: true,
|
|
outDir: '../twenty-docs/src/ui/generated',
|
|
esbuildPlugins: [svgr({ template })],
|
|
},
|
|
]);
|
|
|
|
|