Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: Simplify project setup #10

Conversation

martin-azpillaga
Copy link

@martin-azpillaga martin-azpillaga commented Jun 7, 2023

Inspired by issue #3, this PR aims to reduce the friction when setting up the project.

It is a pure refactoring PR meaning no functionality has been changed. The original tests keep passing just as before.

The contributions are in three areas:

  1. Npm packages

    • Simplify the project's build and execution process to a single npm script
    • Compile and bundle the project using npm packages: No need to install typescript or webpack globally
    • Update packages to fix known vulnerabilities, including 7 critical vulnerabilities

    vulnerabilities

  2. Resulting website

    • Separate html, css and js concerns
    • Bundle all js code into one module + one worker
    • Serve the static web using npm's serve package

    bundling

  3. Accessibility

    • Deploy to Github pages to try the editor using just a web browser
    • Document the set up process in the readme

    deployment

To the reviewer:

  • I recommend reviewing commits one by one chronologically.
  • Don't be scared of the amount of lines changed. They come mostly from dependency chain changes in package-lock.json

@martin-azpillaga martin-azpillaga marked this pull request as ready for review June 8, 2023 15:36
@alessiostalla alessiostalla merged commit 52e58ca into Strumenta:master Jul 6, 2023
@martin-azpillaga
Copy link
Author

@alessiostalla
After the merge, the Github action is failing since Github pages is not enabled in this repository.
I suggest enabling it under the repository's Settings > Pages section.
This will create a static server hosting the editor webpage under a url similar to https://strumenta.github.io/calc-monaco-editor.
As a last step, I would redirect the try it online link of the README to this repository's github page URL here:
[online]: https://minim.tools/calc-monaco-editor/

This way the project is self contained, independent of my domain, and the webpage will get updated whenever the main branch receives new commits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants