Utilizing node and npm as a task runner from gitbash cli has been successful for the most part. However, I am facing an issue where I am unable to call tasks in separate .js files from my package.json. Any assistance with the syntax would be greatly appreciated.
It's worth noting that concat-css.js is located in the same folder as package.json.
The task in question:
var concat = require('concatenate-files');
concat('deploy/css/min/*.css', 'deploy/css/css.css', { separator: ';' }, function(err, result) {
// result == { outputFile: 'out.js', outputData: '...' }
});
The script within package.json:
"scripts": {"concat-css": "npm run concat"}
The dependency concatenate-files is installed locally and globally:
"devDependencies": {"concatenate-files": "^0.1.1"}
"dependencies": {"concatenate-files": "^0.1.1"}
Upon running the task, I encounter this error message:
npm run concat-css
npm ERR! missing script: concat
I have tried troubleshooting but haven't been able to pinpoint the exact issue. The available online resources related to npm are not very helpful. Can someone provide guidance on how to resolve this? The existing duplicate question flagged does not address my specific problem.