Cleanup dependencies and build logic #2

Merged
maxime.batista merged 6 commits from clement.freville2/Application:dep/cleanup into dev 2 years ago

Create React App works, but it can be painfully slow. This PR first replaces CRA with ViteJS, a build tool based on Rollup. The Jest testing framework has been replaced with Vitest, which integrate smoothly with ViteJS.

A few notes about the config:

  • Normally, JSX is only in .jsx files. Instead of renaming every file containing React components, I just specified it in the ViteJS config.
  • CRA is a big package, which integrate ESLint. The ESLint 8 dependency has been explicitly written, with a standard config to work with React and React hooks.
  • A sample test has been written to showcase what Vitest is.
  • Unused or invalid dependencies have been removed from the package.json file. This includes the removal of electron (a real desktop app would require a lot of work, see Tauri if you are interested in), react-native (it's either ReactJS or ReactNative but not both)
  • Resources files have been moved to the public directory. Using require to include images really depends on the build tool and not a static file server.
  • The Drone config has been simplified to only have the browser application deployment.

I recommend that you do your own testing to verify that it suits your needs.

Create React App works, but it can be painfully slow. This PR first replaces CRA with ViteJS, a build tool based on Rollup. The Jest testing framework has been replaced with Vitest, which integrate smoothly with ViteJS. A few notes about the config: - Normally, JSX is only in `.jsx` files. Instead of renaming every file containing React components, I just specified it in the ViteJS config. - CRA is a big package, which integrate ESLint. The ESLint 8 dependency has been explicitly written, with a standard config to work with React and React hooks. - A sample test has been written to showcase what Vitest is. - Unused or invalid dependencies have been removed from the `package.json` file. This includes the removal of *electron* (a real desktop app would require a lot of work, see [Tauri](https://tauri.app) if you are interested in), *react-native* (it's either ReactJS or ReactNative but not both) - Resources files have been moved to the `public` directory. Using `require` to include images really depends on the build tool and not a static file server. - The Drone config has been simplified to only have the browser application deployment. I recommend that you do your own testing to verify that it suits your needs.
clement.freville2 added 6 commits 2 years ago
maxime.batista merged commit 89780605e1 into dev 2 years ago
clement.freville2 deleted branch dep/cleanup 2 years ago
This repo is archived. You cannot comment on pull requests.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: IQBall/Application#2
Loading…
There is no content yet.