Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-67712

grunt does not work plugin types that are inside another component

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • 3.9
    • 3.9
    • JavaScript
    • MOODLE_39_STABLE
    • MOODLE_39_STABLE
    • MDL-67712-master
    • Hide

      grunt amd in root directory

      Show
      grunt amd in root directory
    • Hide

      Setup

      1. Check the git status to make sure that you're clean

        git status
        

      2. Note the status for later

      Run all

      1. Delete all amd/build directories:

        # Delete all build directories
        find . -type d -path '*/amd/build' | sort -r | xargs  rm -rf
        

      2. Run grunt amd

        grunt amd
        

        1. Confirm that there were no changes (Compare against the one you noted earlier)

          git status
          

      Run all amd directories in forward order

      1. Delete all amd/build directories:

        find . -type d -path '*/amd/build' | sort -r | xargs  rm -rf
        

      2. Build all directories:

        for amdDir in `find . -type d -path '*/amd'`; do cd $amdDir; grunt amd; cd -; done
        

        1. Confirm that there were no changes (Compare against the one you noted earlier)

          git status
          

      Run all amd directories in reverse order

      1. Delete all amd/build directories:

        find . -type d -path '*/amd/build' | sort -r | xargs  rm -rf
        

      2. Build all directories in reverse:

        for amdDir in `find . -type d -path '*/amd' | sort -r`; do cd $amdDir; grunt amd; cd -; done
        

        1. Confirm that there were no changes (Compare against the one you noted earlier)

          git status
          

      Build a plugin in a subsystem

      1. Remove all amd/build directories in grade:

        find grade -type d -path '*/amd/build' | sort -r | xargs  rm -rf
        

      2. Build just the gradingform_guide plugin

        cd grade/grading/form/guide
        grunt amd
        

        1. Confirm that only the gradingform/guide plugin was built:

          git status
          

          Expected output:

          Changes not staged for commit:
            (use "git add/rm <file>..." to update what will be committed)
            (use "git checkout -- <file>..." to discard changes in working directory)
           
          	deleted:    ../../../amd/build/edittree_index.min.js
          	deleted:    ../../../amd/build/edittree_index.min.js.map
          	deleted:    ../../../amd/build/grades/grader/gradingpanel/comparison.min.js
          	deleted:    ../../../amd/build/grades/grader/gradingpanel/comparison.min.js.map
          	deleted:    ../../../amd/build/grades/grader/gradingpanel/normalise.min.js
          	deleted:    ../../../amd/build/grades/grader/gradingpanel/normalise.min.js.map
          	deleted:    ../../../amd/build/grades/grader/gradingpanel/point.min.js
          	deleted:    ../../../amd/build/grades/grader/gradingpanel/point.min.js.map
          	deleted:    ../../../amd/build/grades/grader/gradingpanel/repository.min.js
          	deleted:    ../../../amd/build/grades/grader/gradingpanel/repository.min.js.map
          	deleted:    ../../../amd/build/grades/grader/gradingpanel/scale.min.js
          	deleted:    ../../../amd/build/grades/grader/gradingpanel/scale.min.js.map
          	deleted:    ../rubric/amd/build/grades/grader/gradingpanel.min.js
          	deleted:    ../rubric/amd/build/grades/grader/gradingpanel.min.js.map
           
          no changes added to commit (use "git add" and/or "git commit -a")
          

      3. Build just the subsystem:

        cd grade
        grunt amd
        

        1. Confirm that only files in grades/amd/build were built:

          git status
          

          Expected output:

          Changes not staged for commit:
            (use "git add/rm <file>..." to update what will be committed)
            (use "git checkout -- <file>..." to discard changes in working directory)
           
          	deleted:    grading/form/rubric/amd/build/grades/grader/gradingpanel.min.js
          	deleted:    grading/form/rubric/amd/build/grades/grader/gradingpanel.min.js.map
           
          no changes added to commit (use "git add" and/or "git commit -a")
          

      Show
      Setup Check the git status to make sure that you're clean git status Note the status for later Run all Delete all amd/build directories: # Delete all build directories find . -type d -path '*/amd/build' | sort -r | xargs rm -rf Run grunt amd grunt amd Confirm that there were no changes (Compare against the one you noted earlier) git status Run all amd directories in forward order Delete all amd/build directories: find . -type d -path '*/amd/build' | sort -r | xargs rm -rf Build all directories: for amdDir in `find . -type d -path '*/amd'`; do cd $amdDir; grunt amd; cd -; done Confirm that there were no changes (Compare against the one you noted earlier) git status Run all amd directories in reverse order Delete all amd/build directories: find . -type d -path '*/amd/build' | sort -r | xargs rm -rf Build all directories in reverse: for amdDir in `find . -type d -path '*/amd' | sort -r`; do cd $amdDir; grunt amd; cd -; done Confirm that there were no changes (Compare against the one you noted earlier) git status Build a plugin in a subsystem Remove all amd/build directories in grade: find grade -type d -path '*/amd/build' | sort -r | xargs rm -rf Build just the gradingform_guide plugin cd grade/grading/form/guide grunt amd Confirm that only the gradingform/guide plugin was built : git status Expected output: Changes not staged for commit: (use "git add/rm <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory)   deleted: ../../../amd/build/edittree_index.min.js deleted: ../../../amd/build/edittree_index.min.js.map deleted: ../../../amd/build/grades/grader/gradingpanel/comparison.min.js deleted: ../../../amd/build/grades/grader/gradingpanel/comparison.min.js.map deleted: ../../../amd/build/grades/grader/gradingpanel/normalise.min.js deleted: ../../../amd/build/grades/grader/gradingpanel/normalise.min.js.map deleted: ../../../amd/build/grades/grader/gradingpanel/point.min.js deleted: ../../../amd/build/grades/grader/gradingpanel/point.min.js.map deleted: ../../../amd/build/grades/grader/gradingpanel/repository.min.js deleted: ../../../amd/build/grades/grader/gradingpanel/repository.min.js.map deleted: ../../../amd/build/grades/grader/gradingpanel/scale.min.js deleted: ../../../amd/build/grades/grader/gradingpanel/scale.min.js.map deleted: ../rubric/amd/build/grades/grader/gradingpanel.min.js deleted: ../rubric/amd/build/grades/grader/gradingpanel.min.js.map   no changes added to commit (use "git add" and/or "git commit -a") Build just the subsystem: cd grade grunt amd Confirm that only files in grades/amd/build were built : git status Expected output: Changes not staged for commit: (use "git add/rm <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory)   deleted: grading/form/rubric/amd/build/grades/grader/gradingpanel.min.js deleted: grading/form/rubric/amd/build/grades/grader/gradingpanel.min.js.map   no changes added to commit (use "git add" and/or "git commit -a")

      grunt does not build for components which in a sub-directory of another component.
      for example:
      gradingform_* components because their directory is grade/grading/form and the grade component is in the grade directory.

      Steps to reproduce:

      cd grade/grading/form/guide
      rm amd/build -rf
      grunt amd

            dobedobedoh Andrew Lyons
            rezaie9 Shamim Rezaie
            Tim Hunt Tim Hunt
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 55 minutes
                55m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.