mirror of
https://github.com/cypress-io/cypress.git
synced 2025-12-30 02:59:46 -06:00
chore(windows): make install portable to windows (#4779)
* chore(install) - make preinstall hook windows portable - make link-packages script use junction symlinks for windows * use npx * run preinstll in appveyor * remove win32 check, pin dep (and update .npmrc)
This commit is contained in:
@@ -64,6 +64,7 @@ install:
|
||||
# clean cache to prevent install permission issues
|
||||
- npm cache clean --force
|
||||
# install root modules only, and retry automatically if install fails
|
||||
- npm run preinstall
|
||||
- npm install --ignore-scripts || npm install --ignore-scripts || npm install --ignore-scripts
|
||||
- .\node_modules\.bin\print-arch
|
||||
# because we skipped scripts, we need to do
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
"dev-debug": "node ./scripts/debug.js dev",
|
||||
"docker": "./scripts/run-docker-local.sh",
|
||||
"effective:circle:config": "circleci config process circle.yml | sed /^#/d",
|
||||
"preinstall": "rm -rf node_modules/@packages || true",
|
||||
"preinstall": "npx shx rm -rf node_modules/@packages",
|
||||
"postinstall": "echo 'root postinstall' && npm run link && npm run all install && npm run build",
|
||||
"install-filtered": "npm run all install -- --package $(node ./scripts/check-deps.js --list)",
|
||||
"jscodeshift": "jscodeshift -t ./node_modules/js-codemod/transforms/arrow-function-arguments.js",
|
||||
@@ -151,6 +151,7 @@
|
||||
"proxyquire": "2.1.0",
|
||||
"ramda": "0.24.1",
|
||||
"shelljs": "0.8.3",
|
||||
"shx": "0.3.2",
|
||||
"sinon": "7.3.2",
|
||||
"snap-shot-it": "7.8.0",
|
||||
"stop-only": "3.0.1",
|
||||
|
||||
@@ -32,18 +32,11 @@ function makeLinks () {
|
||||
const basename = path.basename(dirname)
|
||||
|
||||
const destinationLink = path.join(pathToPackages, basename)
|
||||
// const registerPath = path.join(destinationFolder, 'register.js')
|
||||
// const fullMain = path.resolve(dirname, json.main)
|
||||
|
||||
// debug('full name', fullMain)
|
||||
// const relativePathToMain = path.relative(destinationFolder, fullMain)
|
||||
|
||||
// debug('relative path to main', relativePathToMain)
|
||||
const relativePathToDest = path.relative(path.dirname(destinationLink), dirname)
|
||||
|
||||
console.log(destinationLink, '->', relativePathToDest)
|
||||
|
||||
return fs.symlink(relativePathToDest, destinationLink)
|
||||
return fs.symlink(relativePathToDest, destinationLink, 'junction')
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user