PHPackages                             log1x/sage-eject-blocks - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. log1x/sage-eject-blocks

AbandonedArchivedPackage

log1x/sage-eject-blocks
=======================

Eject Sage 10 editor scripts to a optional lazy-loaded plugin.

v1.0.3(6y ago)1454MITPHPPHP &gt;=7.2

Since Nov 19Pushed 6y ago1 watchersCompare

[ Source](https://github.com/Log1x/sage-eject-blocks)[ Packagist](https://packagist.org/packages/log1x/sage-eject-blocks)[ RSS](/packages/log1x-sage-eject-blocks/feed)WikiDiscussions master Synced today

READMEChangelog (4)Dependencies (1)Versions (5)Used By (0)

Sage Eject Blocks
=================

[](#sage-eject-blocks)

[![Latest Stable Version](https://camo.githubusercontent.com/440e921b76ec5a230c91341a3dd3ecc21fa3091c43061905b69d2dcfda3df6a2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c6f6731782f736167652d656a6563742d626c6f636b733f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/440e921b76ec5a230c91341a3dd3ecc21fa3091c43061905b69d2dcfda3df6a2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c6f6731782f736167652d656a6563742d626c6f636b733f7374796c653d666c61742d737175617265)[![Build Status](https://camo.githubusercontent.com/38ea476288e46e2b45bb594233099699dc9c2605a7140dc2ea4afb92095f82b1/68747470733a2f2f696d672e736869656c64732e696f2f636972636c6563692f6275696c642f6769746875622f4c6f6731782f736167652d656a6563742d626c6f636b733f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/38ea476288e46e2b45bb594233099699dc9c2605a7140dc2ea4afb92095f82b1/68747470733a2f2f696d672e736869656c64732e696f2f636972636c6563692f6275696c642f6769746875622f4c6f6731782f736167652d656a6563742d626c6f636b733f7374796c653d666c61742d737175617265)[![Total Downloads](https://camo.githubusercontent.com/7d7b00f9cfcbaeb8541a4aff5b220d7f92325c5504cc84df7c8207cf83fb3f5d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c6f6731782f736167652d656a6563742d626c6f636b733f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/7d7b00f9cfcbaeb8541a4aff5b220d7f92325c5504cc84df7c8207cf83fb3f5d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c6f6731782f736167652d656a6563742d626c6f636b733f7374796c653d666c61742d737175617265)

So what do we have here?
------------------------

[](#so-what-do-we-have-here)

This package is a 4-5 hour, half-assed attempt/proof of concept to devise a strategy to solve the seperation of concerns that Gutenberg has created in the theme development workflow.

[![Preview](https://camo.githubusercontent.com/543563d217e4ba562e4bbc66f3154a466afafe67b78a2dea02e3d148d54c8ca0/68747470733a2f2f692e696d6775722e636f6d2f4c765a4a3736572e676966)](https://camo.githubusercontent.com/543563d217e4ba562e4bbc66f3154a466afafe67b78a2dea02e3d148d54c8ca0/68747470733a2f2f692e696d6775722e636f6d2f4c765a4a3736572e676966)

### Current Problem

[](#current-problem)

Gutenberg is amazing, but has destroyed the theme workflow with having to separate concerns between theme + Gutenberg package/plugin.

If you code your blocks into your theme and the theme changes, your blocks disappear and you risk losing content. Yikes.

### Proposed Solution

[](#proposed-solution)

This attempts to address that concern by allowing you to eject the block scripts from your theme into a plugin auto-magically on-the-go while still prioritizing loading them from your theme if they exist. Styles still come from your theme and are not included during ejection. Theme goes away? Plugin takes over.

The theme stay themein', the generated plugin functions...if it *has* too. There are currently no dependencies on Sage 10 or Acorn in the generated plugin, but obviously they are required if you want to use this.

### Avoiding conflicts

[](#avoiding-conflicts)

Conflict avoidence is currently done using [`wp_script_is()`](https://developer.wordpress.org/reference/functions/wp_script_is/) – but I am more than open to other solutions/ideas.

This allows us to maintain our workflow 100% inside of our theme, and as a freelance developer, agency, etc. – take it upon ourselves to do the right thing, and eject our scripts into a plugin whether it be manually, through continuous integration, etc. so down the road, if the site is to change - they aren't screwed, and you don't have to change how you've been doing things for the past XY years.

### Uhhh...okay?

[](#uhhhokay)

The concept and CLI flow may be rough around the edges, but I assure you I can make it prettier and feel nicer if this is an idea that would prove to be fruitful and people actually want it.

Maybe this isn't the right way to look at this? Maybe this is useless? I don't know. That's why I'm putting it out there. You tell me.

No, really. Please stop my suffering immediately if this is useless.

### TODO (Maybe?)

[](#todo-maybe)

- Make CLI prettier.
- Allow more verbose output.
- Allow things to be more programatical (no input required).
- Allow things to be pre-configured (config/whatever.php).
- Assure CI flow is adequate (see 3/4).
- Debate `wp_script_is()` and alternatives.
- Debate what should and should not be configurable for compatibility purposes.
- Assure the plugin loader is written in the best way humanly possible (and works as intended).
- Some kind of `row_action` signaling if the plugin is active (scripts loaded) or lazy-loaded.
- Code check me, please.

Requirements
------------

[](#requirements)

- [Sage](https://github.com/roots/sage) &gt;= 10.0
- [PHP](https://secure.php.net/manual/en/install.php) &gt;= 7.2
- [Composer](https://getcomposer.org/download/)

Installation
------------

[](#installation)

Install via Composer:

```
$ composer require log1x/sage-eject-blocks
```

Usage
-----

[](#usage)

```
$ wp acorn eject:blocks
```

Bug Reports
-----------

[](#bug-reports)

Yes.

Contributing
------------

[](#contributing)

Yes.

License
-------

[](#license)

Sage Eject Blocks is provided under the [MIT License](https://github.com/log1x/sage-eject-blocks/blob/master/LICENSE.md).

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~5 days

Total

4

Last Release

2347d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5745907?v=4)[Brandon](/maintainers/Log1x)[@Log1x](https://github.com/Log1x)

---

Top Contributors

[![Log1x](https://avatars.githubusercontent.com/u/5745907?v=4)](https://github.com/Log1x "Log1x (8 commits)")

---

Tags

gutenbergsage10wordpresswordpressgutenberg

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/log1x-sage-eject-blocks/health.svg)

```
[![Health](https://phpackages.com/badges/log1x-sage-eject-blocks/health.svg)](https://phpackages.com/packages/log1x-sage-eject-blocks)
```

###  Alternatives

[tiny-pixel/acorn-block-templates

Block templates for Sage 10

191.2k](/packages/tiny-pixel-acorn-block-templates)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
