Closes#5097
- Uses "nx affected" to detect what projects need to be checked in the
current PR (for now, `ci-front` and `ci-server` workflows only).
- Caches results of certain tasks (`lint`, `typecheck`, `test`,
`storybook:build`) when a PR pipeline runs. The next runs of the same
PR's pipeline will then be able to reuse the PR's task cache to execute
tasks faster.
- Caches Yarn's cache folder to install dependencies faster in CI jobs.
- Rewrites the node modules cache/install steps as a custom, reusable
Github action.
- Distributes `ci-front` jobs with a "matrix" strategy.
- Sets common tasks config at the root `nx.json`. For instance, to
activate the `typecheck` task in a project, add `typecheck: {}` to its
`project.json` and it'll use the default config set in `nx.json` for the
`typecheck` task. Options can be overridden in each individual
`project.json` if needed.
- Adds "scope" tags to some projects: `scope:frontend`, `scope:backend`,
`scope:shared`. An eslint rule ensures that `scope:frontend` only
depends on `scope:frontent` or `scope:shared` projects, same for
`scope:backend`. These tags are used by `nx affected` to filter projects
by scope and generates different task cache keys according to the
requested scope.
- Enables checks for twenty-emails in the `ci-server` workflow.
# 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>
Split from https://github.com/twentyhq/twenty/pull/4518
Related to #4766
Mutualizes eslint config between projects.
I didn't include `twenty-server` in this PR as this was causing too many
lint errors.
* feat: create a separate package for twenty-ui, extract the pill component with hard-coded theme values into it, and use the component inside twenty-front to complete the setup
* feat: extract the light and the dark theme into twenty-ui and update the AppThemeProvider component inside twenty-front to consume themes from twenty-ui
* fix: create a decorator inside preview.tsx to provide a default theme to storybook development server
* fix: remove redundant type declarations and revert back the naming convention for theme declarations
* fix: introduce a default value for pill label within the story for development server
* fix: introduce the nx script into package.json for twenty-ui and resolve imports for theme type within the package
* fix: remove the pill component from the twenty-front package along with the story for it
* fix: revert the package versions to those before running the nx cli command for storybook init
* feat: update readme to include details for building the ui library and starting the storybook development server
* fix: include details about twenty-ui inside jest.config for twenty-front to complete front-jest job
* - Added preview head for font
- Added theme addon for light/dark switch
- Added ComponentDecorator
---------
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
* feat: wip upload module
* feat: local storage and serve local images
* feat: protect against injections
* feat: server local and s3 files
* fix: use storage location when serving local files
* feat: cross field env validation
* Add a custom rule to prevent colors from being hardcoded in ESLint
* Refactor colors
* Create packages folder and fix colors
* Remove external dependency for css alphabetical order linting
* Fix install with yarn
---------
Co-authored-by: Charles Bochet <charles@twenty.com>
* Ignore node_modules
* Use bash-compatible dotenv format
While still being compatible with dotenv, this
also allows sourcing the file to export all
variables in bash.
* Add prettier extension to recommendations
* Move to port 5001 to avoid conflict with macOS services
* Add workspace
* Add devcontainer
This automatically starts with all environment
variables available locally.
It brings up services which are dependent on each
other individually and verifies health before
moving on to the next service.
* Split init into clean, up, and logs tasks.
This allows the developer to set up .env and .npmrc
files before running services, and does not require
starting from a clean db every time the devcontainer
is restarted.
* Copy .env when creating codespace
* Automatically run UP command upon devcontainer creation
* Fix log message
---------
Co-authored-by: Felix Malfait <felix.malfait@gmail.com>