npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@css-blocks/ember-cli

v1.5.0

Published

Use CSS Blocks with your Ember and Glimmer projects.

Downloads

94

Readme

Ember CLI Plugin for CSS Blocks

Ember CLI integration for Ember CLI built apps.

Installation

ember install @css-blocks/ember-cli

Be sure that @css-blocks/ember-cli is installed as a dependency and not a dev-dependency. Every individual app, addon, or engine must depend on @css-blocks/ember-cli individually.

Usage

This addon is pre-1.0 and should be considered experimental

There are a number of caveats you should know:

  1. Eager engines are a little hacky. We'll want to make some changes to engines proper to make their behavior more consistent with regular addons.
  2. Lazy engines are not supported at this time and will require non-trivial work in ember-engines to support. We have a failing (skipped) test for them in this addon.
  3. The optimizer can not be enabled at this time and is hard-coded to disabled.
  4. The broccoli plugins do not have any kind of caching strategy right now! That, and build impact stats / tests, are coming soon.

The four above items will need to be finished in order to call this addon "done". We will be tracking these all in separate tickets.

But otherwise, this works for unlocking CSS Blocks syntax in your addons and apps 🎉

To style any component in an addon with CSS Blocks simply add a corresponding styles/components/component-name.block.css file. The addon will auto-discover this file and build accordingly.

For Glimmer template syntax, plese see @css-blocks/glimmer. For CSS Blocks syntax, plese see the main project's readme.

Styling {{link-to}}

In the Ember + CSS Blocks build, the built-in {{link-to}} component receives special treatment. The {{link-to}} component manages its own internal style application for [loading], [active] and [disabled]. To style a `{{link-to}} in these special states, simply apply a class with those special state names and Ember will apply the correct classes at runtime as required. For example:

/* stylesheet.block.css */
.link           { color: blue; }
.link[loading]  { color: yellow; }
.link[active]   { color: green; }
.link[disabled] { color: gray; }
{{!-- template.hbs --}}
{{link-to "route-name" block:class="link"}}