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

Implement as many grunt commands with chel as possible #40

Open
taoeffect opened this issue Jul 16, 2024 · 0 comments
Open

Implement as many grunt commands with chel as possible #40

taoeffect opened this issue Jul 16, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@taoeffect
Copy link
Member

taoeffect commented Jul 16, 2024

Problem

Group Income current uses grunt. Grunt is a bit outdated. New Chelonia-based projects should use the chel command for doing almost everything.

Grunt, though sporting many nice features, is not tailor suited for what we're doing and has some rather annoying behaviors, especially as it relates to errors.

For example, you cannot do this:

    try {
      grunt.task.run(['build', `_pin:${version}`])
    } catch (e) {
      grunt.log.error(e)
      packageJSON.contractsVersion = savedContractsVersion
      try {
        writePackageJSON(savedContractsVersion)
      } catch (e2) {
        grunt.log.error(chalk.red("couldn't restore package.json contractsVersion! please update it manually!"), e2)
      }
      process.exit(1)
    }

Exceptions thrown by tasks run by grunt.task.run cannot be caught like this. It will result in an error like this:

[gruntfile] Unhandled promise rejection: Promise 
  <rejected> Error: doesn't exist: contracts/
      at Object.<anonymous> (Gruntfile.js:538:13)

Solution

The https://github.com/okTurtles/chel/ project should be updated and issues created (and implemented) to replicate some of the features we're currently implementing using grunt, e.g. like grunt pin, grunt deploy, grunt serve etc.

We probably don't want to implement our own build system, so that we can integrate with other projects out there, e.g. Vite, rolldown, esbuild, etc. But a lot of these other commands should be done by chel.

Ideally we want a workflow that mimics what we have in Group Income but can be implemented without a Gruntfile.js and only using npm scripts / deno tasks.

@taoeffect taoeffect added the enhancement New feature or request label Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant