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

Grunt watch is not working correctly in subdirectories

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Deferred
    • 2.9.6, 3.0.4, 3.1
    • None
    • JavaScript, Libraries
    • MOODLE_29_STABLE, MOODLE_30_STABLE, MOODLE_31_STABLE
    • MDL-54839-master
    • Hide
      1. Run grunt from the root directory
      2. Run it from an amd directory
        1. Confirm that only sub-directories were built, and linted
      3. Run grunt watch
      4. Modify a src/*.js file
        1. Confirm that only sub-directories were built, and linted
      5. Run it from an amd/src directory
        1. Confirm that only sub-directories were built, and linted
      6. Run grunt watch
      7. Modify a *.js file
        1. Confirm that only sub-directories were built, and linted
      8. Run it from a yui directory
        1. Confirm that only sub-directories were built, and linted
      9. Run grunt watch
      10. Modify some of the following, and Confirm that only sub-directories were built, and linted for each:
        1. src/modulename/build.json
        2. src/modulename/js/*.js
        3. src/modulename/meta/*.json
        4. src/modulename/js/example/subdirectory/*.js
      11. Run it from a yui/src directory
        1. Confirm that only sub-directories were built, and linted
      12. Create a new directory in one of the modules under modulename/js/example/subdirectory and touch a .js file within it
      13. Run grunt watch
      14. Modify some of the following, and Confirm that only sub-directories were built, and linted for each:
        1. modulename/build.json
        2. modulename/js/*.js
        3. modulename/meta/*.json
        4. modulename/js/example/subdirectory/*.js
      15. Run it from a yui/src/[modulename] directory
        1. Confirm that only sub-directories were built, and linted
      16. Run grunt watch
      17. Modify some of the following, and Confirm that only sub-directories were built, and linted for each:
        1. build.json
        2. js/*.js
        3. meta/*.json
        4. js/example/subdirectory/*.js
      18. Run it from a yui/src/[modulename]/meta directory
        1. Confirm that only that module was built, and linted
      19. Run grunt watch
      20. Modify some of the following, and Confirm that only that module was built, and linted for each:
        1. *.json
        2. ../build.json
        3. ../js/*.js
        4. ../js/example/subdirectory/*.js
        5. Confirm that only sub-directories were built, and linted
        6. Confirm a clean git status
      21. Repeat for all of theabove, passing in the --root option
      Show
      Run grunt from the root directory Run it from an amd directory Confirm that only sub-directories were built, and linted Run grunt watch Modify a src/*.js file Confirm that only sub-directories were built, and linted Run it from an amd/src directory Confirm that only sub-directories were built, and linted Run grunt watch Modify a *.js file Confirm that only sub-directories were built, and linted Run it from a yui directory Confirm that only sub-directories were built, and linted Run grunt watch Modify some of the following, and Confirm that only sub-directories were built, and linted for each: src/modulename/build.json src/modulename/js/*.js src/modulename/meta/*.json src/modulename/js/example/subdirectory/*.js Run it from a yui/src directory Confirm that only sub-directories were built, and linted Create a new directory in one of the modules under modulename/js/example/subdirectory and touch a .js file within it Run grunt watch Modify some of the following, and Confirm that only sub-directories were built, and linted for each: modulename/build.json modulename/js/*.js modulename/meta/*.json modulename/js/example/subdirectory/*.js Run it from a yui/src/ [modulename] directory Confirm that only sub-directories were built, and linted Run grunt watch Modify some of the following, and Confirm that only sub-directories were built, and linted for each: build.json js/*.js meta/*.json js/example/subdirectory/*.js Run it from a yui/src/ [modulename] /meta directory Confirm that only that module was built, and linted Run grunt watch Modify some of the following, and Confirm that only that module was built, and linted for each: *.json ../build.json ../js/*.js ../js/example/subdirectory/*.js Confirm that only sub-directories were built, and linted Confirm a clean git status Repeat for all of theabove, passing in the --root option

    Description

      When running the watch task in grunt on Windows, I'm seeing the AMD modules being "compiled" to the wrong folder. For example, if my plugin in is in local/test, the files are ending up in local/test/amd/local/test/amd/build.

      The command I'm running is grunt watch --root=local/test/amd, which I think is correct, and the same behaviour happens whether the current working directory is the root of the Moodle codebase or the local/test/amd folder.

      Just to be clear, what I am trying to do is to watch a single plugin and have its (and only its) AMD modules recompiled when I change them. I am expecting them to go directly into the amd/build folder within the plugin.

      Attachments

        Issue Links

          Activity

            People

              dobedobedoh Andrew Lyons
              maherne Michael Aherne
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: