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

tailwind-zeplin-extension

v1.3.0

Published

Utilities to generate Tailwind Config and classes for your components.

Downloads

38

Readme

Tailwind Zeplin Extension

Utilities to generate Tailwind Config and classes for your design.

Sample colors output:

const colors = {
  red: "#ff0000",
  green: "#00ff00",
  blue: "#0000ff",
  yellow: "#ffff00",
  black: "#000000",
  black50: "rgba(0, 0, 0, 0.5)",
  white: "#ffffff"
};

Sample component (text style) output:

.sample-text-style {
  @apply .text-xl .font-sfprotext;
}
.sample-text-style-with-color {
  @apply .text-xl .font-sfprotext .text-red;
}

Sample text layer output:

<p class="large-blue">Get paid for business introductions!</p>
<p class="text-4xl font-ubuntu leading-normal font-medium text-greyish-brown">Receive loads of high-level business introductions to new clients, investors and job candidates!</p>

Sample shape layer output:

<div class="rounded-default shadow bg-white max-w-2xl min-h-xs"></div>
<!-- sm -->
<div class="sm:rounded-default sm:shadow sm:bg-white sm:max-w-2xl sm:min-h-xs"></div>
<!-- md -->
<div class="md:rounded-default md:shadow md:bg-white md:max-w-2xl md:min-h-xs"></div>
<!-- lg -->
<div class="lg:rounded-default lg:shadow lg:bg-white lg:max-w-2xl lg:min-h-xs"></div>
<!-- xl -->
<div class="xl:rounded-default xl:shadow xl:bg-white xl:max-w-2xl xl:min-h-xs"></div>

Options

Tailwind Config

If this isn't supplied, the default Tailwind config will be used. If you've customised the config you can import it to generate appropriate classes for your project.

To export your current config, add the following lines to the bottom of your tailwind-config.js:

console.log(JSON.stringify(module.exports))

Then copy and paste the JSON into the settings area, you can then delete the above line.

Default Font

Specify your default font here and it will be excluded from the generated classes.

Default Colour

Specify your default colour here and it will be excluded from the generated classes.

Usage

If you have node >= 5.2.0, use npx:

npx tailwind-zeplin-extension start

Otherwise:

git clone https://github.com/morrislaptop/tailwind-zeplin-extension.git
cd tailwind-zeplin-extension
yarn # or npm install
yarn start

You can add them to your Zeplin projects locally from their Extensions window.

On Mac, Windows or Web apps, holding down the Option key will enable the “Add Local Extension” option on the title bar:

Add local extension

After running the script, enter http://localhost:7070/manifest.json as the URL and click Add.

That's pretty much it. Go ahead, click a layer!

Hello Layer

Development

See #1 for the list of Tailwind classes supported.

Tailwind Zeplin Extension is developed using zem, Zeplin Extension Manager. zem is a command line tool that lets you quickly create and test extensions.

To learn more about zem, see documentation.

To run tests and show skipped - yarn test --verbose --expand