From d4115b209182dfc6042a8773cb1c820f3e58893c Mon Sep 17 00:00:00 2001 From: Priyansh Garg Date: Mon, 21 Mar 2022 14:51:45 +0530 Subject: [PATCH 1/3] Add create-nightwatch docs. --- guide/getting-started/onboarding-cli.md | 34 +++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 guide/getting-started/onboarding-cli.md diff --git a/guide/getting-started/onboarding-cli.md b/guide/getting-started/onboarding-cli.md new file mode 100644 index 00000000..f0df950b --- /dev/null +++ b/guide/getting-started/onboarding-cli.md @@ -0,0 +1,34 @@ +## Nightwatch Onboarding CLI + +#### Overview + +This CLI tool lets you setup Nightwatch.js in your new or existing project, with all the required configs and dependencies, with just one command. + +#### Usage + +All you need to do is, run: + +##### 1) If you're in your existing project's root directory: + +
npm init nightwatch
+ +##### 2) If you want to create a new project: + +
npm init nightwatch path/to/new/project
+ +and answer a few questons. We'll setup everything for you based on your preferences. + + +If you'd like to skip all the questions (we'd assume best defualts for you), you can use the above commands with `--yes` or `-y` flag: + +##### 1) If you're in your existing project's root directory: + +
npm init nightwatch -- --yes
+# or
+npm init nightwatch -- -y
+ +##### 2) If you want to create a new project: + +
npm init nightwatch path/to/new/project -- --yes
+# or
+npm init nightwatch path/to/new/project -- -y
From 860170bebaf4dc3f828def82e5dee36eb270cfa3 Mon Sep 17 00:00:00 2001 From: Priyansh Garg Date: Tue, 22 Mar 2022 14:10:13 +0530 Subject: [PATCH 2/3] Add new config generation instuctions. --- guide/getting-started/onboarding-cli.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/guide/getting-started/onboarding-cli.md b/guide/getting-started/onboarding-cli.md index f0df950b..9b2aab65 100644 --- a/guide/getting-started/onboarding-cli.md +++ b/guide/getting-started/onboarding-cli.md @@ -32,3 +32,16 @@ npm init nightwatch -- -y
npm init nightwatch path/to/new/project -- --yes
 # or
 npm init nightwatch path/to/new/project -- -y
+ + +#### Generating a new config file + +While it's completely safe to run `npm init nightwatch` again in your existing Nightwatch project, if you want to just generate a new config file and install all the required dependencies and nothing else, you can use this tool with the `--generate-config` flag: + +##### 1) Generate new config file based on your preferences: + +
npm init nightwatch -- --generate-config
+ +##### 2) Generate new config file with default configurations: + +
npm init nightwatch -- --generate-config --yes
From 768d78e461a1aa372f1a66f6cc8d5ed3e1a16734 Mon Sep 17 00:00:00 2001 From: Priyansh Garg Date: Wed, 6 Apr 2022 01:43:50 +0530 Subject: [PATCH 3/3] Remove --yes section from doc. --- guide/getting-started/onboarding-cli.md | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/guide/getting-started/onboarding-cli.md b/guide/getting-started/onboarding-cli.md index 9b2aab65..6a6d0e35 100644 --- a/guide/getting-started/onboarding-cli.md +++ b/guide/getting-started/onboarding-cli.md @@ -18,22 +18,6 @@ All you need to do is, run: and answer a few questons. We'll setup everything for you based on your preferences. - -If you'd like to skip all the questions (we'd assume best defualts for you), you can use the above commands with `--yes` or `-y` flag: - -##### 1) If you're in your existing project's root directory: - -
npm init nightwatch -- --yes
-# or
-npm init nightwatch -- -y
- -##### 2) If you want to create a new project: - -
npm init nightwatch path/to/new/project -- --yes
-# or
-npm init nightwatch path/to/new/project -- -y
- - #### Generating a new config file While it's completely safe to run `npm init nightwatch` again in your existing Nightwatch project, if you want to just generate a new config file and install all the required dependencies and nothing else, you can use this tool with the `--generate-config` flag: