regressify 1.0.8 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -7,7 +7,7 @@ Please check [Documentation](https://tuyen.blog/optimizely-cms/testing/get-start
7
7
  1. Install:
8
8
 
9
9
  ```bash
10
- npm i regressify
10
+ npm i -g regressify
11
11
  ```
12
12
 
13
13
  1. Manual Set up all test and config files in the **visual_tests** folder and place it at the root of the project, or automatically add it using the command:
package/cli.js CHANGED
@@ -55,7 +55,7 @@ if (command === 'init') {
55
55
 
56
56
  const postInstallPath = pathToFileURL(path.join(__dirname, 'generate_tests.js'));
57
57
  if (fs.existsSync(postInstallPath)) {
58
- console.log(chalk.yellow('generate folder visual_tests ...'));
58
+ console.log(chalk.yellow('Generate folder visual_tests ...'));
59
59
  await import(postInstallPath);
60
60
  } else {
61
61
  console.log(chalk.red('generate_tests.js not found!'));
@@ -63,7 +63,7 @@ if (command === 'init') {
63
63
 
64
64
  const updatePackageJsonPath = pathToFileURL(path.join(__dirname, 'update-package.js'));
65
65
  if (fs.existsSync(updatePackageJsonPath)) {
66
- console.log(chalk.yellow('update package.json ...'));
66
+ console.log(chalk.yellow('Update package.json ...'));
67
67
  await import(updatePackageJsonPath);
68
68
  } else {
69
69
  console.log(chalk.red('update-package.js not found!'));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "regressify",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "Visual regression tests support",
5
5
  "main": "index.js",
6
6
  "type": "module",
package/update-package.js CHANGED
@@ -12,12 +12,10 @@ async function updatePackageJson() {
12
12
  const packageJsonText = fs.readFileSync(packageJsonPath, 'utf8');
13
13
  const packageJson = JSON.parse(packageJsonText);
14
14
 
15
- const scripts = packageJson.scripts || {};
16
- scripts.ref = 'regressify ref';
17
- scripts.approve = 'regressify approve';
18
- scripts.test = 'regressify test';
19
-
20
- packageJson.scripts = scripts;
15
+ packageJson.scripts = packageJson.scripts || {};
16
+ packageJson.scripts.ref = 'regressify ref';
17
+ packageJson.scripts.approve = 'regressify approve';
18
+ packageJson.scripts.test = 'regressify test';
21
19
 
22
20
  fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2));
23
21
  }