Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@cardstack/boxel

Package Overview
Dependencies
Maintainers
8
Versions
192
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cardstack/boxel

Cardstack Boxel Design System development app.

  • 1.0.54
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
4
decreased by-20%
Maintainers
8
Weekly downloads
 
Created
Source

boxel

The repository provides an Ember Addon allowing usage of the Ember component library for the Boxel Design System.

It consists of several parts:

  1. The Boxel Design System Components and their documentation
  2. Various prototypes using the design system
  3. Miscellaneous components that will eventually be moved

Design system components

All components in /addon/components will be used in whatever apps consume the design system. Each component folder consists of several parts:

  • index.hbs & index.js: The template and javascript for the component
    • Note: Unlike a usual Ember addon, these files are automatically reexported in whatever app consumes the addon. So there is no need to handle that on your own.
  • index.css: The pure CSS styles associated with the component. This file will automatically be added to the consuming app as well
  • usage.hbs & usage.js: A standardized way to document and experiment with the designs of each component. All usage files will automatically show up in the components list in /docs in the dummy app. Utilizes chrislopresto/ember-freestyle
    • Note: These files are automatically stripped out of any production build

Prototypes

The prototypes are there to exercise in context various aspects of the design system.

Miscellaneous Components

There are many components that are specific to a certain prototype or will eventually be moved to other repos, like the main Cardhost app.

Running the dummy app

ember serve

Then browse to http://localhost:4200/

Running tests

To run tests interactively:

ember test --s

(To prevent the interactive tests from launching new windows, use command ember test --s --launch=false , and then visit http://localhost:7357/ on your browser.)

To run tests in the console:

ember test

To run the linter:

yarn lint:hbs

yarn lint:js

To run the linter, along with ember tests in the console:

yarn test

Check package.json file for other testing and linting scripts.

Generator

In addition to the normal suite of ember generators, Boxel has a 'boxel-componentblueprint allowing you to generate a new boxel component (index.gts), a CSS file, a usage.gts, and an intergration test. Run it usingember generate boxel-component your-component-name`.

Thumbnails

Generating multiple image sizes / thumbs from /public/media-registry/covers/:

Kill your ember server if it's running otherwise it'll try to rebuild for every size generated.


brew install imagemagick # if not installed already
cd boxel
node generate-thumbs.js

The thumbs / sizes are intended to be committed to the repo for simplicity of static deployment

Using imgix for dynamic production data makes sense when there is a backend server to sign image urls, but for static deployment pregenerating the images is way more convenient than pre-signing the images as the necessary hooks do not exist in broccoli-asset-rev

Keywords

FAQs

Package last updated on 08 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc