forked from bigbite/wp-cypress
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
style: updated with new eslint and prettier rulesets
- Loading branch information
1 parent
58c23fa
commit 802337c
Showing
18 changed files
with
140 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"printWidth": 100, | ||
"trailingComma": "all", | ||
"arrowParens": "always", | ||
"singleQuote": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,9 +17,7 @@ const getWPInstallType = require('../../modules/getWPInstallType'); | |
const reset = async (packageDir, logFile, options) => { | ||
const config = fs.readJsonSync(`${packageDir}/config.json`); | ||
|
||
const version = (options && isString(options.version)) | ||
? options.version | ||
: config.validVersions[0]; | ||
const version = options && isString(options.version) ? options.version : config.validVersions[0]; | ||
|
||
shell.cd(packageDir); | ||
|
||
|
@@ -32,7 +30,9 @@ const reset = async (packageDir, logFile, options) => { | |
const locale = get(config, ['locale'], 'en_US'); | ||
|
||
await run( | ||
async () => wpcli(`core config \ | ||
async () => | ||
wpcli( | ||
`core config \ | ||
--dbhost=db \ | ||
--dbname=wordpress \ | ||
--dbuser=root \ | ||
|
@@ -41,8 +41,11 @@ const reset = async (packageDir, logFile, options) => { | |
--extra-php <<PHP | ||
define( 'FS_METHOD', 'direct' ); | ||
${map(config.config, (value, key) => ` | ||
define( '${key}', ${isString(value) ? `'${value}'` : value} );`).join('')} | ||
${map( | ||
config.config, | ||
(value, key) => ` | ||
define( '${key}', ${isString(value) ? `'${value}'` : value} );`, | ||
).join('')} | ||
if ( file_exists( __DIR__ . '/wp-cypress-config.php' ) ) { | ||
require_once __DIR__ . '/wp-cypress-config.php'; | ||
|
@@ -55,7 +58,9 @@ if( file_exists ( ABSPATH . '.userid' ) ) { | |
} | ||
PHP | ||
`, logFile), | ||
`, | ||
logFile, | ||
), | ||
'Creating wp-config.php', | ||
'wp-config.php created', | ||
logFile, | ||
|
@@ -69,10 +74,13 @@ PHP | |
); | ||
|
||
await run( | ||
async () => wpcli( | ||
`core ${getWPInstallType(config.multisite)} --url=${config.url} --title="WP Cypress" --admin_user=admin --admin_password=password --admin_email="[email protected]" --skip-email`, | ||
logFile, | ||
), | ||
async () => | ||
wpcli( | ||
`core ${getWPInstallType(config.multisite)} --url=${ | ||
config.url | ||
} --title="WP Cypress" --admin_user=admin --admin_password=password --admin_email="[email protected]" --skip-email`, | ||
logFile, | ||
), | ||
'Installing WordPress', | ||
'WordPress installed', | ||
logFile, | ||
|
@@ -88,7 +96,13 @@ PHP | |
} | ||
|
||
await run( | ||
async () => wpcli(`plugin activate wp-cypress ${config.activePlugins.join(' ')} ${config.multisite ? '--network' : ''}`, logFile), | ||
async () => | ||
wpcli( | ||
`plugin activate wp-cypress ${config.activePlugins.join(' ')} ${ | ||
config.multisite ? '--network' : '' | ||
}`, | ||
logFile, | ||
), | ||
'Activating plugins', | ||
'Activated plugins', | ||
logFile, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.