MDL-72326 grunt: Fix component library grunt on Windows
authorNeill Magill <neill.magill@nottingham.ac.uk>
Thu, 12 Aug 2021 11:12:38 +0000 (12:12 +0100)
committerNeill Magill <neill.magill@nottingham.ac.uk>
Mon, 4 Oct 2021 12:18:08 +0000 (13:18 +0100)
Before this change grunt tried to use the Linux version of files in
node_modules/.bin rather than the Windows version which is generated
by npm.

To avoid this issue we need to run the components directly.

.grunt/tasks/componentlibrary.js

index 4b1beb8..014e713 100644 (file)
@@ -67,7 +67,7 @@ module.exports = grunt => {
      * @returns {Object} Reference to the spawned task
      */
     const docsBuild = () => spawnNodeCall([
-        'node_modules/.bin/hugo',
+        'node_modules/hugo-bin/cli.js',
         '--config', getCLPath('config.yml'),
         '--cleanDestinationDir',
     ]);
@@ -91,7 +91,7 @@ module.exports = grunt => {
      * @returns {Object} Reference to the spawned task
      */
     const cssBuild = () => spawnNodeCall([
-        'node_modules/.bin/node-sass',
+        'node_modules/node-sass/bin/node-sass',
         '--output-style', 'expanded',
         '--source-map', true,
         '--source-map-contents', true,