Skip to content

Commit

Permalink
Rename eighteen73-blocks to nebula-blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
brettsmason committed Sep 26, 2024
1 parent ebae3c4 commit bf89e59
Show file tree
Hide file tree
Showing 23 changed files with 1,869 additions and 451 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
web/app/plugins/*
!web/app/plugins/.gitkeep
web/app/mu-plugins/*/
!web/app/mu-plugins/eighteen73-core/
!web/app/mu-plugins/eighteen73-blocks/
!web/app/mu-plugins/nebula-core
!web/app/mu-plugins/nebula-blocks
web/app/upgrade
web/app/uploads/*
!web/app/uploads/.gitkeep
Expand Down
2,258 changes: 1,840 additions & 418 deletions package-lock.json

Large diffs are not rendered by default.

10 changes: 3 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "1.0.0",
"workspaces": [
"web/app/themes/pulsar",
"web/app/mu-plugins/eighteen73-blocks"
"web/app/mu-plugins/nebula-blocks"
],
"scripts": {
"prepare": "husky install",
Expand All @@ -19,13 +19,9 @@
"format:css": "npm run format:css --workspaces --if-present",
"format:js": "npm run format:js --workspaces --if-present",
"format:php": "npm run format:php --workspaces --if-present",
"create-block": "npm run create-block -w=eighteen73-blocks"
},
"author": {
"name": "Brett Mason",
"email": "[email protected]",
"role": "developer"
"new:block": "npm run new:block -w=eighteen73-blocks"
},
"author": "eighteen73",
"engineStrict": true,
"engines": {
"node": ">=20.0.0",
Expand Down
1 change: 0 additions & 1 deletion web/app/mu-plugins/eighteen73-blocks/.eslintignore

This file was deleted.

1 change: 0 additions & 1 deletion web/app/mu-plugins/eighteen73-blocks/.prettierignore

This file was deleted.

1 change: 0 additions & 1 deletion web/app/mu-plugins/eighteen73-blocks/.stylelintignore

This file was deleted.

1 change: 1 addition & 0 deletions web/app/mu-plugins/nebula-blocks/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ node_modules/
# dotenv environment variables file
.env

vendor/
# Composer vendor directory
vendor/
1 change: 1 addition & 0 deletions web/app/mu-plugins/nebula-blocks/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build
1 change: 1 addition & 0 deletions web/app/mu-plugins/nebula-blocks/.stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
*
* @return void
*
* @package Eighteen73Blocks
* @package NebulaBlocks
*/

spl_autoload_register(
function ( $class_name ) {
$namspaces = [
'Eighteen73\\Blocks\\' => __DIR__ . '/includes/classes/',
'Eighteen73\\Nebula\\Blocks\\' => __DIR__ . '/includes/classes/',
];
foreach ( $namspaces as $prefix => $base_dir ) {
$len = strlen( $prefix );
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eighteen73/blocks",
"description": "A block scaffolded from eighteen73 standards",
"name": "eighteen73/nebula-blocks",
"description": "Custom blocks for a Nebula project.",
"type": "wordpress-plugin",
"require-dev": {
"eighteen73/wordpress-coding-standards": "^2.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
/**
* Handles block registration.
*
* @package Eighteen73Blocks
* @package NebulaBlocks
*/

namespace Eighteen73\Blocks;
namespace Eighteen73\Nebula\Blocks;

/**
* Handles block registration.
Expand All @@ -32,7 +32,7 @@ public function setup() {
* @see https://developer.wordpress.org/reference/functions/register_block_type/
*/
public function register() {
$blocks_directory = trailingslashit( EIGHTEEN73_BLOCKS_PATH . 'build' );
$blocks_directory = trailingslashit( NEBULA_BLOCKS_PATH . 'build' );

// Register all the blocks in the plugin.
if ( file_exists( $blocks_directory ) ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
/**
* Singleton trait
*
* @package Eighteen73\Blocks
* @package NebulaBlocks
*/

namespace Eighteen73\Blocks;
namespace Eighteen73\Nebula\Blocks;

trait Singleton {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
<?php
/**
* Plugin Name: eighteen73 Blocks
* Description: Custom blocks for an eighteen73 project.
* Plugin Name: Nebuloa Blocks
* Description: Custom blocks for a Nebula project.
* Version: 0.1.0
* Requires at least: 6.6
* Requires PHP: 8.2
* Author: eighteen73
* License: GPL-2.0-or-later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: eighteen73-blocks
* Text Domain: nebula-blocks
*
* @package Eighteen73Blocks
* @package NebulaBlocks
*/

namespace Eighteen73\Blocks;
namespace Eighteen73\Nebula\Blocks;

if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}

// Useful global constants.
define( 'EIGHTEEN73_BLOCKS_URL', plugin_dir_url( __FILE__ ) );
define( 'EIGHTEEN73_BLOCKS_PATH', plugin_dir_path( __FILE__ ) );
define( 'NEBULA_BLOCKS_URL', plugin_dir_url( __FILE__ ) );
define( 'NEBULA_BLOCKS_PATH', plugin_dir_path( __FILE__ ) );

// Require the autoloader.
require_once 'autoload.php';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
{
"name": "eighteen73-blocks",
"name": "nebula-blocks",
"version": "0.1.0",
"description": "Custom blocks for an eighteen73 project",
"description": "Custom blocks for a Nebula project.",
"author": "eighteen73",
"license": "GPL-2.0-or-later",
"main": "build/index.js",
"scripts": {
"production": "wp-scripts build --experimental-modules",
"format": "wp-scripts format",
Expand All @@ -16,7 +15,7 @@
"hot": "wp-scripts start --hot --experimental-modules",
"format:css": "stylelint --fix './src/**/*.scss'",
"format:js": "eslint --fix './src/**/*.js'",
"create-block": "npx @wordpress/create-block@latest --template @eighteen73/create-block-template --variant basic --no-plugin"
"new:block": "npx @wordpress/create-block@latest --template @eighteen73/create-block-template --variant multi --no-plugin"
},
"files": [
"[^.]*"
Expand Down
File renamed without changes.

0 comments on commit bf89e59

Please sign in to comment.