-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d4b2770
commit cee5cbd
Showing
41 changed files
with
850 additions
and
809 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,26 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"es2021": true | ||
}, | ||
"settings": { | ||
"react": { | ||
"version": "17.0.2" | ||
} | ||
}, | ||
"extends": ["plugin:@wordpress/eslint-plugin/recommended"], | ||
"rules": { | ||
"react/prop-types": "off", | ||
"jsdoc/check-tag-names": "off", | ||
"jsx-a11y/label-has-associated-control": "off", | ||
"jsx-a11y/click-events-have-key-events": "off", | ||
"jsx-a11y/no-noninteractive-element-interactions": "off", | ||
"jsx-a11y/no-noninteractive-element-to-interactive-role": "off", | ||
"jsx-a11y/no-static-element-interactions": "off", | ||
"jsx-a11y/anchor-has-content": "off", | ||
"jsx-a11y/anchor-is-valid": "off", | ||
"import/no-unresolved": "off", | ||
"@wordpress/i18n-translator-comments": "off", | ||
"no-nested-ternary": "off" | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,31 +1,27 @@ | ||
# Mac OS files | ||
.DS_Store | ||
*.zip | ||
|
||
# Lock | ||
package-lock.json | ||
composer.lock | ||
pnpm-lock.yaml | ||
# Dependencies | ||
node_modules | ||
vendor | ||
jetpack_vendor | ||
package-lock.json | ||
composer.lock | ||
pnpm-lock.yaml | ||
|
||
# Build | ||
*.zip | ||
build | ||
# PhpCs | ||
/phpcs_error.txt | ||
/phpcs_error.csv | ||
/phpcs_error.xml | ||
|
||
# Tests | ||
/artifacts | ||
phpcs_error.txt | ||
phpcs_error.csv | ||
phpcs_error.xml | ||
#Test | ||
artifacts | ||
/test-results | ||
/playwright-report | ||
/playwright | ||
|
||
# Build | ||
/build | ||
/.tools/vendor | ||
/.tools/composer.lock | ||
/.plugin | ||
|
||
# IDE settings | ||
playwright-report | ||
playwright | ||
.tools/vendor | ||
.tools/composer.lock | ||
.plugin | ||
.prettierrc | ||
README.md | ||
.DS_Store | ||
.vscode/settings.json |
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 |
---|---|---|
@@ -1,5 +1,13 @@ | ||
# #!/usr/bin/env sh | ||
# . "$(dirname -- "$0")/_/husky.sh" | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
# git add -A | ||
# npm run format | ||
|
||
case `uname` in | ||
*CYGWIN*|*MINGW*|*MSYS*) | ||
npx.cmd lint-staged # bug on Windows/Github Desktop: add `.cmd` extension fixes it | ||
;; | ||
*) | ||
npx lint-staged | ||
;; | ||
esac |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
// Import the default config file and expose it in the project root. | ||
// Useful for editor integrations. | ||
module.exports = require('@wordpress/prettier-config'); | ||
module.exports = require( '@wordpress/prettier-config' ); |
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,17 @@ | ||
const fs = require( 'fs' ); | ||
const { | ||
copyFileFromTo, | ||
consoleSuccess, | ||
consoleError, | ||
} = require( './helpers/functions' ); | ||
|
||
//Get arguments | ||
const myArgs = process.argv.slice( 2 ); | ||
|
||
//Foreach arguments/folders | ||
try { | ||
copyFileFromTo( myArgs[ 0 ], myArgs[ 1 ] ); | ||
consoleSuccess( 'File copied successfully' ); | ||
} catch ( e ) { | ||
consoleError( 'Can not copy the file, internationalization not found.' ); | ||
} |
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,13 @@ | ||
const fs = require( 'fs' ); | ||
const { consoleSuccess } = require( './helpers/console' ); | ||
|
||
//Get arguments | ||
const myArgs = process.argv.slice( 2 ); | ||
|
||
//Foreach arguments/folders | ||
myArgs.forEach( ( element ) => { | ||
//Delete folder/file | ||
fs.rm( element, { recursive: true }, ( err ) => { | ||
err ?? consoleSuccess( `${ element } deleted` ); | ||
} ); | ||
} ); |
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,24 @@ | ||
// deleteZip.js | ||
const fs = require( 'fs' ); | ||
const path = require( 'path' ); | ||
|
||
const { pluginName } = require( './helpers/functions' ); | ||
|
||
// Get the base directory of the project | ||
const baseDir = process.cwd(); | ||
|
||
// Define the zip file | ||
const zipFile = path.join( baseDir, `${ pluginName }.zip` ); | ||
|
||
// Check if the zip file exists | ||
|
||
if ( fs.existsSync( zipFile ) ) { | ||
// Delete the zip file | ||
fs.unlink( zipFile, ( error ) => { | ||
if ( error ) { | ||
console.error( `Failed to delete ${ zipFile }:`, error ); | ||
} else { | ||
console.log( `${ zipFile } has been deleted.` ); | ||
} | ||
} ); | ||
} |
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,15 @@ | ||
const consoleSuccess = ( message ) => { | ||
console.log( '\x1b[32m%s\x1b[0m', message ); | ||
}; | ||
|
||
const consoleError = ( message ) => { | ||
console.log( '\x1B[31m', message ); | ||
}; | ||
|
||
const consoleInfo = ( message ) => { | ||
console.log( '\x1b[36m%s\x1b[0m', message ); | ||
}; | ||
|
||
module.exports.consoleSuccess = consoleSuccess; | ||
module.exports.consoleError = consoleError; | ||
module.exports.consoleInfo = consoleInfo; |
Oops, something went wrong.