Skip to content

Releases: zackify/gutenblock

0.4.1

23 Apr 23:53
Compare
Choose a tag to compare
  • 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

21 Apr 01:04
Compare
Choose a tag to compare

Remove babel polyfill by default 0198244

install @babel/polyfilland import in index.js in your plugin folder if you need it.

0.3.1

18 Apr 01:27
Compare
Choose a tag to compare

Rename Input to InspectorInput since it must be a direct child of Inspector to work.

0.2.4

17 Apr 17:34
Compare
Choose a tag to compare

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

16 Apr 20:01
Compare
Choose a tag to compare

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

0.1.3

16 Apr 18:51
c18df9c
Compare
Choose a tag to compare

first release