Unminify assets or how to recreate the espo.min.js file?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • madalin
    Junior Member
    • Mar 2014
    • 4

    Unminify assets or how to recreate the espo.min.js file?

    I install EspoCRM on a VM with nginx + PHP5.5 and MySql using the installer and it worked but I can not login so I want to debug it.
    How can I regenerate the espo.min.js file or how can I use the unminified version on my development machine?
  • yuri
    Member
    • Mar 2014
    • 8455

    #2
    Hi

    You can use http://jsbeautifier.org/ to make js more readable.

    Check what response you get from server when you click login. (F12 in browser, Network tab). Maybe there's problem with connection to DB.
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    • madalin
      Junior Member
      • Mar 2014
      • 4

      #3
      Originally posted by yurikuzn
      Hi

      You can use http://jsbeautifier.org/ to make js more readable.

      Check what response you get from server when you click login. (F12 in browser, Network tab). Maybe there's problem with connection to DB.

      Is working using apache and same DB connection. Anyway, I managed to redo the JS using GruntJS but one of the problems I had was with UnderscoreJS + Grunt-uglify because of tabs in some template and views files. I've opened an issue on github https://github.com/jashkenas/underscore/issues/1537 and it got fixed, so you should upgrade Underscorejs. Is there a git repo where people can contribute to this project if we want adding this kind of fixes?

      Comment

      • yuri
        Member
        • Mar 2014
        • 8455

        #4
        Thank you for help. Github repo will be created soon.
        If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

        Comment

        • sergiy
          Junior Member
          • May 2014
          • 4

          #5
          Hi! But could you please provide also tools, utilities and configuration files you use to recreate single javascript files from all source javascript files in correct order including also libraries used in the project (I figured out underscore, jquery, jqueryui, backbone but probably something else I missed) so I could apply my changes to your source javascript files to espo.min.js

          Comment

          • yuri
            Member
            • Mar 2014
            • 8455

            #6
            All js source code (except libs) is available in build (client/src). We use grunt uglify.

            Code:
                    uglify: {
                        options: {
                            mangle: false,
                            banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n',
                        },
                        'build/tmp/client/espo.min.js': [
                                'frontend/client/lib/jquery-2.0.2.min.js',
                                'frontend/client/lib/underscore-min.js',
                                'frontend/client/lib/backbone-min.js',
                                'frontend/client/lib/handlebars.js',
                                'frontend/client/lib/base64.js',
                                'frontend/client/lib/jquery-ui.min.js',
                                'frontend/client/lib/moment.min.js',
                                'frontend/client/lib/moment-timezone.min.js',
                                'frontend/client/lib/moment-timezone-data.js',
                                'frontend/client/lib/jquery.timepicker.min.js',
                                'frontend/client/lib/jquery.autocomplete.js',
                                'frontend/client/lib/bootstrap.min.js',
                                'frontend/client/lib/bootstrap-datepicker.js',
                                'frontend/client/lib/bull.min.js',                    
                                'frontend/client/src/namespace.js',
                                'frontend/client/src/exceptions.js',
                                'frontend/client/src/app.js',
                                'frontend/client/src/utils.js',
                                'frontend/client/src/storage.js',
                                'frontend/client/src/loader.js',
                                'frontend/client/src/pre-loader.js',
                                'frontend/client/src/ui.js',
                                'frontend/client/src/acl.js',
                                'frontend/client/src/model.js',
                                'frontend/client/src/model-offline.js',
                                'frontend/client/src/metadata.js',
                                'frontend/client/src/language.js',
                                'frontend/client/src/cache.js',
                                'frontend/client/src/controller.js',
                                'frontend/client/src/router.js',
                                'frontend/client/src/date-time.js',
                                'frontend/client/src/field-manager.js',
                                'frontend/client/src/search-manager.js',
                                'frontend/client/src/collection.js',
                                'frontend/client/src/multi-collection.js',
                                'frontend/client/src/view-helper.js',
                                'frontend/client/src/layout-manager.js',
                                'frontend/client/src/model-factory.js',
                                'frontend/client/src/collection-factory.js',
                                'frontend/client/src/models/settings.js',
                                'frontend/client/src/models/user.js',
                                'frontend/client/src/models/preferences.js',
                                'frontend/client/src/controllers/base.js',
                                'frontend/client/src/controllers/record.js',
                                'frontend/client/src/controllers/role.js',
                                'frontend/client/src/controllers/admin.js',
                                'frontend/client/src/view.js',
                                'frontend/client/src/views/base.js',
                                'frontend/client/src/views/login.js',
                        ]
                    },
            If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

            Comment

            • alasdaircr
              Active Community Member
              • Aug 2014
              • 525

              #7
              Does anyone have an up to date Gruntfile.js for rebuilding espo.min.js? I have some patches to client I'd like to develop.

              Comment

              • yuri
                Member
                • Mar 2014
                • 8455

                #8
                There are all source files in espocrm build. You can remove existing min file and create your own.

                client/src/*
                If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

                Comment

                • alasdaircr
                  Active Community Member
                  • Aug 2014
                  • 525

                  #9
                  OK brilliant thanks

                  Comment

                  Working...