Skip to content

Claude/cleanup non essential code 011 c uwji5 x yop qba kxed u ga g#615

Closed
nickrmurphy wants to merge 3 commits intocristianbote:masterfrom
byearlybird:claude/cleanup-non-essential-code-011CUwji5XYopQBAKxedUGaG
Closed

Claude/cleanup non essential code 011 c uwji5 x yop qba kxed u ga g#615
nickrmurphy wants to merge 3 commits intocristianbote:masterfrom
byearlybird:claude/cleanup-non-essential-code-011CUwji5XYopQBAKxedUGaG

Conversation

@nickrmurphy
Copy link

No description provided.

This commit removes all non-essential code from the forked goober library:

- Removed /website directory (marketing site built with WMR)
- Removed /docs directory (Docusaurus documentation site)
- Removed /packages directory containing:
  - babel-plugin-transform-goober (Babel transform plugin)
  - gatsby-plugin-goober (Gatsby integration)
- Removed /macro directory (Babel macro plugin)
- Removed CNAME file (for GitHub Pages)
- Removed docs.yml workflow (documentation deployment)
- Updated package.json to remove:
  - macro from files array
  - ./macro from exports
  - packages reference in test-unit-core script
  - sandbox script
  - wmr devDependency
- Updated README.md to remove:
  - The Great Shave Off Challenge section
  - Integrations section (Babel, Gatsby, Preact CLI, CSS Prop)
  - References to removed features
- Updated goober.d.ts to remove:
  - BabelPluginTransformGooberStyledFunction type
  - Babel plugin references

The library now focuses solely on the core CSS-in-JS functionality
with its essential addons (global, prefixer, should-forward-prop).
This commit removes the styled() API from goober, making it a pure
css() based library:

REMOVED:
- src/styled.js - The entire styled component implementation
- src/__tests__/styled.test.js - Styled component tests
- src/__tests__/integrations.test.js - Integration tests for styled API

REFACTORED:
- global/src/index.js - Refactored createGlobalStyles to use glob
  directly instead of styled
- src/css.js - Added simplified setup() function for prefixer config
- src/index.js - Export setup from css.js instead of styled.js

UPDATED:
- goober.d.ts - Removed all styled-related TypeScript definitions
  (StyledFunction, BabelPluginTransformGooberStyledFunction, etc.)
- ts-tests/test-api.tsx - Removed styled tests, kept css/glob/keyframes
- README.md - Complete rewrite to focus on css() API:
  - Updated motivation section
  - Removed comparison table and benchmarks
  - Rewrote usage examples to use css() instead of styled()
  - Removed sections: Sharing Style, shouldForwardProp
  - Updated all code examples throughout
  - Simplified TypeScript section

The library now provides a minimal CSS-in-JS solution focused on:
- css() - Generate class names
- glob() - Global styles
- keyframes() - Animations
- setup() - Configure prefixer
- extractCss() - SSR support
- createGlobalStyles() - Global styles component
This commit simplifies the library to only support object/JSON syntax,
removing all tagged template literal support:

SIMPLIFIED:
- src/css.js - Removed compile import and template literal handling
  - css() now only accepts objects or functions returning objects
  - Removed array handling and tagged template compilation
  - Much simpler implementation: just hash the object directly

UPDATED:
- goober.d.ts - Changed function signatures to only accept:
  - CSSAttribute (object)
  - Function returning CSSAttribute
  - Removed TemplateStringsArray and variadic props

- ts-tests/test-api.tsx - Updated all tests to use object syntax:
  - css({ background: 'black' }) instead of css`background: black`
  - keyframes({ from: {...}, to: {...} })
  - glob({ html: {...}, body: {...} })

- README.md - Complete rewrite of all examples:
  - Usage section now shows object syntax only
  - All API documentation updated (css, glob, keyframes, createGlobalStyles)
  - Removed references to tagged templates
  - All code examples use object syntax

API CHANGES:
Before: css`background: red;` or css({ background: 'red' })
After:  css({ background: 'red' }) only

Before: keyframes`from { opacity: 0 } to { opacity: 1 }`
After:  keyframes({ from: { opacity: 0 }, to: { opacity: 1 } })

Before: glob`body { margin: 0 }`
After:  glob({ body: { margin: 0 } })

The library is now purely object-based CSS-in-JS.
@vercel
Copy link

vercel bot commented Nov 9, 2025

@claude is attempting to deploy a commit to the Cristian Bote's projects Team on Vercel.

A member of the Team first needs to authorize it.

@nickrmurphy nickrmurphy closed this Nov 9, 2025
@codesandbox-ci
Copy link

codesandbox-ci bot commented Nov 9, 2025

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

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.

2 participants