Sage 10.0.0-beta.3 released

Sage 10.0.0-beta.3 has been released!

What’s new

Acorn has been removed as a dependency in Sage’s composer.json. We recommend installing Acorn from Bedrock’s composer.json, or as a mu-plugin in non-Bedrock environments. Acorn is still required in order to use Sage, and Sage will exit immediately with an error if Acorn isn’t available. We’ve also removed the config and bootstrap directories from Sage, and default to a zero-config setup.

See the Acorn installation and zero-config docs for more details.

Bud has shipped several releases since being included in beta 2, in which many bug fixes, performance improvements, and developer experience improvements have landed.

Sage has moved the global editor settings from setup.php into theme.json and now requires WordPress 5.9+.

Changes

  • migrate global settings to theme.json (#2964) @retlehs
  • Re-add i18n related scripts/tasks (#2958) @strarsis
  • chore(header): allow unescaped siteName data (#2967) @Akiletour
  • Switch to zero-config setup, remove config and bootstrap directories (#2839) @retlehs @QWp6t
  • chore: remove helpers.php (#2917) @Log1x
  • refactor: remove JavaScript detection (#2916) @knowler
  • chore(php): bump minimum PHP version to 7.4 (#2925) @knowler
  • enhance(views): Move page section views to a sections directory (#2936) @retlehs @Log1x
  • feat(search): use a button element (#2943) @knowler

Fixes

  • fix(views): Use dot notation on entry-meta view includes (#2941) @Log1x
  • fix: app/setup.php doesn’t need to be executable (#2933) @knowler
  • fix(bundle-editor): remove @wordpress/edit-post (#2932) @retlehs

Full Changelog: https://github.com/roots/sage/compare/10.0.0-beta.2…10.0.0-beta.3

Sage 10.0.0-beta.3 contributors: @retlehs @QWp6t @Log1x @knowler @simonhammes @kellymears @Aki @strarsis @alwaysblank

6 Likes

Hey !

Thanks for this brand new release :slight_smile:

Just a little mistake, it’s @Akiletour on Github not @Aki :stuck_out_tongue:

1 Like

Whoops. Fixed, thank you! :pray:

Regarding Acorn, is the beta 2 and below way of including it still an option for non bedrock users? I think I prefer it rather than as a plugin.

1 Like

I’m wondering this as well.

I support the decision to remove acorn from the theme directory, it significantly reduces the number of files in the vendor directory, streamlining the initial deployments for non bedrock users.

Having said that, I’m not having much luck installing acorn with either the original approach or the alternatives in the documentation.

Including acorn by running composer require roots/acorn within the sage directory leads to the following error.

Fatal error: Uncaught Roots\Acorn\Assets\Contracts\ManifestNotFoundException: The manifest [/Users/*/Local Sites/*/app/public/wp-content/themes/*/public/manifest.json] cannot be found. in /Users/*/Local Sites/*/app/public/wp-content/themes/*/vendor/roots/acorn/src/Roots/Acorn/Assets/Manager.php on line 133

Adding acorn to the mu-plugins directory doesn’t make the error below disappear and adding it to the plugins directory requires it to be activated, but the admin is blocked with the same error below.

You need to install Acorn to use this theme.

What am I missing in order to add acorn correctly without bedrock?

I can confirm that including acorn by running composer require roots/acorn within the sage directory still works like in previous versions, @SergiArias.

I just needed to run bud build to resolve the error about the missing manifest.json file.

Not sure if it’s also recommended to add the post-autoload-dump script back to composer.json.

I’m still interested to understand how to install acorn as a plugin instead, if anyone can point me in the right direction.

4 Likes

I installed it as a plugin and it works flawlessly after bud build. Did you try to activate it through wp-cli? Just run in the terminal: wp plugin activate acorn

To install it as a mu-plugin, we must autoload it, as must use plugins aren’t activated by default if they are within folders; just create a acorn-load.php file inside mu-plugins folder and inside it:

<?php
require WPMU_PLUGIN_DIR.'/acorn/acorn.php';
1 Like

I have another question. How bud.config.js proxy should be setup? https or http? Should we create a local certificate if using https? Sometimes the browser cannot stay on localhost:3000 and goes directly into the proxy, losing the live reload, but I don’t quite follow why.

Another important question regarding Acorn. How should we do publish vendor now that acorn isn’t in sage directory?

As an example, log1x/poet asks to do: wp acorn vendor:publish --provider="Log1x\Poet\PoetServiceProvider", which doesn’t work now.

@SergiArias can you please create individual topics for each separate issue that you’re seeking support for? This is the release announcement for Sage 10.0.0-beta.3, and you’ve got specific questions about Bud, Acorn, and packages that aren’t from the Roots namespace :sweat_smile:

1 Like