Files
cypress/cli/scripts/post-build.js
Bill Glesias 0c661b4f35 breaking: remove support for React 16 and 17 for Cypress Component Testing. Additionally, remove the cypress/react18 testing harness and merge it upstream with cypress/react (#30590)
* breaking: remove support for react 16 and 17 for component testing and move cypress/react18 upstream into cypress/react [run ci]

* update tests / suggestions from code review [run ci]
2024-11-15 16:14:48 -05:00

24 lines
572 B
JavaScript

const shell = require('shelljs')
const { resolve } = require('path')
shell.set('-v') // verbose
shell.set('-e') // any error is fatal
// For each npm package that is re-published via cypress/*
// make sure that it is also copied into the build directory
const npmModulesToCopy = [
'mount-utils',
'react',
'vue',
'angular',
'svelte',
]
npmModulesToCopy.forEach((folder) => {
// cli/mount-utils => cli/build/mount-utils
const from = resolve(`${__dirname}/../${folder}`)
const to = resolve(`${__dirname}/../build/${folder}`)
shell.cp('-R', from, to)
})