I am trying to get the current dependencies and devDependencies versions that are set in the package.json file so that when the MakeFile is run for a new user, it installs the versions listed there and not just the latest version. So for the example below, instead of just saying npm install @applitools/eyes-testcafe we would grab the version 1.16.1 from the package.json and interpolate it there in the MakeFile like ${eyes_version} or something like that.
Any idea on how to do this? Thanks!
package.json
"devDependencies": {
"@applitools/eyes-testcafe": "^1.16.1",
"testcafe": "^1.18.6",
"testcafe-reporter-xunit": "*"
}
MakeFile
install-testcafe: npm ffmpeg applitools testcafe
# Installs all dependencies necessary for testcafe and node to run.
npm:
npm install
# Installs the ffmpeg video recorder. This is recursive as sometimes it doesn't install automatically.
ffmpeg:
npm install @ffmpeg-installer/ffmpeg
# Installs the applitools dependency. This is recursive as sometimes it doesn't install automatically.
applitools:
npm install @applitools/eyes-testcafe
# Installs TestCafe globally. This is recursive as sometimes it doesn't install automatically.
testcafe:
sudo npm install -g testcafe
Via Active questions tagged javascript - Stack Overflow https://ift.tt/njHwFbT
Comments
Post a Comment