Skip to content

Commit 6284a47

Browse files
Mykhailo BodnarchukMykhailo Bodnarchuk
Mykhailo Bodnarchuk
authored and
Mykhailo Bodnarchuk
committed
Merge branch 'master' of github.com:codecept-js/create-codeceptjs
2 parents 079c5fe + 9dacc3c commit 6284a47

File tree

3 files changed

+39
-44
lines changed

3 files changed

+39
-44
lines changed

Readme.md

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Create CodeceptJS 🚀
22

3-
Create CodeceptJS project easily, having all dependencies installed with one command.
3+
One command to create a fresh CodeceptJS project or add CodeceptJS to an existing project.
44

55
```
66
____ ____ _____ ____ _____ _____ ____ ____ ____ _____ ____ _____ ____ _____ _ ____
@@ -11,47 +11,41 @@ Create CodeceptJS project easily, having all dependencies installed with one com
1111
1212
```
1313

14-
15-
This script will install all required depdnedncies for CodeceptJS project.
1614
It is not required to use `create-codeceptjs` on any project, you can install them on your own, but it is very easy to start from scratch.
1715

18-
This script will also update `scripts` section of `package.json` so you could execute tests faster without learning Codeceptjs commands.
19-
20-
## Installation
16+
![](https://user-images.githubusercontent.com/220264/87477444-c986b580-c630-11ea-9af4-f383e02dfa2d.gif)
2117

22-
No installation needed 🤗
18+
This script will also add several commands to the `scripts` section of your `package.json`, so you can just execute tests without the need to learn custom CodeceptJS commands.
2319

2420
## Usage
2521

26-
27-
Install CodeceptJS + Playwright into current project
22+
To install CodeceptJS + Playwright into your current project run
2823

2924
```
3025
npx create-codeceptjs
3126
```
3227

33-
Install CodeceptJS into "tests" directory
28+
To install CodeceptJS + Playwright into the "tests" directory run
3429

3530
```
3631
npx create-codeceptjs tests
3732
```
3833

39-
Install CodeceptJS + webdriverio:
34+
To install CodeceptJS + WebdriverIO run
4035

4136
```
4237
npx create-codeceptjs --webdriverio
4338
```
4439

45-
Install CodeceptJS + webdriverio into "tests" directory
40+
To install CodeceptJS + WebdriverIO into "tests" directory
4641

4742
```
4843
npx create-codeceptjs tests --webdriverio
4944
```
5045

5146
Supported options:
5247

53-
* `--puppeteer` - install puppeteer as default helper
54-
* `--testcafe` - install testcafe as default helper
55-
* `--yarn` - yes, we support yarn too!
56-
57-
48+
* `--puppeteer` - installs Puppeteer as default helper
49+
* `--webdriverio` - installs WebdriverIO as default helper
50+
* `--testcafe` - installs TestCafe as default helper
51+
* `--use-yarn` - yes, we support yarn too!

index.js

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ const program = new commander.Command('Create CodeceptJS')
5656
.option('--template <template>', 'Install template')
5757

5858
// engines select
59-
.option('--playwright', 'Install playwright packages')
6059
.option('--puppeteer', 'Install puppeteer packages')
6160
.option('--webdriverio', 'Install webdriverio packages')
6261
.option('--testcafe', 'Install testcafe packages')
@@ -77,7 +76,7 @@ if (typeof projectName === 'undefined' && !existsSync('package.json')) {
7776
console.log('For example:');
7877
console.log(` ${chalk.cyan(program.name())} ${chalk.green('codeceptjs-tests')}`);
7978
console.log();
80-
console.log('To update current project to include codeceptjs packages, run this script in a directory with package.json');
79+
console.log('To update current project to include CodeceptJS packages, run this script in a directory with package.json');
8180
console.log(
8281
`Run ${chalk.cyan(`${program.name()} --help`)} to see all options.`
8382
);
@@ -142,15 +141,15 @@ async function createCodecept(opts) {
142141

143142
if (!packageJson.scripts) packageJson.scripts = {};
144143

145-
packageJson.scripts['codecept'] = 'codeceptjs run --steps';
146-
packageJson.scripts['codecept:headless'] = 'HEADLESS=true codeceptjs run --steps';
147-
packageJson.scripts['codecept:app'] = 'codecept-ui --app';
148-
packageJson.scripts['codecept:server'] = 'codecept-ui';
144+
packageJson.scripts['codeceptjs'] = 'codeceptjs run --steps';
145+
packageJson.scripts['codeceptjs:headless'] = 'HEADLESS=true codeceptjs run --steps';
146+
packageJson.scripts['codeceptjs:app'] = 'codecept-ui --app';
147+
packageJson.scripts['codeceptjs:server'] = 'codecept-ui';
149148

150-
packageJson.scripts['codecept:demo'] = 'codeceptjs run --steps -c node_modules/@codeceptjs/examples';
151-
packageJson.scripts['codecept:demo:headless'] = 'HEADLESS=true codeceptjs run --steps -c node_modules/@codeceptjs/examples';
152-
packageJson.scripts['codecept:demo:app'] = 'codecept-ui --app -c node_modules/@codeceptjs/examples';
153-
packageJson.scripts['codecept:demo:server'] = 'codecept-ui -c node_modules/@codeceptjs/examples';
149+
packageJson.scripts['codeceptjs:demo'] = 'codeceptjs run --steps -c node_modules/@codeceptjs/examples';
150+
packageJson.scripts['codeceptjs:demo:headless'] = 'HEADLESS=true codeceptjs run --steps -c node_modules/@codeceptjs/examples';
151+
packageJson.scripts['codeceptjs:demo:app'] = 'codecept-ui --app -c node_modules/@codeceptjs/examples';
152+
packageJson.scripts['codeceptjs:demo:server'] = 'codecept-ui -c node_modules/@codeceptjs/examples';
154153

155154
fs.writeJsonSync('package.json', packageJson, { spaces: 4 });
156155

@@ -163,15 +162,17 @@ async function createCodecept(opts) {
163162
console.log(chalk.bold('What\'s next?'));
164163
console.log()
165164
console.log('Try CodeceptJS now with a demo project:');
166-
console.log('➕', chalk.bold.cyan('npm run codecept:demo'), '- executes codeceptjs tests for a demo project');
167-
console.log('➕', chalk.bold.cyan('npm run codecept:demo:app'), '- starts codeceptjs application with UI for a demo project');
168-
console.log('➕', chalk.cyan('npm run codecept:demo:headless'), '- executes codeceptjs tests headlessly (no window shown)');
165+
console.log('➕', chalk.bold.cyan('npm run codeceptjs:demo'), '- executes codeceptjs tests for a demo project');
166+
console.log('➕', chalk.cyan('npm run codeceptjs:demo:headless'), '- executes codeceptjs tests headlessly (no window shown)');
167+
console.log('➕', chalk.bold.cyan('npm run codeceptjs:demo:app'), '- starts codeceptjs UI application for a demo project');
168+
console.log('➕', chalk.cyan('npm run codeceptjs:demo:server'), '- starts codeceptjs UI as a webserver for a demo project');
169169
console.log();
170170
console.log('Initialize CodeceptJS for your project:');
171171
console.log('🔨', chalk.yellow('npx codeceptjs init'), '- initialize codeceptjs for current project', chalk.bold('(required)'));
172-
console.log('➕', chalk.cyan('npm run codecept'), '- runs codeceptjs tests for current project');
173-
console.log('➕', chalk.cyan('npm run codecept:headless'), '- executes codeceptjs tests headlessly (no window shown)');
174-
console.log('➕', chalk.cyan('npm run codecept:app'), '- starts codeceptjs UI application for current project');
172+
console.log('➕', chalk.cyan('npm run codeceptjs'), '- runs codeceptjs tests for current project');
173+
console.log('➕', chalk.cyan('npm run codeceptjs:headless'), '- executes codeceptjs tests headlessly (no window shown)');
174+
console.log('➕', chalk.cyan('npm run codeceptjs:app'), '- starts codeceptjs UI application for current project');
175+
console.log('➕', chalk.cyan('npm run codeceptjs:server'), '- starts codeceptJS UI as webserver');
175176

176177
console.log();
177178
if (root != currentDir) {

package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@
88
},
99
"scripts": {
1010
"test": "echo \"Error: no test specified\" && exit 1",
11-
"codecept": "codeceptjs run --steps",
12-
"codecept:app": "codecept-ui --app",
13-
"codecept:server": "codecept-ui",
14-
"codecept:example": "codeceptjs run --steps -c node_modules/@codeceptjs/examples",
15-
"codecept:example:app": "codecept-ui --app -c node_modules/@codeceptjs/examples",
16-
"codecept:example:server": "codecept-ui -c node_modules/@codeceptjs/examples",
17-
"codecept:headless": "HEADLESS=true codeceptjs run --steps",
18-
"codecept:demo": "codeceptjs run --steps -c node_modules/@codeceptjs/examples",
19-
"codecept:demo:headless": "HEADLESS=true codeceptjs run --steps -c node_modules/@codeceptjs/examples",
20-
"codecept:demo:app": "codecept-ui --app -c node_modules/@codeceptjs/examples",
21-
"codecept:demo:server": "codecept-ui -c node_modules/@codeceptjs/examples"
11+
"codeceptjs": "codeceptjs run --steps",
12+
"codeceptjs:app": "codecept-ui --app",
13+
"codeceptjs:server": "codecept-ui",
14+
"codeceptjs:example": "codeceptjs run --steps -c node_modules/@codeceptjs/examples",
15+
"codeceptjs:example:app": "codecept-ui --app -c node_modules/@codeceptjs/examples",
16+
"codeceptjs:example:server": "codecept-ui -c node_modules/@codeceptjs/examples",
17+
"codeceptjs:headless": "HEADLESS=true codeceptjs run --steps",
18+
"codeceptjs:demo": "codeceptjs run --steps -c node_modules/@codeceptjs/examples",
19+
"codeceptjs:demo:headless": "HEADLESS=true codeceptjs run --steps -c node_modules/@codeceptjs/examples",
20+
"codeceptjs:demo:app": "codecept-ui --app -c node_modules/@codeceptjs/examples",
21+
"codeceptjs:demo:server": "codecept-ui -c node_modules/@codeceptjs/examples"
2222
},
2323
"repository": {
2424
"type": "git",

0 commit comments

Comments
 (0)