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

grunt watch watches style changes in node_modules

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Grunt regular

      1. Run the following series of commands

        grunt
        cd mod
        grunt
        cd forum
        grunt
        cd ../assign
        grunt
        cd ../../theme
        grunt
        cd boost
        grunt
        cd ../classic
        grunt
        cd ../../
        grunt ignorefiles
        

        1. Confirm that there were no changes in git:

          git status
          

          Note: No files should be listed.

      Grunt Watch

      1. Run the following series of commands

        # From the root directory
        grunt watch
        

      2. From another console window run the following commands and confirmations:
        1. Core JS

          touch lib/amd/src/*.js
          

          1. Confirm that a lot of JS files were picked up as changed
          2. Confirm that the output includes "Running "eslint:amd" (eslint) task"
          3. Confirm that the output includes "Running "babel:dist" (babel) task"
        2. Core JS in a subdir

          touch lib/amd/src/*/*/*.js
          

          1. Confirm that a lot of JS files were picked up as changed
          2. Confirm that the output includes "Running "eslint:amd" (eslint) task"
          3. Confirm that the output includes "Running "babel:dist" (babel) task"
        3. AMD JS in a module

          touch mod/assign/amd/src/*.js
          

          1. Confirm that a lot of JS files were picked up as changed
          2. Confirm that the output includes "Running "eslint:amd" (eslint) task"
          3. Confirm that the output includes "Running "babel:dist" (babel) task"
        4. YUI JS in a module

          touch mod/assign/yui/src/*/js/*.js
          

          1. Confirm that a lot of JS files were picked up as changed
          2. Confirm that the output includes "Running "eslint:yui" (eslint) task"
          3. Confirm that the output includes "Running "shifter" task"
        5. Mod styles.css

          touch mod/assign/styles.css
          

          1. Confirm that the mod/assign/styles.css was checked
          2. Confirm that the output includes "Running "stylelint:css" (stylelint) task"
        6. Theme SCSS

          touch theme/boost/scss/moodle/*.scss
          

          1. *Confirm that a load of SCSS files were picked up
          2. Confirm that the output includes "Running "stylelint:scss" (stylelint) task"
          3. Confirm that the output includes "Running "sass:dist" (sass) task"
        7. Gherkin

          touch theme/boost/tests/behat/*.feature
          

          1. *Confirm that a load of Feature files were picked up
          2. Confirm that the output includes "Running "gherkinlint" task"
      3. Switch back to the first window
      4. Kill off the grunt watch (press Ctrl+C)
        1. Confirm that there were no changes in git:

          git status
          

          Note: No files should be listed.

      Grunt in a subdir

      1. Run the following series of commands

        # From the root directory
        cd mod
        grunt watch
        

      2. From another console window run the following commands and confirmations:
        1. Unrelated files

          touch lib/amd/src/*.js lib/amd/src/*/*/*.js blocks/*/amd/src/*.js blocks/*/yui/src/*/js/*.js blocks/*/tests/behat/*.feature lib/tests/behat/*.feature theme/boost/scss/moodle/*.scss blocks/*/styles.css
          

          1. Confirm that nothing was picked up
        2. AMD JS in a module

          touch mod/assign/amd/src/*.js
          

          1. Confirm that a lot of JS files were picked up as changed
          2. Confirm that the output includes "Running "eslint:amd" (eslint) task"
          3. Confirm that the output includes "Running "babel:dist" (babel) task"
        3. YUI JS in a module

          touch mod/assign/yui/src/*/js/*.js
          

          1. Confirm that a lot of JS files were picked up as changed
          2. Confirm that the output includes "Running "eslint:yui" (eslint) task"
          3. Confirm that the output includes "Running "shifter" task"
        4. Mod styles.css

          touch mod/assign/styles.css
          

          1. Confirm that the mod/assign/styles.css was checked
          2. Confirm that the output includes "Running "stylelint:css" (stylelint) task"

            touch mod/forum/tests/behat/*.feature
            

          3. *Confirm that a load of Feature files were picked up
      3. Switch back to the first window
      4. Kill off the grunt watch (press Ctrl+C)
      5. Run the ignorefiles task:

        grunt ignorefiles
        

        1. Confirm that it finished without error
        2. Confirm that there were no changes in git:

          git status
          

          Note: No files should be listed.

      Grunt in a specific component

      1. Run the following series of commands

        # From the root directory
        cd mod/assign
        grunt watch
        

      2. From another console window run the following commands and confirmations:
        1. Unrelated files

          touch lib/amd/src/*.js mod/forum/amd/src/*.js lib/amd/src/*/*/*.js mod/quiz/yui/src/*/js/*.js mod/forum/styles.css theme/boost/scss/moodle/*.scss mod/forum/tests/behat/*.feature
          

          1. Confirm that nothing was picked up
        2. AMD JS in the module

          touch mod/assign/amd/src/*.js
          

          1. Confirm that a lot of JS files were picked up as changed
          2. Confirm that the output includes "Running "eslint:amd" (eslint) task"
          3. Confirm that the output includes "Running "babel:dist" (babel) task"
        3. YUI JS in the module

          touch mod/assign/yui/src/*/js/*.js
          

          1. Confirm that a lot of JS files were picked up as changed
          2. Confirm that the output includes "Running "eslint:yui" (eslint) task"
          3. Confirm that the output includes "Running "shifter" task"
        4. Mod styles.css

          touch mod/assign/styles.css
          

          1. Confirm that the mod/assign/styles.css was checked
          2. Confirm that the output includes "Running "stylelint:css" (stylelint) task"
        5. Gherkin

          touch mod/assign/tests/behat/*.feature
          

          1. *Confirm that a load of Feature files were picked up
      3. Switch back to the first window
      4. Kill off the grunt watch (press Ctrl+C)
        1. Confirm that it finished without error
        2. Confirm that there were no changes in git:

          git status
          

          Note: No files should be listed.

      Grunt in themes directory

      1. Run the following series of commands

        # From the root directory
        cd theme
        grunt watch
        

      2. From another console window run the following commands and confirmations:
        1. Unrelated files

          touch lib/amd/src/*.js lib/amd/src/*/*/*.js blocks/*/amd/src/*.js blocks/*/yui/src/*/js/*.js blocks/*/tests/behat/*.feature lib/tests/behat/*.feature blocks/*/styles.css
          

          1. Confirm that nothing was picked up
        2. AMD JS in a theme

          touch theme/*/amd/src/*.js
          

          1. Confirm that a lot of JS files were picked up as changed
          2. Confirm that the output includes "Running "eslint:amd" (eslint) task"
          3. Confirm that the output includes "Running "babel:dist" (babel) task"
        3. Theme behat

          touch theme/boost/tests/behat/*.feature
          

          1. *Confirm that a load of Feature files were picked up
      3. Switch back to the first window
      4. Kill off the grunt watch (press Ctrl+C)
        1. Confirm that there were no changes in git:

          git status
          

          Note: No files should be listed.

      Grunt in a specific theme

      1. Run the following series of commands

        # From the root directory
        cd theme/boost
        grunt watch
        

      2. From another console window run the following commands and confirmations:
        1. Unrelated files

          touch lib/amd/src/*.js mod/forum/amd/src/*.js lib/amd/src/*/*/*.js mod/quiz/yui/src/*/js/*.js mod/forum/styles.css theme/classic/scss/moodle/*.scss mod/forum/tests/behat/*.feature
          

          1. Confirm that nothing was picked up
        2. AMD JS in the boost theme

          touch theme/boost/amd/src/*.js
          

          1. Confirm that a lot of JS files were picked up as changed
          2. Confirm that the output includes "Running "eslint:amd" (eslint) task"
          3. Confirm that the output includes "Running "babel:dist" (babel) task"
        3. Theme behat

          touch theme/boost/tests/behat/*.feature
          

          1. *Confirm that a load of Feature files were picked up
      3. Switch back to the first window
      4. Kill off the grunt watch (press Ctrl+C)
        1. Confirm that there were no changes in git:

          git status
          

          Note: No files should be listed.

      Show
      Grunt regular Run the following series of commands grunt cd mod grunt cd forum grunt cd ../assign grunt cd ../../theme grunt cd boost grunt cd ../classic grunt cd ../../ grunt ignorefiles Confirm that there were no changes in git: git status Note: No files should be listed. Grunt Watch Run the following series of commands # From the root directory grunt watch From another console window run the following commands and confirmations: Core JS touch lib/amd/src/*.js Confirm that a lot of JS files were picked up as changed Confirm that the output includes "Running "eslint:amd" (eslint) task" Confirm that the output includes "Running "babel:dist" (babel) task" Core JS in a subdir touch lib/amd/src/*/*/*.js Confirm that a lot of JS files were picked up as changed Confirm that the output includes "Running "eslint:amd" (eslint) task" Confirm that the output includes "Running "babel:dist" (babel) task" AMD JS in a module touch mod/assign/amd/src/*.js Confirm that a lot of JS files were picked up as changed Confirm that the output includes "Running "eslint:amd" (eslint) task" Confirm that the output includes "Running "babel:dist" (babel) task" YUI JS in a module touch mod/assign/yui/src/*/js/*.js Confirm that a lot of JS files were picked up as changed Confirm that the output includes "Running "eslint:yui" (eslint) task" Confirm that the output includes "Running "shifter" task" Mod styles.css touch mod/assign/styles.css Confirm that the mod/assign/styles.css was checked Confirm that the output includes "Running "stylelint:css" (stylelint) task" Theme SCSS touch theme/boost/scss/moodle/*.scss *Confirm that a load of SCSS files were picked up Confirm that the output includes "Running "stylelint:scss" (stylelint) task" Confirm that the output includes "Running "sass:dist" (sass) task" Gherkin touch theme/boost/tests/behat/*.feature *Confirm that a load of Feature files were picked up Confirm that the output includes "Running "gherkinlint" task" Switch back to the first window Kill off the grunt watch (press Ctrl+C) Confirm that there were no changes in git: git status Note: No files should be listed. Grunt in a subdir Run the following series of commands # From the root directory cd mod grunt watch From another console window run the following commands and confirmations: Unrelated files touch lib/amd/src/*.js lib/amd/src/*/*/*.js blocks/*/amd/src/*.js blocks/*/yui/src/*/js/*.js blocks/*/tests/behat/*.feature lib/tests/behat/*.feature theme/boost/scss/moodle/*.scss blocks/*/styles.css Confirm that nothing was picked up AMD JS in a module touch mod/assign/amd/src/*.js Confirm that a lot of JS files were picked up as changed Confirm that the output includes "Running "eslint:amd" (eslint) task" Confirm that the output includes "Running "babel:dist" (babel) task" YUI JS in a module touch mod/assign/yui/src/*/js/*.js Confirm that a lot of JS files were picked up as changed Confirm that the output includes "Running "eslint:yui" (eslint) task" Confirm that the output includes "Running "shifter" task" Mod styles.css touch mod/assign/styles.css Confirm that the mod/assign/styles.css was checked Confirm that the output includes "Running "stylelint:css" (stylelint) task" touch mod/forum/tests/behat/*.feature *Confirm that a load of Feature files were picked up Switch back to the first window Kill off the grunt watch (press Ctrl+C) Run the ignorefiles task: grunt ignorefiles Confirm that it finished without error Confirm that there were no changes in git: git status Note: No files should be listed. Grunt in a specific component Run the following series of commands # From the root directory cd mod/assign grunt watch From another console window run the following commands and confirmations: Unrelated files touch lib/amd/src/*.js mod/forum/amd/src/*.js lib/amd/src/*/*/*.js mod/quiz/yui/src/*/js/*.js mod/forum/styles.css theme/boost/scss/moodle/*.scss mod/forum/tests/behat/*.feature Confirm that nothing was picked up AMD JS in the module touch mod/assign/amd/src/*.js Confirm that a lot of JS files were picked up as changed Confirm that the output includes "Running "eslint:amd" (eslint) task" Confirm that the output includes "Running "babel:dist" (babel) task" YUI JS in the module touch mod/assign/yui/src/*/js/*.js Confirm that a lot of JS files were picked up as changed Confirm that the output includes "Running "eslint:yui" (eslint) task" Confirm that the output includes "Running "shifter" task" Mod styles.css touch mod/assign/styles.css Confirm that the mod/assign/styles.css was checked Confirm that the output includes "Running "stylelint:css" (stylelint) task" Gherkin touch mod/assign/tests/behat/*.feature *Confirm that a load of Feature files were picked up Switch back to the first window Kill off the grunt watch (press Ctrl+C) Confirm that it finished without error Confirm that there were no changes in git: git status Note: No files should be listed. Grunt in themes directory Run the following series of commands # From the root directory cd theme grunt watch From another console window run the following commands and confirmations: Unrelated files touch lib/amd/src/*.js lib/amd/src/*/*/*.js blocks/*/amd/src/*.js blocks/*/yui/src/*/js/*.js blocks/*/tests/behat/*.feature lib/tests/behat/*.feature blocks/*/styles.css Confirm that nothing was picked up AMD JS in a theme touch theme/*/amd/src/*.js Confirm that a lot of JS files were picked up as changed Confirm that the output includes "Running "eslint:amd" (eslint) task" Confirm that the output includes "Running "babel:dist" (babel) task" Theme behat touch theme/boost/tests/behat/*.feature *Confirm that a load of Feature files were picked up Switch back to the first window Kill off the grunt watch (press Ctrl+C) Confirm that there were no changes in git: git status Note: No files should be listed. Grunt in a specific theme Run the following series of commands # From the root directory cd theme/boost grunt watch From another console window run the following commands and confirmations: Unrelated files touch lib/amd/src/*.js mod/forum/amd/src/*.js lib/amd/src/*/*/*.js mod/quiz/yui/src/*/js/*.js mod/forum/styles.css theme/classic/scss/moodle/*.scss mod/forum/tests/behat/*.feature Confirm that nothing was picked up AMD JS in the boost theme touch theme/boost/amd/src/*.js Confirm that a lot of JS files were picked up as changed Confirm that the output includes "Running "eslint:amd" (eslint) task" Confirm that the output includes "Running "babel:dist" (babel) task" Theme behat touch theme/boost/tests/behat/*.feature *Confirm that a load of Feature files were picked up Switch back to the first window Kill off the grunt watch (press Ctrl+C) Confirm that there were no changes in git: git status Note: No files should be listed.
    • Affected Branches:
      MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
    • Fixed Branches:
      MOODLE_311_STABLE
    • Pull 3.11 Branch:
      MDL-68496-311
    • Pull Master Branch:
      MDL-68496-master
    • Story Points:
      0
    • Sprint:
      Internationals - 3.11 Sprint 8, Internationals - 3.11 Sprint 9

      Description

      2012 sm:MDL-67743-master-integration> grunt watch
      Running "watch" task
      >> Listening for changes to files in /Users/nicols/Sites/moodles/sm/moodle
      >> File changed: node_modules/ycssmin/tests/files/box-model-hack.css
      >> Running task rawcss for files --files=node_modules/ycssmin/tests/files/box-model-hack.css
      Running "stylelint:css" (stylelint) task
      Warning: Running stylelint failed
      Error: node_modules/ycssmin/tests/files/box-model-hack.css does not match any files
        at globby.then.filePaths (/Users/nicols/Sites/moodles/sm/moodle/node_modules/grunt-stylelint/node_modules/stylelint/lib/standalone.js:124:33)
        at <anonymous>:null:null
       Use --force to continue.
       
      Aborted due to warnings.
      

      We need to add it to the list of excludes in the watch config.

        Attachments

        1. MDL-68496.jpg
          MDL-68496.jpg
          67 kB
        2. MDL-68496 (2).jpg
          MDL-68496 (2).jpg
          111 kB
        3. MDL-68496 (3).jpg
          MDL-68496 (3).jpg
          25 kB
        4. MDL-68496 (4).jpg
          MDL-68496 (4).jpg
          102 kB
        5. MDL-68496 (5).jpg
          MDL-68496 (5).jpg
          90 kB
        6. MDL-68496 (6).jpg
          MDL-68496 (6).jpg
          50 kB
        7. MDL-68496 (7).jpg
          MDL-68496 (7).jpg
          57 kB

          Issue Links

            Activity

              People

              Assignee:
              dobedobedoh Andrew Lyons
              Reporter:
              dobedobedoh Andrew Lyons
              Peer reviewer:
              Shamim Rezaie Shamim Rezaie
              Integrator:
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Tester:
              Anna Carissa Sadia Anna Carissa Sadia
              Participants:
              Component watchers:
              Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                17/May/21

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 3 days, 3 hours, 55 minutes
                  3d 3h 55m