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

mta-styles

v0.0.5

Published

The colors of the MTA in a easy to include library.

Downloads

30

Readme

MTA Styles

The colors of the MTA in a easy to include CSS/SASS/LESS/JSON library. The source data for this library is from this CSV provided by the MTA.

Install

Easily include with a package manager:

  • npm install mta-styles
  • Or bower install mta-styles

Or, you could use this in your HTML directly (though note that this CDN is not guaranteed to be up).

<link rel="stylesheet" href="//cdn.rawgit.com/datanews/mta-styles/0.0.5/dist/mta-styles.css">

Use

Styles

With the CSS, SASS, and LESS files, the following styles are available.

  • Subway line symbols with <i class="mta mta-symbol subway-n"><i>
  • Background colors can be set using class="mta subway-a"
    • The format is mta-<mode>-<line>
    • Note that this style is marked as !important.
  • Foreground colors can be set using class="mta lirr-montauk-fg"
    • The format is mta-<mode>-<line>-fg
    • Note that this style is marked as !important.

LESS and SASS

The LESS and SASS files also provide variables to use.

  • For LESS: @mta-subway-5
    • Format is @mta-<mode>-<line>
  • For SASS: $mta-subway-5
    • Format is $mta-<mode>-<line>

JSON

The JSON file describing what lines are what colors can useful for styling in different applications or data visualizations. The JSON is an array of each set of lines.

{
  "mode": "subway",
  "modeName": "NYC Subway Lines",
  "lines": [
    "a",
    "c",
    "e"
  ],
  "linesName": "A,C,E",
  "linesIds": [
    "subway-a",
    "subway-c",
    "subway-e"
  ],
  "hex": "#0039A6"
}

Development

  1. Get code: git clone https://github.com/datanews/mta-styles.git && cd mta-styles
  2. Install dependencies: npm install
  • The main logic that takes the data from the MTA and compiles the output files is in: mta-styles/mta-styles.js
  • To actually compile the output files, run: npm run build

Publish

  1. Update package.json, bower.json, README.md, index.html with the new version.
  2. Commit changes.
  3. git tag X.X.X
  4. git push origin master --tags
  5. npm publish

Attribution

  • All colors from the MTA. Though none of those are included here, the use of MTA logos, maps, and symbols requires a license.
  • Social image from Wikipedia