Skip to content

fix some stale file paths, Area IDs, and subscriber location - #23

Open
eschaefer wants to merge 1 commit into
evershopcommerce:mainfrom
eschaefer:fix/correct-stale-references-and-area-ids
Open

fix some stale file paths, Area IDs, and subscriber location#23
eschaefer wants to merge 1 commit into
evershopcommerce:mainfrom
eschaefer:fix/correct-stale-references-and-area-ids

Conversation

@eschaefer

Copy link
Copy Markdown

Fixed six EverShop docs that had drifted from source. Wrong Area IDs, a dead file path, subscribers in the wrong folder, emitter vs emit, and three missing frontmatter descriptions

Corrects several references that no longer match EverShop 2.1.2. Each change
was verified against the published @evershop/evershop@2.1.2 package.

- events-and-subscribers: the `subscribers` folder is shown at the extension
  root, but `loadSubscribers` joins `subscribers` onto the module path, which
  `bin/extension/index.ts` always resolves to `<extension>/dist`. Source must
  therefore live at `src/subscribers` to be compiled into `dist/subscribers`.
  Updated the three directory trees and the code-fence titles, and added a note
  explaining why.

- events-and-subscribers: prose referred to "the `emitter` helper function"
  while the adjacent snippet imports `emit`. `lib/event/emitter.ts` exports
  only `emit`.

- view-system: the "Injecting Components into an Area" example used the Area
  IDs `productViewLeft`, `productViewRight`, and `productViewInfo`, none of
  which exist. The product page declares `productPageTop`,
  `productPageMiddleLeft`, `productPageMiddleRight`, `productSingleDescription`,
  and `productPageBottom`. Replaced the illustrative layout with an abridged
  version of the real component and pointed readers at the full file.

- view-system, create-your-first-extension: both pointed at
  `productView/Layout.js` for the list of available Areas. That file does not
  exist; the master component is `productView/ProductView.tsx`.

- addCartItem, removeCartItem, updateCartItemQty: add the missing frontmatter
  `description`, which every other function reference has and which feeds the
  page meta description. Also adds the missing `groups: checkout` to
  updateCartItemQty so it is grouped with its siblings.

`npm run build` passes. The one reported broken anchor
(system-requirements -> installation-guide#for-developer) is pre-existing and
untouched by this change.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant