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:
Ben Kucera
2020-02-26 20:21:23 +00:00
committed by GitHub
parent 62dd438485
commit f77ec01c18
25 changed files with 180 additions and 375 deletions
-5
View File
@@ -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")
+1 -17
View File
@@ -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