mirror of
https://github.com/cypress-io/cypress.git
synced 2026-02-05 06:40:56 -06:00
* chore: replace dtslint with eslint-plugin-expect-type * update guide * add lint-staged * rm stale script * modify cli eslint and tsconfigs to support ts migration * separate expect-type files * modifications to tsconfigs to make eslint a little easier * revert workflow.yml * further revision * put tslint config for dtslint back in * ensure false negative case is tested * correct tsconfigs * align dtslint tsconfig with eslint 9 config * consolidate / DRY tsconfigs
38 lines
1.1 KiB
JavaScript
38 lines
1.1 KiB
JavaScript
#!/usr/bin/env node
|
|
|
|
import { includeTypes } from './utils'
|
|
import { join } from 'path'
|
|
import shell from 'shelljs'
|
|
|
|
shell.set('-v') // verbose
|
|
shell.set('-e') // any error is fatal
|
|
|
|
shell.rm('-rf', 'build')
|
|
shell.mkdir('-p', 'build/bin')
|
|
shell.mkdir('-p', 'build/types')
|
|
shell.cp('bin/cypress', 'build/bin/cypress')
|
|
shell.cp('NPM_README.md', 'build/README.md')
|
|
shell.cp('.release.json', 'build/.release.json')
|
|
// copies our typescript definitions
|
|
shell.cp('-R', 'types/*.ts', 'build/types/')
|
|
// copies 3rd party typescript definitions
|
|
includeTypes.forEach((folder: string) => {
|
|
const source: string = join('types', folder)
|
|
|
|
shell.cp('-R', source, 'build/types')
|
|
})
|
|
|
|
// build the project and copy the build files over to the build directory
|
|
shell.exec('tsc -p tsconfig.build.json')
|
|
shell.exec('tsc -p tsconfig.esm.json')
|
|
|
|
shell.mkdir('-p', 'build/dist')
|
|
shell.cp('dist/*.js', 'build/dist/')
|
|
shell.cp('dist/*.mjs', 'build/dist/')
|
|
|
|
shell.mkdir('-p', 'build/dist/exec')
|
|
shell.cp('dist/exec/*.js', 'build/dist/exec')
|
|
|
|
shell.mkdir('-p', 'build/dist/tasks')
|
|
shell.cp('dist/tasks/*.js', 'build/dist/tasks')
|