mirror of
https://github.com/cypress-io/cypress.git
synced 2026-05-01 04:20:23 -05:00
chore:fix ui-components dependencies, web-config deps for yarn (#6534)
- add needed deps in `ui-components` package - upgrade `@cypress/webpack-preprocessor` - refactor some eslint code, remove unused eslint scripts - rename `build-js` scripts to `build-prod` since they'll only need to run when building for prod / checking for tsc errors
This commit is contained in:
@@ -40,9 +40,6 @@ logger = (msg, platform) ->
|
||||
logBuiltAllPackages = () ->
|
||||
console.log("built all packages")
|
||||
|
||||
logBuiltAllJs = () ->
|
||||
console.log("built all JS")
|
||||
|
||||
# can pass options to better control the build
|
||||
# for example
|
||||
# skipClean - do not delete "dist" folder before build
|
||||
@@ -118,8 +115,6 @@ buildCypressApp = (platform, version, options = {}) ->
|
||||
packages.runAllBuild()
|
||||
# Promise.resolve()
|
||||
.then(R.tap(logBuiltAllPackages))
|
||||
.then(packages.runAllBuildJs)
|
||||
.then(R.tap(logBuiltAllJs))
|
||||
|
||||
copyPackages = ->
|
||||
log("#copyPackages")
|
||||
|
||||
@@ -40,25 +40,11 @@ createCLIExecutable = (command) ->
|
||||
yarn = createCLIExecutable('yarn')
|
||||
npx = createCLIExecutable('npx')
|
||||
|
||||
runAllBuildJs = _.partial(npx, ["lerna", "run", "build-js", "--ignore", "cli"])
|
||||
runAllBuild = _.partial(npx, ["lerna", "run", "build-prod", "--ignore", "cli"])
|
||||
|
||||
# removes transpiled JS files in the original package folders
|
||||
runAllCleanJs = _.partial(npx, ["lerna", "run", "clean-js", "--ignore", "cli"])
|
||||
|
||||
# builds all the packages except for cli
|
||||
runAllBuild = (args...) ->
|
||||
getPackagesWithScript('build')
|
||||
.then (pkgNameArr) ->
|
||||
pkgs = pkgNameArr
|
||||
.map((pkgName) ->
|
||||
"@packages/#{pkgName}"
|
||||
)
|
||||
.join(',')
|
||||
npx(
|
||||
["lerna", "run", "build-prod", "--scope", "\"{#{pkgs}}\"", "--ignore", "cli"]
|
||||
args...
|
||||
)
|
||||
|
||||
## @returns string[] with names of packages, e.g. ['runner', 'driver', 'server']
|
||||
getPackagesWithScript = (scriptName) ->
|
||||
Promise.resolve(glob('./packages/*/package.json'))
|
||||
@@ -227,8 +213,6 @@ symlinkAll = (pathToDistPackages, pathTo) ->
|
||||
module.exports = {
|
||||
runAllBuild
|
||||
|
||||
runAllBuildJs
|
||||
|
||||
copyAllToDist
|
||||
|
||||
npmInstallAll
|
||||
|
||||
Reference in New Issue
Block a user