Skip to content

Commit ec1e80b

Browse files
committed
Merge branch 'feature/blockjson'
2 parents be5365a + df0d812 commit ec1e80b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+12652
-15237
lines changed

.editorconfig

Lines changed: 0 additions & 21 deletions
This file was deleted.

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
**/node_modules/**
44
**/vendor/**
55
build
6+
dist
67
coverage
78
cypress
89
node_modules
910
vendor
11+
google-fonts.js

.eslintrc

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
11
{
2-
"extends": [ "plugin:@wordpress/eslint-plugin/recommended" ]
3-
}
2+
"extends": [ "plugin:@wordpress/eslint-plugin/recommended" ],
3+
"parserOptions": {
4+
"ecmaVersion": 2017
5+
},
6+
7+
"globals": {
8+
"$": true,
9+
"wp":true,
10+
"console":true,
11+
"$uifm":true
12+
},
13+
"rules": {
14+
"camelcase": "off",
15+
"no-console": "off"
16+
}
17+
}

.eslintrc.json

Lines changed: 27 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,33 @@
11
{
2-
"root": true,
3-
"parser": "babel-eslint",
4-
"extends": [ "plugin:@wordpress/eslint-plugin/recommended" ],
2+
"parser": "@babel/eslint-parser",
3+
"globals": {
4+
"wp": true,
5+
"wpApiSettings": true,
6+
"window": true,
7+
"document": true,
8+
"hasSettingsAdmin": "readonly",
9+
"hasAppearanceAdmin": "readonly",
10+
"hasBlockEditorAdmin": "readonly",
11+
"hasEmailsAdmin":"readonly",
12+
"has_gutenberg": "readonly",
13+
"highlight_and_share": "readonly",
14+
"React": "readonly"
15+
},
516
"env": {
6-
"browser": false,
7-
"es6": true,
17+
"browser": true,
818
"node": true,
9-
"mocha": true,
10-
"jest/globals": true
19+
"es6": true
1120
},
1221
"parserOptions": {
22+
"ecmaVersion": 6,
1323
"sourceType": "module",
1424
"ecmaFeatures": {
15-
"jsx": true
16-
}
17-
},
18-
"globals": {
19-
"wp": true,
20-
"wpApiSettings": true,
21-
"window": true,
22-
"document": true
25+
"jsx": true,
26+
"experimentalObjectRestSpread": true
27+
},
28+
"requireConfigFile": false
2329
},
30+
"extends": ["plugin:@wordpress/eslint-plugin/recommended-with-formatting"],
2431
"plugins": ["react", "jsx-a11y", "jest"],
2532
"settings": {
2633
"react": {
@@ -30,7 +37,7 @@
3037
"rules": {
3138
"array-bracket-spacing": ["error", "always"],
3239
"brace-style": ["error", "1tbs"],
33-
"camelcase": ["error", { "properties": "never" }],
40+
"camelcase": 0,
3441
"comma-dangle": ["error", "always-multiline"],
3542
"comma-spacing": "error",
3643
"comma-style": "error",
@@ -81,8 +88,7 @@
8188
"no-restricted-syntax": [
8289
"error",
8390
{
84-
"selector":
85-
"ImportDeclaration[source.value=/^@wordpress\\u002F.+\\u002F/]",
91+
"selector": "ImportDeclaration[source.value=/^@wordpress\\u002F.+\\u002F/]",
8692
"message": "Path access on WordPress dependencies is not allowed."
8793
},
8894
{
@@ -118,18 +124,15 @@
118124
"message": "Use @wordpress/utils as import path instead."
119125
},
120126
{
121-
"selector":
122-
"CallExpression[callee.name=/^__|_n|_x$/]:not([arguments.0.type=/^Literal|BinaryExpression$/])",
127+
"selector": "CallExpression[callee.name=/^__|_n|_x$/]:not([arguments.0.type=/^Literal|BinaryExpression$/])",
123128
"message": "Translate function arguments must be string literals."
124129
},
125130
{
126-
"selector":
127-
"CallExpression[callee.name=/^_n|_x$/]:not([arguments.1.type=/^Literal|BinaryExpression$/])",
131+
"selector": "CallExpression[callee.name=/^_n|_x$/]:not([arguments.1.type=/^Literal|BinaryExpression$/])",
128132
"message": "Translate function arguments must be string literals."
129133
},
130134
{
131-
"selector":
132-
"CallExpression[callee.name=_nx]:not([arguments.2.type=/^Literal|BinaryExpression$/])",
135+
"selector": "CallExpression[callee.name=_nx]:not([arguments.2.type=/^Literal|BinaryExpression$/])",
133136
"message": "Translate function arguments must be string literals."
134137
}
135138
],

Gruntfile.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ module.exports = function (grunt) {
88
files: [
99
{src: ['readme.txt'], dest: '/', filter: 'isFile'},
1010
{src: ['wp-plugin-info-card.php'], dest: '/', filter: 'isFile'},
11+
{src: ['build/**'], dest: '/'},
1112
{src: ['dist/**'], dest: '/'},
1213
{src: ['langs/**'], dest: '/'},
1314
{src: ['src/**'], dest: '/'},
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
{
2+
"$schema": "https://schemas.wp.org/trunk/block.json",
3+
"title": "WP Plugin Info Card",
4+
"apiVersion": 2,
5+
"name": "wp-plugin-info-card/wp-plugin-info-card",
6+
"category": "text",
7+
"icon": "<svg version='1.1' id='Calque_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' width='850.39px' height='850.39px' viewBox='0 0 850.39 850.39' enable-background='new 0 0 850.39 850.39' xml:space='preserve'><path fill='#DB3939' d='M425.195,2C190.366,2,0,191.918,0,426.195C0,660.472,190.366,850.39,425.195,850.39 c234.828,0,425.195-189.918,425.195-424.195C850.39,191.918,660.023,2,425.195,2z M662.409,476.302l-2.624,4.533L559.296,654.451 l78.654,45.525l-228.108,105.9L388.046,555.33l78.653,45.523l69.391-119.887l-239.354-0.303l-94.925-0.337l-28.75-0.032l-0.041-0.07 h0l-24.361-42.303l28.111-48.563l109.635-189.419l-78.653-45.524L435.859,48.514l21.797,250.546l-78.654-45.525l-69.391,119.887 l239.353,0.303l123.676,0.37l16.571,28.772l7.831,13.596L662.409,476.302z'/></svg>",
8+
"description": "Add a beautiful plugin or theme info card to your site.",
9+
"keywords": [
10+
"wp plugin",
11+
"plugin",
12+
"card",
13+
"theme"
14+
],
15+
"version": "1.0.0",
16+
"textdomain": "wp-plugin-info-card",
17+
"attributes": {
18+
"assetData": {
19+
"type": "array",
20+
"default": []
21+
},
22+
"type": {
23+
"type": "string",
24+
"default": "plugin"
25+
},
26+
"slug": {
27+
"type": "string",
28+
"default": "wp-plugin-info-card"
29+
},
30+
"loading": {
31+
"type": "boolean",
32+
"default": true
33+
},
34+
"html": {
35+
"type": "string",
36+
"default": ""
37+
},
38+
"align": {
39+
"type": "string",
40+
"default": "full"
41+
},
42+
"image": {
43+
"type": "string",
44+
"default": ""
45+
},
46+
"containerid": {
47+
"type": "string",
48+
"default": ""
49+
},
50+
"margin": {
51+
"type": "string",
52+
"default": ""
53+
},
54+
"clear": {
55+
"type": "string",
56+
"default": "none"
57+
},
58+
"expiration": {
59+
"type": "number",
60+
"default": 0
61+
},
62+
"ajax": {
63+
"type": "string",
64+
"default": "false"
65+
},
66+
"scheme": {
67+
"type": "string",
68+
"default": "default"
69+
},
70+
"layout": {
71+
"type": "string",
72+
"default": "card"
73+
},
74+
"custom": {
75+
"type": "string",
76+
"default": ""
77+
},
78+
"width": {
79+
"type": "string",
80+
"default": ""
81+
},
82+
"preview": {
83+
"type": "boolean",
84+
"default": false
85+
},
86+
"multi": {
87+
"type": "boolean",
88+
"default": false
89+
},
90+
"defaultsApplied": {
91+
"type": "boolean",
92+
"default": false
93+
}
94+
},
95+
"example": {
96+
"attributes": {
97+
"preview": true
98+
}
99+
},
100+
"supports": {
101+
"anchor": true,
102+
"align": [
103+
"left",
104+
"center",
105+
"right",
106+
"full"
107+
],
108+
"className": true
109+
},
110+
"editorScript": "wp_plugin_info_card-cgb-block-js",
111+
"editorStyle": [
112+
"wp_plugin_info_card-cgb-block-editor-css",
113+
"wp_plugin_info_card-cgb-style-css"
114+
],
115+
"style": "has-style-frontend-css"
116+
}

0 commit comments

Comments
 (0)