forked from cypress-io/cypress
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
28 lines (23 loc) · 729 Bytes
/
index.js
File metadata and controls
28 lines (23 loc) · 729 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
const minimist = require('minimist')
const debug = require('debug')('cypress:cli')
const args = minimist(process.argv.slice(2))
const util = require('./lib/util')
// we're being used from the command line
switch (args.exec) {
case 'install':
debug('installing Cypress from NPM')
require('./lib/tasks/install')
.start({ force: args.force })
.catch(util.logErrorExit1)
break
case 'verify':
// for simple testing in the monorepo
debug('verifying Cypress')
require('./lib/tasks/verify')
.start({ force: true }) // always force verification
.catch(util.logErrorExit1)
break
default:
debug('exporting Cypress module interface')
module.exports = require('./lib/cypress')
}