### Requirements

Tested with node Node Version 12.18.3

### Setup

To start using all the tools that come with `flo-gutenberg-theme` you need to install the necessary Node.js dependencies :

```sh
$ npm install
```

### Available CLI commands

`flo-gutenberg-theme` comes packed with CLI commands tailored for WordPress theme development :

- `npm run start` : starts webpack for dev enviroiment and launches watcher
- `npm run build` : generates a .zip archive for distribution, excluding development and system files.
- `npm run upload` : call the build task, generates a zip and deploys it to the staging server. It requires local SSH key and shell script. See upload-sample.sh
- `npm run release --floversion=1.0.5`
- `npm run release-beta --floversion=1.0.0`

Now you're ready to go! The next step is easy to say, but harder to do: make an awesome WordPress theme. :)

Good luck!

### Important files

All files related to themes functionality is located in `flo-app` directory

## Admin dir

includes all the files related to wp admin area

- `assets` - admin related images/fonts/icons
- `dev` - developers working directory ( js/scss )
- `templates` - includes json configs for template selector

How to create new template

```
let editedContent = wp.data.select( "core/editor" ).getCurrentPost().content;;
wp.blocks.parse( editedContent );
```

right click on console log data obj and select store data as global

```
copy(temp1)
```

Create file with data ( .json )

```
{
	title,
	image,
	content: '${temp1}' // previously copied
}
```

- `class-flo-admin.php` - used for css/js and localized data injections
- `class-flo-app-wizard.php` - getting started wizard

## Common dir ( unused now )

includes ( js/css ) files shared between admin/public. Can be done via chunk now

## Configuration-files dir

- `configs` - includes PHP configuration files for ( post_types/taxonomy/global options )

_loader file: class-flo-init-post-types.php / class-flo-init-taxonomy.php_

- `initial-data` - configuration files used for initial theme setup ( after first activation )

_loader file: class-flo-init-initial-theme-data.php_

- `metaboxes` - all the metaboxes included in theme

_loader file: class-flo-init-metaboxes.php_
