Releases: zackify/gutenblock
0.4.1
- Fix docker issue with mysql version
- Fix plugin registered name in gutenberg
- Add support for sub categories!
src/category/component/edit.js
Nest components inside the source folder for better organization. When WordPress adds custom category registration, I'll make it auto categorize blocks.
0.4.0
0.3.1
0.2.4
Add in <Repeat/>
component for easily adding unlimited items into your components:
import { Inspector, Repeat, RepeatInput } from 'gutenblock-controls';
export default () => (
<Inspector>
<Repeat title="Tabs" addNew="Add Tab" attribute="tabs">
<RepeatInput name="title" />
<Repeat title="Notes" addNew="Add Note" attribute="notes" max={3}>
<RepeatInput name="heading" />
</Repeat>
</Repeat>
</Inspector>
);
Render this inside your <Edit />
component and see what it does. Log props.attributes inside edit to see the state.
Make sure block.js
has:
tabs: {
type: 'array',
default: [],
},
0.2.3
Custom Webpack / Babel
Add a gutenblock.config.js
file in your blocks folder. It looks like this:
const path = require('path');
module.exports = {
resolve: {
alias: {
shared: path.resolve(__dirname, '../src/shared'),
},
},
module: {
rules: [
{
test: /\.css$/,
use: [require.resolve('style-loader'), require.resolve('css-loader')],
},
],
},
};
The configuration is the exact same as webpack with one extra piece: pass babelOptions
with plugins and presets like a babelrc has to customize the babel loader.
Instant development
gutenblock watch docker
will now spin up wordpress for you, (Install gutenberg, enable plugin, boom) so you can just worry about development! If you have your environment already set, guteblock watch
works like normal.
- Removed separate loader package