Announcement

Collapse
No announcement yet.

Development workflow with grunt - how to prevent reinstalling every time

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Development workflow with grunt - how to prevent reinstalling every time

    I cloned the espo repository to work on a new feature, which I would like to submit as a pull request. Everything works, but the development workflow is very inefficient. I must be missing something.

    Every time I change the source files, I run grunt to build the application. Unfortunately, that requires reinstalling the application through the GUI. Are there other commands or is grunt the only available tool? I build extensions for espo using the espocrm-ext template repository, which has a much faster development workflow using node. I'm looking for something similar with the base repo.

    The documentation does not say anything other than use grunt. I see a few subcommands in Gruntfile.js, such as internal, build, release, etc., but I don't know what they do or if any of the options align with my request.

    In other words, what is the workflow for developers with the base repository?
    Last edited by bandtank; 01-26-2024, 08:39 PM.

  • #2
    I've found that running grunt copy --force generally works as expected if you don't need to compile anything. The workflow is now edit, run the aforementioned grunt command, and test the application. I am all ears if there is a better way, but this is a massive improvement.

    Comment


    • #3
      With developer mode enabled and a configured file watcher for JS files, you don't need to run any build after changes. Just open the location in your browser, no need to install.

      Comment


      • #4
        Got it. Thanks. I will do that.

        Comment


        • #5
          Hi,

          Can you provide your end to end solution for how you achieved this? It would be very helpful to have a full example.

          Comment


          • #6
            EspoCRM instance should just open from the project root directory (if the web server has access to it). You just need to enable the developer mode. This is the supposed workflow and how we've been always working. No need to run build between changes, except changes in JS files, that can be done automatically with the file watcher. The full solution is in the documentation.

            Comment


            • #7
              I was unfortunately not able to get that to work, so I have to build. I will try again when I have time and then post the results here.

              Comment

              Working...
              X