Skip to content

Commit

Permalink
WDSUS-46 - Remove options from script and add default to template ins…
Browse files Browse the repository at this point in the history
…tead
  • Loading branch information
khleomix committed Oct 11, 2023
1 parent 600ed27 commit d56bc1c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
16 changes: 10 additions & 6 deletions inc/block-template/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,23 @@ const { join } = require( 'path' );

module.exports = {
defaultValues: {
description: 'The Block Description',
author: 'WebDevStudios',
category: 'wds-blocks-category',
dashicon: 'pets',
namespace: 'wds',
folderName: 'src',
editorScript: 'file:./index.js',
editorStyle: 'file:./index.css',
style: 'file:./style-index.css',
viewScript: 'file:./view.js',
main: 'file:./index.js',
example: {},
supports: {
html: false,
},
attributes: {},
customScripts: {
build: 'wp-scripts build',
format: 'wp-scripts format',
'lint:css': 'wp-scripts lint-style',
'lint:js': 'wp-scripts lint-js',
'packages-update': 'wp-scripts packages-update',
'plugin-zip': 'wp-scripts plugin-zip',
start: 'wp-scripts start',
},
devDependencies: {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"build": "cross-env NODE_ENV=production wp-scripts build --config webpack.prod.js && npm run build:blocks",
"check-engines": "wp-scripts check-engines",
"check-licenses": "wp-scripts check-licenses",
"create-block": "cd blocks && npx @wordpress/create-block@latest --template ../inc/block-template --no-wp-scripts --namespace wds --category wds-blocks-category",
"create-block": "cd blocks && npx @wordpress/create-block@latest --template ../inc/block-template --no-wp-scripts",
"dev": "npm run watch",
"format": "run-p format:*",
"format:css": "npx prettier '**/*.scss' --write && npm run lint:css -- --fix",
Expand Down

0 comments on commit d56bc1c

Please sign in to comment.