# SCORM Player Gutenberg Block

This directory contains the source code for the SCORM Player Gutenberg block.

## Development Requirements

- Node.js and NPM

## Getting Started

1. Navigate to this directory from the command line:
```
cd block
```

2. Install dependencies:
```
npm install
```

3. Start the development mode:
```
npm start
```

This will watch for file changes and automatically rebuild the block.

## Building for Production

To build the block for production, run:
```
npm run build
```

The compiled files will be created in the `build` directory.

## Block Structure

- `block.json` - Block configuration
- `src/index.js` - Main entry point
- `src/edit.js` - Block edit component
- `src/editor.scss` - Editor styles
- `src/style.scss` - Frontend styles

## Troubleshooting

If the block doesn't appear in the Gutenberg editor:

1. Make sure you've built the block with `npm run build`
2. Check the browser console for any JavaScript errors
3. Verify the REST API endpoint is working by visiting `/wp-json/scorm-player/v1/packages`
4. Try deactivating and reactivating the plugin after building the block 